dev #14384 Правка ошибок отображения WPA КофеЛайк: some fixes
This commit is contained in:
parent
252433e197
commit
5f522bad47
@ -1,25 +1,20 @@
|
||||
<h2>Ваш предыдущий заказ</h2>
|
||||
<div class="info-order">
|
||||
<p class="flex"><span>Дата: </span>
|
||||
<span *ngIf="!loading">{{(lastOrder?.last_purchase_date) || 'Данные не найдены'}}</span>
|
||||
<ng-container *ngIf="loading">
|
||||
<ng-container
|
||||
*ngTemplateOutlet="spinner; context: { $implicit: 24 }"
|
||||
></ng-container>
|
||||
</ng-container>
|
||||
</p>
|
||||
<p class="flex"><span>На сумму: </span>
|
||||
<span *ngIf="!loading">{{lastOrder ? lastOrder.last_purchase_sum + ' ₽' : 'Данные не найдены'}}</span>
|
||||
<ng-container *ngIf="loading">
|
||||
<ng-container
|
||||
*ngTemplateOutlet="spinner; context: { $implicit: 24 }"
|
||||
></ng-container>
|
||||
</ng-container>
|
||||
</p>
|
||||
<ng-container *ngIf="lastOrder">
|
||||
<p class="flex"><span>Дата: </span>
|
||||
<span *ngIf="!loading">{{lastOrder!.last_purchase_date}}</span>
|
||||
</p>
|
||||
<p class="flex"><span>На сумму: </span>
|
||||
<span *ngIf="!loading">{{lastOrder?.last_purchase_sum}}</span>
|
||||
</p>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!lastOrder">
|
||||
<p class="flex">
|
||||
<span>Данные не найдены</span>
|
||||
</p>
|
||||
</ng-container>
|
||||
</div>
|
||||
<a href="https://promo.coffee-like.com/?utm_medium=prilozhenie">
|
||||
<img src="./assets/970х250_3.png" alt="" width="100%" />
|
||||
</a>
|
||||
<img src="./assets/970х250_3.png" alt="" width="100%" />
|
||||
<a href="https://yandex.ru/profile/151770398186" target="_blank">
|
||||
<button class="evaluate-order">Оценить заказ</button>
|
||||
</a>
|
||||
|
||||
@ -20,28 +20,19 @@
|
||||
></qr-code>
|
||||
</div>
|
||||
<div class="guest-card__user-description">
|
||||
<p>
|
||||
<ng-container *ngIf="authService.currentLvlPeriod.end">
|
||||
Осталось купить на сумму
|
||||
<span class="price">{{
|
||||
authService.userInfo.next_level.sum_for_next_level
|
||||
<p>
|
||||
Осталось купить на сумму
|
||||
<span class="price">{{
|
||||
authService.userInfo.next_level.sum_for_next_level
|
||||
}}</span>
|
||||
рублей, тогда кэшбек будет
|
||||
<span class="percent"
|
||||
>{{ authService.getNextLevel().percent }}%</span
|
||||
>
|
||||
с
|
||||
{{
|
||||
authService.currentPeriod[1]
|
||||
.locale("ru")
|
||||
.format("D MMMM")
|
||||
}}
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!authService.currentLvlPeriod.end">
|
||||
У Вас последний уровень бонусной программы. Процент начисляемых
|
||||
бонусов:
|
||||
{{ authService.currentLvlPeriod.percent }}%
|
||||
</ng-container>
|
||||
рублей, тогда кэшбек будет
|
||||
<span class="percent">{{ authService.userInfo.next_level.cashback }}%</span>
|
||||
с
|
||||
{{
|
||||
authService.currentPeriod[1]
|
||||
.locale("ru")
|
||||
.format("D MMMM")
|
||||
}}
|
||||
</p>
|
||||
</div>
|
||||
<span id="bonuses-condition"></span>
|
||||
|
||||
@ -60,7 +60,7 @@ export class AuthService {
|
||||
)
|
||||
.subscribe({
|
||||
next: (value) => {
|
||||
if (value && value.customer_info && value.customer_info.errorCode === 'Customer_CustomerNotFound') {
|
||||
if (value && value.error && value.error.code === 11) {
|
||||
this.wpJsonService.newCustomer(
|
||||
environment.systemId,
|
||||
token,
|
||||
@ -232,14 +232,6 @@ export class AuthService {
|
||||
}
|
||||
}
|
||||
|
||||
getNextLevel(): lvlPeriod {
|
||||
if (this.userInfo?.next_level.next_level) {
|
||||
return lvlPeriods[this.userInfo.next_level.next_level];
|
||||
}
|
||||
|
||||
return lvlPeriods[0];
|
||||
}
|
||||
|
||||
getBalanceAmount(loyaltyPrograms: UserInfoWalletBalance[]) {
|
||||
return (loyaltyPrograms || []).reduce((accumulator, currentValue) => {
|
||||
if (currentValue.wallet.name !== 'Федеральная программа лояльности') {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user