From 0daf9796c77a88fc1b70750959fb3b9e12ac28de Mon Sep 17 00:00:00 2001 From: Aram Al-Sabti Date: Tue, 31 May 2022 11:31:59 +0200 Subject: [PATCH 1/2] Format welcome dialog --- .../applications-list/applications-list.component.ts | 9 ++++++++- .../welcome-dialog/welcome-dialog.component.html | 7 +++---- .../welcome-dialog/welcome-dialog.component.scss | 7 +++---- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/app/applications/applications-list/applications-list.component.ts b/src/app/applications/applications-list/applications-list.component.ts index 52f1545a..ee94f1e0 100644 --- a/src/app/applications/applications-list/applications-list.component.ts +++ b/src/app/applications/applications-list/applications-list.component.ts @@ -93,7 +93,7 @@ export class ApplicationsListComponent implements OnInit { }); } else { // Clear the URL from the parameter - this.router.navigate(['/applications']); + this.router.navigate(['/applications'], { replaceUrl: true }); } } else { const error = params['error']; @@ -139,6 +139,13 @@ export class ApplicationsListComponent implements OnInit { hasSomePermission: this.hasSomePermission, } as WelcomeDialogModel, }); + + if (!this.hasSomePermission) { + // In case a previous .navigate() was fired, ensure this is called after + setTimeout(() => { + this.router.navigate(['/user-page'], { replaceUrl: true }); + }); + } } if (this.hasSomePermission) { diff --git a/src/app/shared/components/welcome-dialog/welcome-dialog.component.html b/src/app/shared/components/welcome-dialog/welcome-dialog.component.html index ffe1170f..b965a1d1 100644 --- a/src/app/shared/components/welcome-dialog/welcome-dialog.component.html +++ b/src/app/shared/components/welcome-dialog/welcome-dialog.component.html @@ -3,10 +3,10 @@
-

+

{{'WELCOME-DIALOG.WELCOME' | translate}} -

-

{{ (dialogModel?.hasSomePermission ? 'WELCOME-DIALOG.WELCOME-SUB' : 'WELCOME-DIALOG.NO-ACCESS') | translate}}

+ +

{{ (dialogModel?.hasSomePermission ? 'WELCOME-DIALOG.WELCOME-SUB' : 'WELCOME-DIALOG.NO-ACCESS') | translate}}

{{'WELCOME-DIALOG.SUB-HEADER-1' | translate}}

@@ -33,7 +33,6 @@

{{ (dialogModel?.hasSomePermission ? 'WELCOME-DIALOG.WELCOME-SUB' : 'WELCOME -

Date: Tue, 31 May 2022 15:23:54 +0200 Subject: [PATCH 2/2] Show all requested users for user admins --- .../accept-user/accept-user.component.html | 27 ++++++-------- .../accept-user/accept-user.component.ts | 3 ++ .../awaiting-users-table.component.html | 4 +-- .../awaiting-users-table.component.ts | 35 ++++++++++++------- .../users/user-page/user-page.component.ts | 17 +++------ src/app/admin/users/user.model.ts | 7 +++- src/app/admin/users/user.service.ts | 27 +++++++------- src/assets/i18n/da.json | 3 +- 8 files changed, 66 insertions(+), 57 deletions(-) diff --git a/src/app/admin/users/accept-user/accept-user.component.html b/src/app/admin/users/accept-user/accept-user.component.html index 69e7c61a..45aafb4a 100644 --- a/src/app/admin/users/accept-user/accept-user.component.html +++ b/src/app/admin/users/accept-user/accept-user.component.html @@ -1,8 +1,5 @@
- +
@@ -19,32 +16,28 @@

{{ 'USERS.ACCEPT-USER.QUESTION-ACCEPT' | translate }} {{ user.name }} + + {{ 'USERS.ACCEPT-USER.IN-ORGANIZATION' | translate }} + {{ organizationName}} +

* - * + + [placeholder]="'PERMISSION.EDIT.TYPE-PLACEHOLDER' | translate" [multiple]="true"> {{ permission.name }}
-