diff --git a/src/app/form/form.component.html b/src/app/form/form.component.html index 5323073aaf29056a861acd09bae24c6007df99ca..fc6389b2e90e3aaa79e6c5f6f3e833c83909e762 100644 --- a/src/app/form/form.component.html +++ b/src/app/form/form.component.html @@ -445,6 +445,23 @@ [isEditMode]="!isEditMode" ></app-hour-picker> </div> + <div *ngIf="currentPage == 8" class="page"> + <div class="title"> + <h3>Avez-vous des précisions à apporter sur les horaires ?</h3> + <p class="notRequired">facultatif</p> + </div> + <div class="textareaBlock" fxLayout="column"> + <textarea + rows="8" + placeholder="Exemple : nous ne sommes ouvert que le 1er mercredi du mois." + maxlength="500" + formControlName="description" + ></textarea> + <p> + {{ getStructureControl('description').value ? getStructureControl('description').value.length : 0 }}/500 + </p> + </div> + </div> </form> </div> <div diff --git a/src/app/form/form.component.scss b/src/app/form/form.component.scss index f3b0feea55f1cff6c7ddfc31a3c6ffe0104a83ba..6f033f4149f64831fcef6b51c98f894e60c3e782 100644 --- a/src/app/form/form.component.scss +++ b/src/app/form/form.component.scss @@ -111,6 +111,26 @@ $progressBar-height: 50px; margin-top: 10px; margin-bottom: 0; @include cn-regular-18; + + &.notRequired { + font-style: italic; + color: $secondary-color; + } + } + .textareaBlock { + max-width: 90%; + + textarea { + padding: 13px 8px; + background: $grey-6; + border: 1px solid $grey-4; + border-radius: 4px; + resize: none; + @include cn-regular-16; + } + p { + text-align: right; + } } } diff --git a/src/app/form/form.component.ts b/src/app/form/form.component.ts index 3b4aea128e5f33cbe30a9717c2a3ad90a7f9329c..a9c98ed3d2423c217aa15380d93462cde916c623 100644 --- a/src/app/form/form.component.ts +++ b/src/app/form/form.component.ts @@ -45,7 +45,7 @@ export class FormComponent implements OnInit { public structureId: string; //New var form - public currentPage = 7; + public currentPage = 8; public progressStatus = 0; public nbPagesForm = 13; public accountForm: FormGroup; @@ -129,7 +129,7 @@ export class FormComponent implements OnInit { structureType: new FormControl(structure.structureType, Validators.required), structureName: new FormControl(structure.structureName, Validators.required), structureRepresentation: new FormControl(structure.structureRepresentation, Validators.required), - description: new FormControl(structure.description, Validators.required), + description: new FormControl(structure.description), lockdownActivity: new FormControl(structure.lockdownActivity), address: new FormGroup({ numero: new FormControl(structure.address.numero), @@ -303,6 +303,7 @@ export class FormComponent implements OnInit { this.pagesValidation[5] = { valid: this.getStructureControl('structureType').valid }; this.pagesValidation[6] = { valid: this.getStructureControl('accessModality').valid }; this.pagesValidation[7] = { valid: this.hoursForm.valid }; + this.pagesValidation[8] = { valid: this.getStructureControl('description').valid }; this.updatePageValid(); }