From 712b9026cbc5ab08ddf000b7fdc1255737c0bd86 Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Sat, 7 Oct 2023 08:49:54 +0200 Subject: [PATCH] Clean up --- .../admin-overview.component.ts | 24 ++++++++++--------- .../admin-overview/admin-overview.html | 4 +++- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/apps/client/src/app/components/admin-overview/admin-overview.component.ts b/apps/client/src/app/components/admin-overview/admin-overview.component.ts index 67480a3f9..b1e91dfc9 100644 --- a/apps/client/src/app/components/admin-overview/admin-overview.component.ts +++ b/apps/client/src/app/components/admin-overview/admin-overview.component.ts @@ -43,7 +43,7 @@ export class AdminOverviewComponent implements OnDestroy, OnInit { public transactionCount: number; public userCount: number; public user: User; - public version:any + public version: string; private unsubscribeSubject = new Subject(); @@ -204,16 +204,18 @@ export class AdminOverviewComponent implements OnDestroy, OnInit { this.adminService .fetchAdminData() .pipe(takeUntil(this.unsubscribeSubject)) - .subscribe(({ exchangeRates, settings, transactionCount, userCount ,version }) => { - this.coupons = (settings[PROPERTY_COUPONS] as Coupon[]) ?? []; - this.customCurrencies = settings[PROPERTY_CURRENCIES] as string[]; - this.exchangeRates = exchangeRates; - this.transactionCount = transactionCount; - this.userCount = userCount; - this.version = version - - this.changeDetectorRef.markForCheck(); - }); + .subscribe( + ({ exchangeRates, settings, transactionCount, userCount, version }) => { + this.coupons = (settings[PROPERTY_COUPONS] as Coupon[]) ?? []; + this.customCurrencies = settings[PROPERTY_CURRENCIES] as string[]; + this.exchangeRates = exchangeRates; + this.transactionCount = transactionCount; + this.userCount = userCount; + this.version = version; + + this.changeDetectorRef.markForCheck(); + } + ); } private generateCouponCode(aLength: number) { diff --git a/apps/client/src/app/components/admin-overview/admin-overview.html b/apps/client/src/app/components/admin-overview/admin-overview.html index 2739547b5..f50770063 100644 --- a/apps/client/src/app/components/admin-overview/admin-overview.html +++ b/apps/client/src/app/components/admin-overview/admin-overview.html @@ -5,7 +5,9 @@
Version
-
{{ version }}
+
+ +
User Count