Skip to content
Snippets Groups Projects
Commit 33ac319f authored by Hamza HRAMCHI's avatar Hamza HRAMCHI
Browse files

FEAT #16982 TIME 0:40 set otp avatar + add validators

parent 491e998c
No related branches found
No related tags found
No related merge requests found
......@@ -11,11 +11,8 @@
</ion-input>
</ion-item>
<ion-item>
<ion-label color="secondary" position="floating">{{'lang.phoneAlt' | translate}} <ng-container
*ngIf="otp.mode === 'sms'">*</ng-container>
</ion-label>
<ion-input name="phone" pattern="^\+?[1-9]\d{1,14}$" [(ngModel)]="otp.phone" placeholder="+33646342143" (keyup)="formatPhone($event)"
[required]="otp.mode === 'sms'"></ion-input>
<ion-label color="secondary" position="floating">{{'lang.phoneAlt' | translate}} *</ion-label>
<ion-input name="phone" pattern="^((\+)33)[1-9](\d{2}){4}$" [(ngModel)]="otp.phone" placeholder="+33646342143" required></ion-input>
</ion-item>
<ion-item>
<ion-label color="secondary" position="floating">{{'lang.email' | translate}} *
......
......@@ -131,8 +131,10 @@ export class VisaWorkflowComponent implements OnInit {
this.visaWorkflow.splice(index, 1);
}
getAvatarUser(index: number) {
if (this.visaWorkflow[index].userPicture === undefined && this.visaWorkflow[index].userDisplay !== '') {
async getAvatarUser(index: number) {
if (this.visaWorkflow[index].userId === null) {
this.visaWorkflow[index].userPicture = await this.otpService.getUserOtpIcon('yousign');
} else if (this.visaWorkflow[index].userPicture === undefined && this.visaWorkflow[index].userDisplay !== '') {
this.http.get('../rest/users/' + this.visaWorkflow[index].userId + '/picture').pipe(
tap((data: any) => {
this.visaWorkflow[index].userPicture = data.picture;
......@@ -291,6 +293,8 @@ export class VisaWorkflowComponent implements OnInit {
this.http.get(`../rest/workflowTemplates/${model.id}`).pipe(
tap((data: any) => {
const workflows: any[] = data.workflowTemplate.items.map((item: any) => {
console.log(item);
const obj: any = {
'userId': item.userId,
'userDisplay': item.userLabel,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment