From bcb1fe61e06f8f0742772c2983011233a5ddc933 Mon Sep 17 00:00:00 2001 From: Etienne LOUPIAS <eloupias@grandlyon.com> Date: Tue, 18 Oct 2022 15:20:07 +0200 Subject: [PATCH] fix(carto): redirect to carto after structure close --- .../training-type-picker/training-type-picker.component.ts | 1 - .../structure-details/structure-details.component.ts | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/shared/components/training-type-picker/training-type-picker.component.ts b/src/app/shared/components/training-type-picker/training-type-picker.component.ts index 78019ef2d..51b4c168a 100644 --- a/src/app/shared/components/training-type-picker/training-type-picker.component.ts +++ b/src/app/shared/components/training-type-picker/training-type-picker.component.ts @@ -53,7 +53,6 @@ export class TrainingTypePickerComponent implements OnInit { } cat.modules = cat.modules.filter((module) => selectedModulesId.includes(module.id)); }); - console.log('MOUNT ', this.selectedChoices); }); } 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 e7375bc58..4e55440ae 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 @@ -188,6 +188,10 @@ export class StructureDetailsComponent implements OnInit { } public close(): void { + if (this.router.url.startsWith('/acteurs')) { + this.router.navigateByUrl('/acteurs'); + return; + } this.route.url.subscribe((urls) => { if (urls.length > 0 && urls[0].path !== 'orientation') { this.router.navigate(['/acteurs'], { -- GitLab