diff --git a/src/app/form/form-view/form-view.component.ts b/src/app/form/form-view/form-view.component.ts index 168cd76d926acbd24f20f6e4343ef7336abe3904..ac44e01834a9f6cf20ba93784c70c603a80deddc 100644 --- a/src/app/form/form-view/form-view.component.ts +++ b/src/app/form/form-view/form-view.component.ts @@ -412,6 +412,10 @@ export class FormViewComponent implements OnInit, AfterViewInit { structureName: this.structureForm.get('structureName').value, address: this.structureForm.get('address').value, }; + case structureFormStep.structureType: + return { + structureType: this.structureForm.get('structureType').value, + }; case structureFormStep.structureContact: return { contactPhone: this.structureForm.get('contactPhone').value, diff --git a/src/app/profile/structure-edition-summary/structure-edition-summary.component.html b/src/app/profile/structure-edition-summary/structure-edition-summary.component.html index 79d354b62a2d4f3a73faf1003fc4183dcbdb1651..caf119fa864993836a1551251c6f498472ecddf6 100644 --- a/src/app/profile/structure-edition-summary/structure-edition-summary.component.html +++ b/src/app/profile/structure-edition-summary/structure-edition-summary.component.html @@ -37,6 +37,28 @@ </div> </div> + <div class="section structureType"> + <div class="sectionHeader"> + <p>Type de structure</p> + <app-button + class="hide-on-mobile" + [text]="'Modifier'" + [style]="buttonTypeEnum.SecondaryWide" + [extraClass]="'editButton'" + (action)="goToEdit(structureFormStep.structureType)" + ></app-button> + <app-button + class="hide-on-desktop" + [iconBtn]="'edit'" + [style]="buttonTypeEnum.SecondaryOnlyIcon" + (action)="goToEdit(structureFormStep.structureType)" + ></app-button> + </div> + <div class="content"> + <p>{{ structure.structureType.category }} - {{ structure.getLabelTypeStructure() }}</p> + </div> + </div> + <div class="section phoneAndMail"> <div class="sectionHeader"> <p>Téléphone et email</p> diff --git a/src/app/utils/formUtils.ts b/src/app/utils/formUtils.ts index df9cf117a1b9e654184dc1260dd711329c46be82..56adeccf5b0a34ea667b67e4e36b54491dbecd42 100644 --- a/src/app/utils/formUtils.ts +++ b/src/app/utils/formUtils.ts @@ -71,7 +71,7 @@ export class formUtils { return new UntypedFormGroup({ _id: new UntypedFormControl(structure._id, Validators.required), coord: new UntypedFormControl(structure.coord), - structureType: new UntypedFormControl(structure.structureType, Validators.required), + structureType: new UntypedFormControl(structure.structureType?._id, Validators.required), structureName: new UntypedFormControl(structure.structureName, Validators.required), description: new UntypedFormControl(structure.description), lockdownActivity: new UntypedFormControl(structure.lockdownActivity),