diff --git a/src/app/form/form.component.html b/src/app/form/form.component.html index fcac2706492f309a3ca2db1b08c6b8f027b45e1b..d495e9ef1055b9eb7e2c8833baefb8d0b68e7009 100644 --- a/src/app/form/form.component.html +++ b/src/app/form/form.component.html @@ -4,7 +4,7 @@ [content]="'Il vous faudra de nouveau remplir le formulaire si vous quittez'" (closed)="hasRedirectionAccepted($event)" ></app-modal-confirmation> - <div class="content" [ngClass]="{ editMode: isEditMode }"> + <div class="content" *ngIf="!isLoading" [ngClass]="{ editMode: isEditMode }"> <div class="returnBtnSection" *ngIf="isEditMode && currentPage != 0"> <button class="btn-primary previous" (click)="goToSpecificPage(0, false)"> <div class="rowBtn" fxLayout="row" fxLayoutAlign="center center"> diff --git a/src/app/form/form.component.ts b/src/app/form/form.component.ts index 55847505af9520a871233dd152cc2a26fa5cd983..94fc88cb68ab136a1b3a799c245a11305b839ccb 100644 --- a/src/app/form/form.component.ts +++ b/src/app/form/form.component.ts @@ -62,6 +62,7 @@ export class FormComponent implements OnInit { public userAcceptSavedDate = false; public showMenu = false; public isEditMode = false; + public isLoading = false; constructor( private structureService: StructureService, @@ -72,11 +73,13 @@ export class FormComponent implements OnInit { ) {} async ngOnInit(): Promise<void> { + this.isLoading = true; this.profileService.getProfile().then((user: User) => { this.profile = user; }); await this.setCategories(); // Check if it's a new structure or edit structure + this.isLoading = false; if (history.state.data) { this.isEditMode = true; this.initForm(new Structure(history.state.data));