Skip to content
Snippets Groups Projects

fix(form): fix issues

Merged Etienne LOUPIAS requested to merge fix/issues-form into V2.0
Files
3
@@ -97,9 +97,6 @@ export class FormViewComponent implements OnInit {
if (this.profile.structuresLink.length) {
// if register a new user as a new member structure, no structure to choose
this.isRegisterNewMember = true;
this.structureService.getStructure(this.profile.structuresLink[0]).subscribe((structure) => {
this.structure = new Structure(structure);
});
}
}
});
@@ -340,7 +337,10 @@ export class FormViewComponent implements OnInit {
// if register a new user as a new member structure, no structure to choose
if (this.isRegisterNewMember) {
if (this.profile.job && this.profile.job.hasPersonalOffer) {
this.router.navigateByUrl('form/personaloffer');
this.structureService.getStructure(this.profile.structuresLink[0]).subscribe((structure) => {
this.structure = new Structure(structure);
this.router.navigateByUrl('form/personaloffer');
});
} else {
this.router.navigateByUrl('/profile');
}
@@ -486,6 +486,7 @@ export class FormViewComponent implements OnInit {
const exitPages: stepType[] = [
structureFormStep.noStructure,
structureFormStep.structureCreationFinishedInfo,
structureFormStep.mailSentInfo,
profileFormStep.profileJobSelection,
personalOfferFormStep.personalOfferFinishedInfo,
];
@@ -496,7 +497,7 @@ export class FormViewComponent implements OnInit {
this.isEditMode ||
exitPages.includes(this.currentPage)
) {
return new Promise((resolve) => resolve(true));
return Promise.resolve(true);
} else {
return new Promise((resolve) => this.showModal(resolve));
}
Loading