Browse Source

fix current version from AdminData #2424

pull/2426/head
akshaywadatkar 2 years ago
parent
commit
2216c0fe52
  1. 5
      apps/client/src/app/components/admin-overview/admin-overview.component.ts

5
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 transactionCount: number;
public userCount: number; public userCount: number;
public user: User; public user: User;
public version = environment.version; public version:any
private unsubscribeSubject = new Subject<void>(); private unsubscribeSubject = new Subject<void>();
@ -204,12 +204,13 @@ export class AdminOverviewComponent implements OnDestroy, OnInit {
this.adminService this.adminService
.fetchAdminData() .fetchAdminData()
.pipe(takeUntil(this.unsubscribeSubject)) .pipe(takeUntil(this.unsubscribeSubject))
.subscribe(({ exchangeRates, settings, transactionCount, userCount }) => { .subscribe(({ exchangeRates, settings, transactionCount, userCount ,version }) => {
this.coupons = (settings[PROPERTY_COUPONS] as Coupon[]) ?? []; this.coupons = (settings[PROPERTY_COUPONS] as Coupon[]) ?? [];
this.customCurrencies = settings[PROPERTY_CURRENCIES] as string[]; this.customCurrencies = settings[PROPERTY_CURRENCIES] as string[];
this.exchangeRates = exchangeRates; this.exchangeRates = exchangeRates;
this.transactionCount = transactionCount; this.transactionCount = transactionCount;
this.userCount = userCount; this.userCount = userCount;
this.version = version
this.changeDetectorRef.markForCheck(); this.changeDetectorRef.markForCheck();
}); });

Loading…
Cancel
Save