dev #14305 Изменение дизайна WPA Кофе-лайка: round bonuses count
This commit is contained in:
parent
e062f05f36
commit
6feeec80f2
@ -8,7 +8,7 @@
|
||||
<p id="level-percent">Кэшбек {{ loyaltyProgram.currentLvlPeriod.percent }}%</p>
|
||||
</div>
|
||||
<p class="top-info__bonus">
|
||||
{{ loyaltyProgram.getBalanceAmount(customerInfo?.walletBalances) }}
|
||||
{{ Math.floor(loyaltyProgram.getBalanceAmount(customerInfo?.walletBalances)) }}
|
||||
бонусов
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@ -23,7 +23,7 @@ export class GuestCardComponent implements OnInit {
|
||||
public customerInfo!: any;
|
||||
public purchases!: Purchase[];
|
||||
public lastPurchase!: Purchase;
|
||||
|
||||
public Math: Math = Math;
|
||||
|
||||
constructor(
|
||||
private _bottomSheet: MatBottomSheet,
|
||||
|
||||
@ -64,7 +64,7 @@ export class GuestCardComponent implements OnInit {
|
||||
private _bottomSheet: MatBottomSheet,
|
||||
private cookiesService: CookiesService,
|
||||
private router: Router,
|
||||
private wpJsonService: WpJsonService
|
||||
private wpJsonService: WpJsonService
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
@ -107,7 +107,7 @@ export class LoyaltyProgramService {
|
||||
}
|
||||
}
|
||||
|
||||
getBalanceAmount(loyaltyPrograms: any[]) {
|
||||
getBalanceAmount(loyaltyPrograms: any[]) {
|
||||
return (loyaltyPrograms || []).reduce((accumulator, currentValue) => {
|
||||
return accumulator + currentValue.balance;
|
||||
}, 0);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user