dev #14305 Изменение дизайна WPA Кофе-лайка: change loyality program page
This commit is contained in:
parent
ff9e04ecbd
commit
2fa05b391e
@ -1,17 +1,49 @@
|
|||||||
<app-navbar title="Программа лояльности" (backEvent)="goBack()"></app-navbar>
|
<app-navbar title="Программа лояльности" (backEvent)="goBack()"></app-navbar>
|
||||||
|
|
||||||
|
<ng-container *ngIf="loyaltyProgram.currentLvlPeriod">
|
||||||
<div class="loyality-program">
|
<div class="loyality-program">
|
||||||
<app-accordion header="Условия начисления бонусов">
|
<app-accordion header="Условия начисления бонусов">
|
||||||
<p>
|
<p>
|
||||||
Расчет начисления бонусов - 10% от суммы покупок за период с 11.01.2023г.
|
Ваш текущий уровень {{ loyaltyProgram.currentLvl }},
|
||||||
по 31.03.2023 г.
|
поэтому вам начисляется {{ loyaltyProgram.currentLvlPeriod.percent }}% от суммы покупки.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
За период с 11.01.2023г. по 31.03.2023 г. сумма ваших покупок составила
|
Смена уровня произойдет в начале следующего квартала,
|
||||||
3700 руб.
|
{{ loyaltyProgram.purchaseData.currentPeriod[1]
|
||||||
|
.locale("ru")
|
||||||
|
.format("DD.MM.YY") }}.
|
||||||
</p>
|
</p>
|
||||||
<p>Начисляемый бонус 10% от суммы покупок</p>
|
|
||||||
</app-accordion>
|
</app-accordion>
|
||||||
|
<app-accordion header="Уровни бонусной программы">
|
||||||
|
<p>
|
||||||
|
Начисление Бонусных баллов происходит по дифференцированной шкале в
|
||||||
|
зависимости от уровня:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ng-container
|
||||||
|
*ngFor="let item of lvlPeriods; let index = index; let last = last"
|
||||||
|
>
|
||||||
|
<ng-container *ngIf="!last">
|
||||||
|
<ul>
|
||||||
|
<span [style]="{ color: item.color }">Уровень {{ index + 1 }}</span>
|
||||||
|
<li>
|
||||||
|
Сумма покупок за прошлый квартал {{ item.start }}-{{ item.end }}
|
||||||
|
руб.
|
||||||
|
</li>
|
||||||
|
<li>Начисляемый бонус {{ item.percent }}% от суммы покупки</li>
|
||||||
|
</ul>
|
||||||
|
<br />
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="last">
|
||||||
|
<ul>
|
||||||
|
<span [style]="{ color: item.color }">Уровень {{ index + 1 }}</span>
|
||||||
|
<li>Сумма покупок за прошлый квартал — от {{ item.start }} руб.</li>
|
||||||
|
<li>Начисляемый бонус, в % от суммы покупки - {{ item.percent }}%</li>
|
||||||
|
</ul>
|
||||||
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
|
</app-accordion>
|
||||||
|
|
||||||
<app-accordion header="Условия «оплаты» покупки бонусами">
|
<app-accordion header="Условия «оплаты» покупки бонусами">
|
||||||
<p>
|
<p>
|
||||||
Участник может использовать Бонусы для «оплаты» до 100% стоимости любой
|
Участник может использовать Бонусы для «оплаты» до 100% стоимости любой
|
||||||
@ -67,35 +99,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</app-accordion>
|
</app-accordion>
|
||||||
|
|
||||||
<app-accordion header="Узнать % начисляемых бонусов">
|
|
||||||
<p>
|
|
||||||
Начисление Бонусных баллов происходит по дифференцированной шкале в
|
|
||||||
зависимости от уровня:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ng-container
|
|
||||||
*ngFor="let item of lvlPeriods; let index = index; let last = last"
|
|
||||||
>
|
|
||||||
<ng-container *ngIf="!last">
|
|
||||||
<ul>
|
|
||||||
<span [style]="{ color: item.color }">Уровень {{ index + 1 }}</span>
|
|
||||||
<li>
|
|
||||||
Сумма покупок за предыдущий период {{ item.start }}-{{ item.end }}
|
|
||||||
руб.
|
|
||||||
</li>
|
|
||||||
<li>Начисляемый бонус {{ item.percent }}% от суммы покупки</li>
|
|
||||||
</ul>
|
|
||||||
<br />
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngIf="last">
|
|
||||||
<ul>
|
|
||||||
<span [style]="{ color: item.color }">Уровень {{ index + 1 }}</span>
|
|
||||||
<li>Сумма покупок за предыдущий период — от {{ item.start }} руб.</li>
|
|
||||||
<li>Начисляемый бонус, в % от суммы покупки - {{ item.percent }}%</li>
|
|
||||||
</ul>
|
|
||||||
</ng-container>
|
|
||||||
</ng-container>
|
|
||||||
</app-accordion>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<app-footer></app-footer>
|
<app-footer></app-footer>
|
||||||
|
</ng-container>
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
import { lvlPeriod } from 'src/app/interface/data';
|
import { lvlPeriod } from 'src/app/interface/data';
|
||||||
import { lvlPeriods } from 'src/app/app.constants';
|
import { lvlPeriods } from 'src/app/app.constants';
|
||||||
|
import { LoyaltyProgramService } from 'src/app/services/loyalty-program.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'loyality-program',
|
selector: 'loyality-program',
|
||||||
@ -9,7 +10,10 @@ import { lvlPeriods } from 'src/app/app.constants';
|
|||||||
styleUrls: ['./loyality-program.component.scss'],
|
styleUrls: ['./loyality-program.component.scss'],
|
||||||
})
|
})
|
||||||
export class LoyalityProgramComponent implements OnInit {
|
export class LoyalityProgramComponent implements OnInit {
|
||||||
constructor(private _location: Location) {}
|
constructor(
|
||||||
|
private _location: Location,
|
||||||
|
public loyaltyProgram: LoyaltyProgramService,
|
||||||
|
) {}
|
||||||
|
|
||||||
public lvlPeriods: lvlPeriod[] = lvlPeriods;
|
public lvlPeriods: lvlPeriod[] = lvlPeriods;
|
||||||
|
|
||||||
@ -17,5 +21,9 @@ export class LoyalityProgramComponent implements OnInit {
|
|||||||
this._location.back();
|
this._location.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
ngOnInit(): void {
|
||||||
|
if(this.loyaltyProgram.currentLvlPeriod == null) {
|
||||||
|
this._location.back();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user