Skip to content
Snippets Groups Projects
Commit f959d459 authored by Augustin LECONTE's avatar Augustin LECONTE
Browse files

fix(structure-form): add missing info alert in structure modification categories

parents 813fdc0e f03fd00b
No related branches found
No related tags found
2 merge requests!187Dev,!184fix/structure-missing-infos-alert
...@@ -410,6 +410,18 @@ ...@@ -410,6 +410,18 @@
<div class="title"> <div class="title">
<h3>Quelle structure voulez-vous réferencer ?</h3> <h3>Quelle structure voulez-vous réferencer ?</h3>
</div> </div>
<p
class="missing-information"
*ngIf="isEditMode && (!getStructureControl('structureName').valid || !getStructureControl('address').valid)"
>
<app-svg-icon
[iconClass]="'validation'"
[type]="'form'"
[icon]="'notValidate'"
class="validationIcon"
></app-svg-icon>
<span>Il faut renseigner tous les champs</span>
</p>
<div class="form-group" fxLayout="column"> <div class="form-group" fxLayout="column">
<label for="structureName">Nom de la structure</label> <label for="structureName">Nom de la structure</label>
<div fxLayout="row" fxLayoutGap="13px"> <div fxLayout="row" fxLayoutGap="13px">
...@@ -450,6 +462,20 @@ ...@@ -450,6 +462,20 @@
<div class="title"> <div class="title">
<h3>Comment joindre votre structure ?</h3> <h3>Comment joindre votre structure ?</h3>
</div> </div>
<p
class="missing-information"
*ngIf="
isEditMode && (!getStructureControl('contactPhone').valid || !getStructureControl('contactMail').valid)
"
>
<app-svg-icon
[iconClass]="'validation'"
[type]="'form'"
[icon]="'notValidate'"
class="validationIcon"
></app-svg-icon>
<span>Il faut renseigner tous les champs</span>
</p>
<div class="form-group" fxLayout="column"> <div class="form-group" fxLayout="column">
<label for="contactPhone">Téléphone de la structure</label> <label for="contactPhone">Téléphone de la structure</label>
<div fxLayout="row" fxLayoutGap="13px"> <div fxLayout="row" fxLayoutGap="13px">
...@@ -497,6 +523,15 @@ ...@@ -497,6 +523,15 @@
<h3>Quel type de structure ?</h3> <h3>Quel type de structure ?</h3>
<p>1 seul choix possible</p> <p>1 seul choix possible</p>
</div> </div>
<p class="missing-information" *ngIf="isEditMode && !getStructureControl('structureType').valid">
<app-svg-icon
[iconClass]="'validation'"
[type]="'form'"
[icon]="'notValidate'"
class="validationIcon"
></app-svg-icon>
<span>Il faut renseigner un champ</span>
</p>
<div class="type-picker"> <div class="type-picker">
<app-structure-type-picker <app-structure-type-picker
[pickedChoice]=" [pickedChoice]="
...@@ -511,6 +546,15 @@ ...@@ -511,6 +546,15 @@
<h3>Quelles sont les modalités d'accueil ?</h3> <h3>Quelles sont les modalités d'accueil ?</h3>
<p>Plusieurs choix possibles</p> <p>Plusieurs choix possibles</p>
</div> </div>
<p class="missing-information" *ngIf="isEditMode && !getStructureControl('accessModality').valid">
<app-svg-icon
[iconClass]="'validation'"
[type]="'form'"
[icon]="'notValidate'"
class="validationIcon"
></app-svg-icon>
<span>Il faut renseigner au moins un champ</span>
</p>
<div *ngIf="accessModality" fxLayout="row wrap" fxLayoutGap="16px" fxLayoutAlign="flex-start"> <div *ngIf="accessModality" fxLayout="row wrap" fxLayoutGap="16px" fxLayoutAlign="flex-start">
<app-checkbox-form <app-checkbox-form
*ngFor="let module of accessModality.modules" *ngFor="let module of accessModality.modules"
...@@ -561,6 +605,15 @@ ...@@ -561,6 +605,15 @@
<div class="title"> <div class="title">
<h3>Est-ce accessible pour les personnes à mobilité réduite ?</h3> <h3>Est-ce accessible pour les personnes à mobilité réduite ?</h3>
</div> </div>
<p class="missing-information" *ngIf="isEditMode && !getStructureControl('pmrAccess').valid">
<app-svg-icon
[iconClass]="'validation'"
[type]="'form'"
[icon]="'notValidate'"
class="validationIcon"
></app-svg-icon>
<span>Il faut renseigner un champ</span>
</p>
<app-radio-form <app-radio-form
[selectedOption]="getStructureControl('pmrAccess').value" [selectedOption]="getStructureControl('pmrAccess').value"
(selectedEvent)="onRadioBtnChange('pmrAccess', $event)" (selectedEvent)="onRadioBtnChange('pmrAccess', $event)"
...@@ -767,6 +820,15 @@ ...@@ -767,6 +820,15 @@
<h3>Quel public peut venir vous consulter ?</h3> <h3>Quel public peut venir vous consulter ?</h3>
<p>Plusieurs choix possibles</p> <p>Plusieurs choix possibles</p>
</div> </div>
<p class="missing-information" *ngIf="isEditMode && !getStructureControl('publics').valid">
<app-svg-icon
[iconClass]="'validation'"
[type]="'form'"
[icon]="'notValidate'"
class="validationIcon"
></app-svg-icon>
<span>Il faut renseigner au moins un champ</span>
</p>
<div class="tags" *ngIf="publics"> <div class="tags" *ngIf="publics">
<button <button
*ngFor="let choice of publics.modules" *ngFor="let choice of publics.modules"
...@@ -887,6 +949,15 @@ ...@@ -887,6 +949,15 @@
<div class="title"> <div class="title">
<h3>Proposez vous un accompagnement à distance ?</h3> <h3>Proposez vous un accompagnement à distance ?</h3>
</div> </div>
<p class="missing-information" *ngIf="isEditMode && !getStructureControl('remoteAccompaniment').valid">
<app-svg-icon
[iconClass]="'validation'"
[type]="'form'"
[icon]="'notValidate'"
class="validationIcon"
></app-svg-icon>
<span>Il faut renseigner un champ</span>
</p>
<app-radio-form <app-radio-form
[selectedOption]="getStructureControl('remoteAccompaniment').value" [selectedOption]="getStructureControl('remoteAccompaniment').value"
(selectedEvent)="onRadioBtnChange('remoteAccompaniment', $event)" (selectedEvent)="onRadioBtnChange('remoteAccompaniment', $event)"
......
...@@ -576,3 +576,12 @@ img { ...@@ -576,3 +576,12 @@ img {
.section { .section {
padding-bottom: 2rem; padding-bottom: 2rem;
} }
.missing-information {
display: flex;
color: $orange-warning;
span {
margin-top: 12px;
margin-left: 1%;
}
}
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