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 2aa741699..33ed61ae3 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 @@ -4,6 +4,7 @@ import { GfValueComponent } from '@ghostfolio/ui/value'; import { CommonModule } from '@angular/common'; import { ChangeDetectionStrategy, + ChangeDetectorRef, Component, CUSTOM_ELEMENTS_SCHEMA, Inject, @@ -14,9 +15,8 @@ import { MatButtonModule } from '@angular/material/button'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { MatDialogModule } from '@angular/material/dialog'; import { EMPTY, Subject } from 'rxjs'; -import { catchError, finalize, takeUntil } from 'rxjs/operators'; +import { catchError, takeUntil } from 'rxjs/operators'; -import { NotificationService } from '../../core/notification/notification.service'; import { AdminService } from '../../services/admin.service'; import { GfDialogFooterComponent } from '../dialog-footer/dialog-footer.component'; import { GfDialogHeaderComponent } from '../dialog-header/dialog-header.component'; @@ -39,15 +39,14 @@ import { UserDetailDialogParams } from './interfaces/interfaces'; templateUrl: './user-detail-dialog.html' }) export class GfUserDetailDialogComponent implements OnDestroy, OnInit { - public isLoading = true; public user: AdminUserResponse; private unsubscribeSubject = new Subject(); public constructor( - @Inject(MAT_DIALOG_DATA) public data: UserDetailDialogParams, private adminService: AdminService, - private notificationService: NotificationService, + private changeDetectorRef: ChangeDetectorRef, + @Inject(MAT_DIALOG_DATA) public data: UserDetailDialogParams, public dialogRef: MatDialogRef ) {} @@ -57,19 +56,15 @@ export class GfUserDetailDialogComponent implements OnDestroy, OnInit { .pipe( takeUntil(this.unsubscribeSubject), catchError(() => { - this.notificationService.alert({ - title: $localize`User`, - message: $localize`Unable to load user` - }); - this.dialogRef.close(); return EMPTY; - }), - finalize(() => (this.isLoading = false)) + }) ) .subscribe((user) => { this.user = user; + + this.changeDetectorRef.markForCheck(); }); } 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 588407cb4..fd7ad162b 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 @@ -6,85 +6,78 @@
- @if (user) { -
-
- User ID -
-
- - Registration Date - -
+
+
+ User ID +
+
+ Registration Date
+
-
+
+
+ Role +
+ @if (data.hasPermissionForSubscription) {
- Role + Country
- @if (data.hasPermissionForSubscription) { -
- - Country - -
- } + } +
+ +
+
+ Accounts
+
+ Activities +
+
+ @if (data.hasPermissionForSubscription) {
Engagement per Day - Accounts -
API Requests Today - Activities -
- - @if (data.hasPermissionForSubscription) { -
-
- - Engagement per Day - -
-
- - API Requests Today - -
-
- } }