|
@ -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: string; |
|
|
|
|
|
|
|
|
private unsubscribeSubject = new Subject<void>(); |
|
|
private unsubscribeSubject = new Subject<void>(); |
|
|
|
|
|
|
|
@ -204,15 +204,18 @@ 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( |
|
|
this.coupons = (settings[PROPERTY_COUPONS] as Coupon[]) ?? []; |
|
|
({ exchangeRates, settings, transactionCount, userCount, version }) => { |
|
|
this.customCurrencies = settings[PROPERTY_CURRENCIES] as string[]; |
|
|
this.coupons = (settings[PROPERTY_COUPONS] as Coupon[]) ?? []; |
|
|
this.exchangeRates = exchangeRates; |
|
|
this.customCurrencies = settings[PROPERTY_CURRENCIES] as string[]; |
|
|
this.transactionCount = transactionCount; |
|
|
this.exchangeRates = exchangeRates; |
|
|
this.userCount = userCount; |
|
|
this.transactionCount = transactionCount; |
|
|
|
|
|
this.userCount = userCount; |
|
|
this.changeDetectorRef.markForCheck(); |
|
|
this.version = version; |
|
|
}); |
|
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
|
|
|
} |
|
|
|
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private generateCouponCode(aLength: number) { |
|
|
private generateCouponCode(aLength: number) { |
|
|