Skip to content

Commit

Permalink
test via CLs
Browse files Browse the repository at this point in the history
  • Loading branch information
illfixit committed Nov 26, 2024
1 parent 6dfbf4d commit 91a1013
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions authority-portal-frontend/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export class GlobalStateImpl implements NgxsOnInit {
newUserInfo: Fetched<UserInfo>,
) {
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export class RouteConfigService {
) {}

decidePageSet(userInfoFetched: Fetched<UserInfo>): AuthorityPortalPageSet {
console.log('RouteConfigService: decidePageSet');
if (!userInfoFetched.isReady) {
return 'LOADING';
}
Expand All @@ -77,6 +78,7 @@ export class RouteConfigService {
previousPageSet: AuthorityPortalPageSet,
nextPageSet: AuthorityPortalPageSet,
) {
console.log('RouteConfigService: switchRouteConfig');
if (previousPageSet == nextPageSet) {
return;
}
Expand Down Expand Up @@ -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', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 91a1013

Please sign in to comment.