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