From 0f06e0adbf59835bc866f61ee169eec7b52b1554 Mon Sep 17 00:00:00 2001 From: Karel De Smet Date: Sun, 1 Feb 2026 21:58:28 +0100 Subject: [PATCH] Fix PR comments --- CHANGELOG.md | 1 + .../app/components/admin-users/admin-users.component.ts | 8 ++++---- .../user-detail-dialog/interfaces/interfaces.ts | 2 +- .../user-detail-dialog/user-detail-dialog.component.ts | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7805ad11d..5ed6ae27b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Upgraded `angular` from version `21.0.6` to `21.1.1` - Upgraded `Nx` from version `22.3.3` to `22.4.1` - Upgraded `prettier` from version `3.8.0` to `3.8.1` +- Extended the user detail dialog with an actions menu ## 2.233.0 - 2026-01-23 diff --git a/apps/client/src/app/components/admin-users/admin-users.component.ts b/apps/client/src/app/components/admin-users/admin-users.component.ts index db984392a..f5333fabf 100644 --- a/apps/client/src/app/components/admin-users/admin-users.component.ts +++ b/apps/client/src/app/components/admin-users/admin-users.component.ts @@ -208,7 +208,7 @@ export class GfAdminUsersComponent implements OnDestroy, OnInit { .deleteUser(aId) .pipe(takeUntil(this.unsubscribeSubject)) .subscribe(() => { - this.fetchUsers(); + this.router.navigate(['..'], { relativeTo: this.route }); }); }, confirmType: ConfirmationDialogType.Warn, @@ -293,11 +293,11 @@ export class GfAdminUsersComponent implements OnDestroy, OnInit { >(GfUserDetailDialogComponent, { autoFocus: false, data: { + currentUserId: this.user?.id, deviceType: this.deviceType, hasPermissionForSubscription: this.hasPermissionForSubscription, locale: this.user?.settings?.locale, - userId: aUserId, - currentUserId: this.user?.id + userId: aUserId }, height: this.deviceType === 'mobile' ? '98vh' : '60vh', width: this.deviceType === 'mobile' ? '100vw' : '50rem' @@ -307,7 +307,7 @@ export class GfAdminUsersComponent implements OnDestroy, OnInit { .afterClosed() .pipe(takeUntil(this.unsubscribeSubject)) .subscribe((data) => { - if (data?.userId) { + if (data?.action === 'delete' && data?.userId) { this.onDeleteUser(data.userId); } else { this.router.navigate( diff --git a/apps/client/src/app/components/user-detail-dialog/interfaces/interfaces.ts b/apps/client/src/app/components/user-detail-dialog/interfaces/interfaces.ts index c2b3e2ecd..ed46e8a02 100644 --- a/apps/client/src/app/components/user-detail-dialog/interfaces/interfaces.ts +++ b/apps/client/src/app/components/user-detail-dialog/interfaces/interfaces.ts @@ -1,7 +1,7 @@ export interface UserDetailDialogParams { + currentUserId: string; deviceType: string; hasPermissionForSubscription: boolean; locale: string; userId: string; - currentUserId: string; } diff --git a/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.component.ts b/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.component.ts index 60bec57fe..cf25a7b62 100644 --- a/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.component.ts +++ b/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.component.ts @@ -74,7 +74,8 @@ export class GfUserDetailDialogComponent implements OnDestroy, OnInit { public deleteUser() { this.dialogRef.close({ - userId: this.data.userId + userId: this.data.userId, + action: 'delete' }); }