From 0e82b75cce7bebc144d9a5f98f2575c112e93521 Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Wed, 27 Jan 2021 09:25:09 +0100 Subject: [PATCH] fix(form): add page(isPassNumeric) --- src/app/form/form.component.html | 10 ++++++++++ src/app/form/form.component.ts | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/app/form/form.component.html b/src/app/form/form.component.html index f0c150208..7084ec44f 100644 --- a/src/app/form/form.component.html +++ b/src/app/form/form.component.html @@ -928,6 +928,16 @@ </div> </ng-container> </div> + <div *ngIf="currentPage == 17" class="page"> + <div class="title"> + <h3>Acceptez-vous le Pass numérique APTIC ?</h3> + </div> + <app-radio-form + [selectedOption]="isInArray('passNumerique', 'labelsQualifications')" + (selectedEvent)="updateChoice('passNumerique', 'labelsQualifications')" + > + </app-radio-form> + </div> </form> </div> <div diff --git a/src/app/form/form.component.ts b/src/app/form/form.component.ts index 2dc5cc06b..af0c6f70f 100644 --- a/src/app/form/form.component.ts +++ b/src/app/form/form.component.ts @@ -48,7 +48,7 @@ export class FormComponent implements OnInit { public structureId: string; //New var form - public currentPage = 14; + public currentPage = 17; public progressStatus = 0; public nbPagesForm = 20; public accountForm: FormGroup; @@ -275,7 +275,7 @@ export class FormComponent implements OnInit { } // Check if a FormControl value is in FormArray - public isInArray(term: string, formControlName): boolean { + public isInArray(term: string, formControlName: string): boolean { if (this.structureForm.controls[formControlName].value) { return this.structureForm.controls[formControlName].value.includes(term); } @@ -366,6 +366,7 @@ export class FormComponent implements OnInit { this.getStructureControl('nbTablets').valid && this.getStructureControl('nbNumericTerminal').valid, }; + this.pagesValidation[17] = { valid: this.getStructureControl('labelsQualifications').valid }; this.updatePageValid(); } -- GitLab