diff --git a/lang/en.json b/lang/en.json index ff804e70248807ce8c0cb22ccc8bbdf9f7f95ca1..dca28ffe3db2e1b296813009e250bfb1e48a14e5 100755 --- a/lang/en.json +++ b/lang/en.json @@ -524,6 +524,8 @@ "manage_customizationAdmin": "Customize the login page", "internalUserOtpMsg": "The other signature modes will no longer be available for <b> {{user}} </b> after validation.", "external": "External", - "otpSignaturePositionMandatory": "The signature position for external users is mandatory." + "otpSignaturePositionMandatory": "The signature position for external users is mandatory.", + "otp_visa_yousignProcessInfo": "Visa user (Yousign)", + "otp_sign_yousignProcessInfo": "Signatory (Yousign)" } -} \ No newline at end of file +} diff --git a/lang/fr.json b/lang/fr.json index a947792fdf355efc72bc304413fd89564d34b65e..3f0e535ec5d1abc0766ded4e4e7113a8bfe1ce81 100755 --- a/lang/fr.json +++ b/lang/fr.json @@ -521,8 +521,11 @@ "messageSaved": "Message enregistré", "manage_customizationAdmin": "Personnaliser la page de connexion", "internalUserOtpMsg": "Les autres modes de signatures ne seront plus disponibles pour <b>{{user}}</b> après validation.", - "externalUser": "Mode externe", + "externalUser": "Externe", "external": "Externe", - "otpSignaturePositionMandatory": "La position de signature pour les utilisateurs externes est obligatoire." + "otpSignaturePositionMandatory": "La position de signature pour les utilisateurs externes est obligatoire.", + "formatPhone": "Le numéro de téléphone doit commencer par son indicatif.", + "otp_visa_yousignProcessInfo": "Viseur (Yousign)", + "otp_sign_yousignProcessInfo": "Signataire (Yousign)" } } diff --git a/src/frontend/app/document/document.component.ts b/src/frontend/app/document/document.component.ts index 58a6dbf80974aeb3b49a7b4d078530e1957d533c..be897701440c58107a34be96c1de3181456bc1ec 100755 --- a/src/frontend/app/document/document.component.ts +++ b/src/frontend/app/document/document.component.ts @@ -313,10 +313,17 @@ export class DocumentComponent implements OnInit { this.hasWorkflowNotes = true; } item.signatureMode = item.userId === null && item.mode === 'sign' && item.signatureMode === 'stamp' ? 'sign' : item.signatureMode; + let modes = ['visa', 'sign'].concat(item.userSignatureModes); + if (item.signatureMode === 'otp_sign_yousign') { + modes = modes.concat(['otp_sign_yousign']); + } + if (item.signatureMode === 'otp_visa_yousign') { + modes = modes.concat(['otp_visa_yousign']); + } return { ...item, 'role': item.mode === 'visa' ? 'visa' : item.signatureMode, - 'modes': ['visa', 'sign'].concat(item.userSignatureModes) + 'modes': modes }; }); diff --git a/src/frontend/app/document/visa-workflow/otps/yousign/otp-yousign.component.html b/src/frontend/app/document/visa-workflow/otps/yousign/otp-yousign.component.html index 71a35e9730331fbc72f194c1710a9fcb288fe46a..98fa0a4e66bf725414f7318c66daca308b23268b 100644 --- a/src/frontend/app/document/visa-workflow/otps/yousign/otp-yousign.component.html +++ b/src/frontend/app/document/visa-workflow/otps/yousign/otp-yousign.component.html @@ -12,7 +12,8 @@ </ion-item> <ion-item> <ion-label color="secondary" position="floating">{{'lang.phoneAlt' | translate}} *</ion-label> - <ion-input name="phone" [pattern]="getRegexPhone()" [(ngModel)]="otp.phone" placeholder="+33646342143" required></ion-input> + <ion-input name="phone" (keyup)="formatPhone()" [pattern]="getRegexPhone()" [(ngModel)]="otp.phone" placeholder="+33646342143" required></ion-input> + <ion-note style="font-size: 10px;padding: 5px;">{{ 'lang.formatPhone' | translate }}</ion-note> </ion-item> <ion-item> <ion-label color="secondary" position="floating">{{'lang.email' | translate}} * diff --git a/src/frontend/app/document/visa-workflow/otps/yousign/otp-yousign.component.ts b/src/frontend/app/document/visa-workflow/otps/yousign/otp-yousign.component.ts index 69e950f81618c18fc30b851d3bbe496bb4f6965d..107b1a2872a979921c0a4a16dc0293bfb0860677 100644 --- a/src/frontend/app/document/visa-workflow/otps/yousign/otp-yousign.component.ts +++ b/src/frontend/app/document/visa-workflow/otps/yousign/otp-yousign.component.ts @@ -75,6 +75,7 @@ export class OtpYousignComponent implements OnInit { } getData() { + this.formatPhone(); return this.otp; } diff --git a/src/frontend/app/document/visa-workflow/visa-workflow.component.ts b/src/frontend/app/document/visa-workflow/visa-workflow.component.ts index f14c4cae0cfcb2c4ada4961bcd4ef6de55aa7723..8406f985daa9e1e8edd1a46aa627164945da2cf0 100644 --- a/src/frontend/app/document/visa-workflow/visa-workflow.component.ts +++ b/src/frontend/app/document/visa-workflow/visa-workflow.component.ts @@ -179,8 +179,7 @@ export class VisaWorkflowComponent implements OnInit { security: item.otp.security, sourceId: item.otp.sourceId, type: item.otp.type, - role: item.role, - modes: item.otp.modes + role: item.role }; } const modal = await this.modalController.create({ @@ -228,8 +227,7 @@ export class VisaWorkflowComponent implements OnInit { firstname: data.user.firstname, lastname: data.user.lastname, email: data.user.email, - phone: data.user.phone, - modes: [] + phone: data.user.phone }); }), catchError(err => { @@ -343,8 +341,7 @@ export class VisaWorkflowComponent implements OnInit { security: item.externalInformations.informations ? item.externalInformations.informations.security : item.externalInformations.security, sourceId: item.externalInformations.external_signatory_book_id, type: item.externalInformations.informations ? item.externalInformations.informations.type : item.externalInformations.type, - role: item.role !== undefined ? item.role : item.mode, - modes: ['visa', 'sign'] + role: item.role !== undefined ? item.role : item.mode }, userId: null, userDisplay: `${item.externalInformations.firstname} ${item.externalInformations.lastname}`, @@ -352,7 +349,6 @@ export class VisaWorkflowComponent implements OnInit { role: item.role, processDate: null, current: false, - modes: ['visa', 'sign'], }; const connectorIds: any = await this.getConnectors(); if (connectorIds.indexOf(objToSend.otp.sourceId) === -1) { diff --git a/src/frontend/app/login/login.component.ts b/src/frontend/app/login/login.component.ts index 8c0540d49b7a48293fcbc472cfab72b3158e25c6..4e5fdf3e02b5aeca2fccfc8361307a6103314cbf 100644 --- a/src/frontend/app/login/login.component.ts +++ b/src/frontend/app/login/login.component.ts @@ -51,7 +51,7 @@ export class LoginComponent implements OnInit, AfterViewInit { this.environment = environment; this.signaturesService.reset(); - await this.loadCommitInformation(); + await this.loadCommitInformation(); } ionViewWillEnter() {