From 4c62a043efb81c967bbfcf136fe8e2e26c8160e3 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Wed, 30 Sep 2026 08:30:15 +0200 Subject: [PATCH] Add refresh action --- .../user-detail-dialog.component.ts | 44 +++++++++++-------- .../user-detail-dialog.html | 4 ++ 2 files changed, 29 insertions(+), 19 deletions(-) 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 926fb8d8cd..8d12d0ba03 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 @@ -91,25 +91,7 @@ export class GfUserDetailDialogComponent implements OnInit { } public ngOnInit() { - this.adminService - .fetchUserById(this.data.userId) - .pipe( - takeUntilDestroyed(this.destroyRef), - catchError(() => { - this.dialogRef.close(); - - return EMPTY; - }) - ) - .subscribe((user) => { - this.user = user; - - this.subscriptionsDataSource.data = this.user.subscriptions ?? []; - - this.isLoading = false; - - this.changeDetectorRef.markForCheck(); - }); + this.initialize(); } protected deleteUser() { @@ -141,6 +123,30 @@ export class GfUserDetailDialogComponent implements OnInit { : $localize`Coupon`; } + protected initialize() { + this.isLoading = true; + + this.adminService + .fetchUserById(this.data.userId) + .pipe( + takeUntilDestroyed(this.destroyRef), + catchError(() => { + this.dialogRef.close(); + + return EMPTY; + }) + ) + .subscribe((user) => { + this.user = user; + + this.subscriptionsDataSource.data = this.user.subscriptions ?? []; + + this.isLoading = false; + + this.changeDetectorRef.markForCheck(); + }); + } + protected onClose() { this.dialogRef.close(); } diff --git a/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html b/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html index efc4fe5b43..4cc5b8a260 100644 --- a/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html +++ b/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html @@ -13,6 +13,10 @@ class="no-max-width" xPosition="before" > + +