From fb314c734a91885a00256febd3fbad95177e15ed Mon Sep 17 00:00:00 2001 From: Marlene Simondant <msimondant@grandlyon.com> Date: Wed, 19 Mar 2025 17:50:51 +0100 Subject: [PATCH] Hash fragment to manage the context for links in emails --- .../orientation-details/orientation-details.component.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/profile/dashboard/orientation-details/orientation-details.component.ts b/src/app/profile/dashboard/orientation-details/orientation-details.component.ts index 7d2946bc5..1f77c9b7f 100644 --- a/src/app/profile/dashboard/orientation-details/orientation-details.component.ts +++ b/src/app/profile/dashboard/orientation-details/orientation-details.component.ts @@ -53,6 +53,12 @@ export class OrientationDetailsComponent implements OnInit { } }); + // if coming from the email (with a URL like /details-orientation/[orientationID]#to) + const hash = this.router.parseUrl(this.router.url).fragment; + if (hash === 'to') { + this.from = 'todoOrientations'; + } + this.profileService.getProfile().then((profile) => { this.userProfile = new User(profile); }); -- GitLab