Skip to content
Snippets Groups Projects
Commit 30e3a969 authored by Marlène SIMONDANT's avatar Marlène SIMONDANT
Browse files

feat(structure): edit structure type

parent e912b765
No related branches found
No related tags found
2 merge requests!425V2.1.1,!422feat/US189-edit-structure-type
......@@ -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,
......
......@@ -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>
......
......@@ -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),
......
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