|
|
@ -91,25 +91,7 @@ export class GfUserDetailDialogComponent implements OnInit { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public ngOnInit() { |
|
|
public ngOnInit() { |
|
|
this.adminService |
|
|
this.initialize(); |
|
|
.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 deleteUser() { |
|
|
protected deleteUser() { |
|
|
@ -141,6 +123,30 @@ export class GfUserDetailDialogComponent implements OnInit { |
|
|
: $localize`Coupon`; |
|
|
: $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() { |
|
|
protected onClose() { |
|
|
this.dialogRef.close(); |
|
|
this.dialogRef.close(); |
|
|
} |
|
|
} |
|
|
|