parent
5e3b211778
commit
7bb05324a9
@ -26,7 +26,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div *ngIf="accountData" class="row">
|
<div *ngIf="accountData" class="row">
|
||||||
<span class="key">Баланс карты</span>
|
<span class="key">Баланс карты</span>
|
||||||
<span class="value">{{ accountData.Bonuses }}</span>
|
<span class="value">{{ bonuses }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-container__barcode-container">
|
<div class="card-container__barcode-container">
|
||||||
|
|||||||
@ -38,6 +38,7 @@ export class BonusProgramComponent implements OnInit {
|
|||||||
public currentPage: Page = this.pageList[1];
|
public currentPage: Page = this.pageList[1];
|
||||||
public userName: string = '';
|
public userName: string = '';
|
||||||
public deviceType: 'ios' | 'android' | null = null;
|
public deviceType: 'ios' | 'android' | null = null;
|
||||||
|
public bonuses: number = 0
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private jsonrpc: JsonrpcService,
|
private jsonrpc: JsonrpcService,
|
||||||
@ -91,6 +92,9 @@ export class BonusProgramComponent implements OnInit {
|
|||||||
);
|
);
|
||||||
|
|
||||||
this.accountData = getAccount && getAccount['Cards'][0];
|
this.accountData = getAccount && getAccount['Cards'][0];
|
||||||
|
this.bonuses = this.accountData.BonusProgramAccounts.reduce((previous, {Bonuses}) => {
|
||||||
|
return previous + Bonuses
|
||||||
|
}, 0)
|
||||||
this.loadingBonuses = false;
|
this.loadingBonuses = false;
|
||||||
if (this.accountData) {
|
if (this.accountData) {
|
||||||
barcode('#barcode')
|
barcode('#barcode')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user