diff --git a/lang/en.json b/lang/en.json index c78ababeb134bef8242213fc580b271af510f531..86f51698090958a1ccd4e0a0e75c83b85d39612d 100755 --- a/lang/en.json +++ b/lang/en.json @@ -626,6 +626,7 @@ "watermarkContentDesc": "Columns from <b> main_documents </b> can be used. ex: [id] as well as the <b> time variables </b>. ex: [date_now] or [hour_now]", "notificationTemplateTable": "<table style=\"border: 1pt solid #000000; width: 582px; height: 77px;\" border=\"1\" frame=\"box\" cellspacing=\"1\" cellpadding=\"5\">\n<tbody>\n<tr>\n<td><span style=\"font-family: arial,helvetica,sans-serif; font-size: small;\"><strong>Objet</strong></span></td>\n<td><span style=\"font-family: arial,helvetica,sans-serif; font-size: small;\"><strong>Liens</strong></span></td>\n</tr>\n{{rows}}\n</tbody>\n</table>", "notificationTemplateRow": "<tr>\n<td><span style=\"font-family: arial,helvetica,sans-serif; font-size: small;\">{{object}}</span></td>\n<td><span style=\"font-family: arial,helvetica,sans-serif;\"><a href=\"{{link}}\">Voir</a></span></td>\n</tr>", - "azure_samlConnection": "Azure SAML" + "azure_samlConnection": "Azure SAML", + "cannotSetSignature": "The user with the annotator role cannot pre-position a signature" } } \ No newline at end of file diff --git a/lang/fr.json b/lang/fr.json index 671b52422621bd3ced7a6f5f6af95246252b464f..288b7b9ea43b4552349a45e62afdb698269caf35 100755 --- a/lang/fr.json +++ b/lang/fr.json @@ -625,6 +625,7 @@ "signatureScaling": "Taux de mise à l'échelle du bloc de signature", "originaleize": "Taille originale", "scalingDocWith": "{{value}} % de la largeur du document", - "azure_samlConnection": "Azure SAML" + "azure_samlConnection": "Azure SAML", + "cannotSetSignature": "L'utilisateur avec le rôle annotateur ne peut pas pré-positionner une signature" } } diff --git a/src/frontend/app/indexation/indexation.component.ts b/src/frontend/app/indexation/indexation.component.ts index 54cc9dd1a1a41bb4e3a820b798ed3b5b883b284e..2ccbc33b751b182531cf527d2eb6aed9c76bd28c 100644 --- a/src/frontend/app/indexation/indexation.component.ts +++ b/src/frontend/app/indexation/indexation.component.ts @@ -352,17 +352,20 @@ export class IndexationComponent implements OnInit { } async signPos(index: number) { - if (this.appVisaWorkflow.getCurrentWorkflow().length > 0) { + if (this.appVisaWorkflow.getCurrentWorkflow().length === 1 && this.appVisaWorkflow.getCurrentWorkflow()[0].role === 'note') { + this.notificationService.error('lang.cannotSetSignature'); + } else if (this.appVisaWorkflow.getCurrentWorkflow().length > 0) { this.appVisaWorkflow.getCurrentWorkflow().forEach((user: any, indexUser: number) => { if (user.signaturePositions === undefined) { this.appVisaWorkflow.visaWorkflow[indexUser].signaturePositions = []; } }); + const currentWorkflow: any[] = this.appVisaWorkflow.getCurrentWorkflow().filter((user: any) => user.role !== 'note'); const modal = await this.modalController.create({ component: SignaturePositionComponent, cssClass: 'custom-alert-fullscreen', componentProps: { - 'workflow': this.appVisaWorkflow.getCurrentWorkflow(), + 'workflow': currentWorkflow, 'resource': this.filesToUpload[index], 'pdfContent': 'data:application/pdf;base64,' + this.filesToUpload[index].content, }