From 6feeec80f291d0618c5ecd9998ce99ded8ce48a4 Mon Sep 17 00:00:00 2001 From: nikolay Date: Mon, 15 May 2023 13:45:49 +0400 Subject: [PATCH] =?UTF-8?q?dev=20#14305=20=D0=98=D0=B7=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B4=D0=B8=D0=B7=D0=B0=D0=B9=D0=BD?= =?UTF-8?q?=D0=B0=20WPA=20=D0=9A=D0=BE=D1=84=D0=B5-=D0=BB=D0=B0=D0=B9?= =?UTF-8?q?=D0=BA=D0=B0:=20round=20bonuses=20count?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default-option/pages/guest-card/guest-card.component.html | 2 +- .../default-option/pages/guest-card/guest-card.component.ts | 2 +- .../first-option/pages/guest-card/guest-card.component.ts | 2 +- angular/src/app/services/loyalty-program.service.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/angular/src/app/presentation-options/default-option/pages/guest-card/guest-card.component.html b/angular/src/app/presentation-options/default-option/pages/guest-card/guest-card.component.html index fee486c..1644ac3 100644 --- a/angular/src/app/presentation-options/default-option/pages/guest-card/guest-card.component.html +++ b/angular/src/app/presentation-options/default-option/pages/guest-card/guest-card.component.html @@ -8,7 +8,7 @@

Кэшбек {{ loyaltyProgram.currentLvlPeriod.percent }}%

- {{ loyaltyProgram.getBalanceAmount(customerInfo?.walletBalances) }} + {{ Math.floor(loyaltyProgram.getBalanceAmount(customerInfo?.walletBalances)) }} бонусов

diff --git a/angular/src/app/presentation-options/default-option/pages/guest-card/guest-card.component.ts b/angular/src/app/presentation-options/default-option/pages/guest-card/guest-card.component.ts index 5046144..3fda8c1 100644 --- a/angular/src/app/presentation-options/default-option/pages/guest-card/guest-card.component.ts +++ b/angular/src/app/presentation-options/default-option/pages/guest-card/guest-card.component.ts @@ -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, diff --git a/angular/src/app/presentation-options/first-option/pages/guest-card/guest-card.component.ts b/angular/src/app/presentation-options/first-option/pages/guest-card/guest-card.component.ts index dc9120b..b7773b2 100644 --- a/angular/src/app/presentation-options/first-option/pages/guest-card/guest-card.component.ts +++ b/angular/src/app/presentation-options/first-option/pages/guest-card/guest-card.component.ts @@ -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 { diff --git a/angular/src/app/services/loyalty-program.service.ts b/angular/src/app/services/loyalty-program.service.ts index 9537cd6..f78813d 100644 --- a/angular/src/app/services/loyalty-program.service.ts +++ b/angular/src/app/services/loyalty-program.service.ts @@ -107,7 +107,7 @@ export class LoyaltyProgramService { } } - getBalanceAmount(loyaltyPrograms: any[]) { + getBalanceAmount(loyaltyPrograms: any[]) { return (loyaltyPrograms || []).reduce((accumulator, currentValue) => { return accumulator + currentValue.balance; }, 0);