From 91a1013f193b80e80fb13d0a24f9a16a14e9cb5e Mon Sep 17 00:00:00 2001 From: illfixit <66363651+illfixit@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:27:01 +0100 Subject: [PATCH] test via CLs --- authority-portal-frontend/src/app/app-routing.module.ts | 1 + .../src/app/core/global-state/global-state-impl.ts | 1 + .../src/app/core/global-state/routes/route-config-service.ts | 3 +++ .../app/core/global-state/routes/url-before-login.service.ts | 2 ++ 4 files changed, 7 insertions(+) diff --git a/authority-portal-frontend/src/app/app-routing.module.ts b/authority-portal-frontend/src/app/app-routing.module.ts index 6bf29ec55..e065379ab 100644 --- a/authority-portal-frontend/src/app/app-routing.module.ts +++ b/authority-portal-frontend/src/app/app-routing.module.ts @@ -93,6 +93,7 @@ const REDIRECT_TO_HOME: string[] = [ ]; const getProperRedirectUrl = (fallbackUrl: string) => { + console.log('app-routing module: getProperRedirectUrl'); const url = localStorage.getItem('originalUrl') || fallbackUrl; localStorage.removeItem('originalUrl'); return url; diff --git a/authority-portal-frontend/src/app/core/global-state/global-state-impl.ts b/authority-portal-frontend/src/app/core/global-state/global-state-impl.ts index e2fbfaf57..39ed9a73b 100644 --- a/authority-portal-frontend/src/app/core/global-state/global-state-impl.ts +++ b/authority-portal-frontend/src/app/core/global-state/global-state-impl.ts @@ -111,6 +111,7 @@ export class GlobalStateImpl implements NgxsOnInit { newUserInfo: Fetched, ) { patchState(ctx, (state) => { + console.log('global-state-impl.ts: onUserInfoRefreshed -> patchState'); let userInfo = state.userInfo.mergeIfReady(newUserInfo); // Update Routes in when user status has changed diff --git a/authority-portal-frontend/src/app/core/global-state/routes/route-config-service.ts b/authority-portal-frontend/src/app/core/global-state/routes/route-config-service.ts index 6103dfa77..5607a6d7c 100644 --- a/authority-portal-frontend/src/app/core/global-state/routes/route-config-service.ts +++ b/authority-portal-frontend/src/app/core/global-state/routes/route-config-service.ts @@ -51,6 +51,7 @@ export class RouteConfigService { ) {} decidePageSet(userInfoFetched: Fetched): AuthorityPortalPageSet { + console.log('RouteConfigService: decidePageSet'); if (!userInfoFetched.isReady) { return 'LOADING'; } @@ -77,6 +78,7 @@ export class RouteConfigService { previousPageSet: AuthorityPortalPageSet, nextPageSet: AuthorityPortalPageSet, ) { + console.log('RouteConfigService: switchRouteConfig'); if (previousPageSet == nextPageSet) { return; } @@ -117,6 +119,7 @@ export class RouteConfigService { } forceRefreshCurrentRoute() { + console.log('RouteConfigService: forceRefreshCurrentRoute'); const currentUrl = this.router.url; this.router .navigateByUrl('/random-redirect-for-force-refresh', { diff --git a/authority-portal-frontend/src/app/core/global-state/routes/url-before-login.service.ts b/authority-portal-frontend/src/app/core/global-state/routes/url-before-login.service.ts index fef3a6f3d..540ca71b6 100644 --- a/authority-portal-frontend/src/app/core/global-state/routes/url-before-login.service.ts +++ b/authority-portal-frontend/src/app/core/global-state/routes/url-before-login.service.ts @@ -29,11 +29,13 @@ export class UrlBeforeLoginService { } public clearOriginalUrl(): void { + console.log('UrlBeforeLoginService: clearOriginalUrl'); this.originalUrl = ''; localStorage.removeItem('originalUrl'); } public goToOriginalUrl(): void { + console.log('UrlBeforeLoginService: goToOriginalUrl'); if (this.originalUrl) { this.router.navigateByUrl(this.originalUrl); this.clearOriginalUrl();