From 7ac64fa2539ae9784da9b908aba556f44a444e8c Mon Sep 17 00:00:00 2001 From: Etienne LOUPIAS <eloupias@grandlyon.com> Date: Mon, 24 Oct 2022 15:39:50 +0200 Subject: [PATCH 1/4] fix issue 43 --- src/app/form/form-view/form-view.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/form/form-view/form-view.component.ts b/src/app/form/form-view/form-view.component.ts index e7e262de2..3e5f7acea 100644 --- a/src/app/form/form-view/form-view.component.ts +++ b/src/app/form/form-view/form-view.component.ts @@ -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'); } -- GitLab From 6b1f3143b1005b301a58987ab1132d334e61e40b Mon Sep 17 00:00:00 2001 From: Etienne LOUPIAS <eloupias@grandlyon.com> Date: Mon, 24 Oct 2022 15:40:54 +0200 Subject: [PATCH 2/4] fix issue 45 --- src/app/form/form-view/form-view.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/form/form-view/form-view.component.ts b/src/app/form/form-view/form-view.component.ts index 3e5f7acea..194e4a2b9 100644 --- a/src/app/form/form-view/form-view.component.ts +++ b/src/app/form/form-view/form-view.component.ts @@ -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)); } -- GitLab From fe8b8d4a315b750290e7d74101a583abcdbc6483 Mon Sep 17 00:00:00 2001 From: Etienne LOUPIAS <eloupias@grandlyon.com> Date: Mon, 24 Oct 2022 16:27:58 +0200 Subject: [PATCH 3/4] fix issue 36 --- src/app/utils/formUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/utils/formUtils.ts b/src/app/utils/formUtils.ts index fe7956267..b153d835e 100644 --- a/src/app/utils/formUtils.ts +++ b/src/app/utils/formUtils.ts @@ -79,7 +79,7 @@ export class formUtils { */ public createStructureForm(structure: Structure, isEditMode?: boolean): UntypedFormGroup { return new UntypedFormGroup({ - _id: new UntypedFormControl(structure._id), + _id: new UntypedFormControl(structure._id, Validators.required), coord: new UntypedFormControl(structure.coord), structureType: new UntypedFormControl(structure.structureType, Validators.required), structureName: new UntypedFormControl(structure.structureName, Validators.required), -- GitLab From 0b52639d360373db88f7bb88e55dec900890f069 Mon Sep 17 00:00:00 2001 From: Marlene Simondant <msimondant@grandlyon.com> Date: Tue, 25 Oct 2022 16:24:52 +0200 Subject: [PATCH 4/4] fix issue #44 --- .../structure-details/structure-details.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/structure-list/components/structure-details/structure-details.component.ts b/src/app/structure-list/components/structure-details/structure-details.component.ts index 4e55440ae..2fcc65449 100644 --- a/src/app/structure-list/components/structure-details/structure-details.component.ts +++ b/src/app/structure-list/components/structure-details/structure-details.component.ts @@ -404,8 +404,13 @@ export class StructureDetailsComponent implements OnInit { } public goToWebsite(): void { - window.open(this.structure.website, '_blank'); + let url = this.structure.website; + if (!url.startsWith('http')) { + url = 'https://' + url; + } + window.open(url, '_blank'); } + public displayJobEmployer(profile: User): string { return new Utils().getJobEmployer(profile); } -- GitLab