Fix manage stakeholders loading stuck in case of session expired.
This commit is contained in:
parent
c1bc7b6a5a
commit
a9a0452632
|
@ -170,12 +170,17 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
}));
|
||||
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
|
||||
this.user = user;
|
||||
if (user) {
|
||||
this.user = user;
|
||||
this.buildMenu();
|
||||
if (!this.notificationGroupsInitialized) {
|
||||
this.setNotificationGroups();
|
||||
}
|
||||
} else if(this.user) {
|
||||
this.user = user;
|
||||
this.buildMenu();
|
||||
this.notificationGroupsInitialized = false;
|
||||
this.notificationGroups = [];
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -86,6 +86,8 @@ export class ManageStakeholdersComponent implements OnInit, OnDestroy {
|
|||
this.displayStakeholders = res[1];
|
||||
this.alias = res[2];
|
||||
this.loading = false;
|
||||
}, error => {
|
||||
this.loading = false;
|
||||
}));
|
||||
|
||||
this.subscriptions.push(UIkit.util.on(document, 'hidden', '#edit_modal', (): void => {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 2261f4ae6f8ea4a2d52aaf75c857e583bf913721
|
||||
Subproject commit fa919431d3be63fb4045d47083b3ba7cd6414e03
|
|
@ -27,8 +27,7 @@ export class AdminDashboardGuard implements CanActivate, CanActivateChild {
|
|||
check(path: string, alias: string): Observable<boolean> | boolean {
|
||||
let errorCode = LoginErrorCodes.NOT_LOGIN;
|
||||
return zip(
|
||||
this.userManagementService.getUserInfo(false)
|
||||
,this.stakeholderService.getStakeholder(alias)
|
||||
this.userManagementService.getUserInfo() ,this.stakeholderService.getStakeholder(alias)
|
||||
).pipe(take(1),map(res => {
|
||||
if(res[0]) {
|
||||
errorCode = LoginErrorCodes.NOT_ADMIN;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit eb5739ab8271aa71c8e58998ab88c61878f8788d
|
||||
Subproject commit f085a90973b216b89065848dba864e2d581acc84
|
Loading…
Reference in New Issue