parent
bc7ab9d296
commit
7a62d4bb74
@ -22,16 +22,25 @@ export const PageListWithBonus: Page[] = [
|
|||||||
resName: 'auth',
|
resName: 'auth',
|
||||||
onSideBar: false,
|
onSideBar: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
code: PageCode.BonusProgram,
|
||||||
|
name: 'Ваша карта лояльности',
|
||||||
|
description: 'Lorem Ipsum - это текст-"рыба", часто используемый в печати и вэб-дизайне.',
|
||||||
|
resName: 'bonus-program',
|
||||||
|
onSideBar: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
code: PageCode.Orders,
|
code: PageCode.Orders,
|
||||||
name: 'Заказы',
|
name: 'Ваши чеки',
|
||||||
|
description: 'Lorem Ipsum - это текст-"рыба", часто используемый в печати и вэб-дизайне.',
|
||||||
resName: 'orders',
|
resName: 'orders',
|
||||||
onSideBar: true,
|
onSideBar: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: PageCode.BonusProgram,
|
code: PageCode.RefSystem,
|
||||||
name: 'Бонусная карта',
|
name: 'Пригласить друга',
|
||||||
resName: 'bonus-program',
|
description: 'Lorem Ipsum - это текст-"рыба", часто используемый в печати и вэб-дизайне.',
|
||||||
|
resName: 'ref-system',
|
||||||
onSideBar: true,
|
onSideBar: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
&__button {
|
&__button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 34px;
|
height: 34px;
|
||||||
background: #197664;
|
background: #09467f;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" style="height: 100%; width: fit-content;"
|
<!-- <svg version="1.0" xmlns="http://www.w3.org/2000/svg" style="height: 100%; width: fit-content;"
|
||||||
width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000"
|
width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000"
|
||||||
preserveAspectRatio="xMidYMid meet">
|
preserveAspectRatio="xMidYMid meet">
|
||||||
|
|
||||||
@ -18,6 +18,6 @@
|
|||||||
<path d="M960 1680 l0 -80 480 0 480 0 0 80 0 80 -480 0 -480 0 0 -80z"/>
|
<path d="M960 1680 l0 -80 480 0 480 0 0 80 0 80 -480 0 -480 0 0 -80z"/>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
<h1 class="title">Card Project</h1>
|
<h1 class="title">Card Project</h1> -->
|
||||||
|
<img src="../../../assets/logo.svg" alt="Логотип">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,18 +1,14 @@
|
|||||||
.container {
|
.container {
|
||||||
display: flex;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 12px 16px;
|
padding: 7px 0 0 5px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
flex-direction: row;
|
height: 39px;
|
||||||
align-items: center;
|
background: #09467F;
|
||||||
white-space: nowrap;
|
|
||||||
height: 64px;
|
|
||||||
background: #008376;
|
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 20px;
|
font-size: 18px;
|
||||||
margin-left: 12px;
|
margin-left: 12px;
|
||||||
}
|
}
|
||||||
@ -3,13 +3,15 @@
|
|||||||
export enum PageCode {
|
export enum PageCode {
|
||||||
Auth,
|
Auth,
|
||||||
Orders,
|
Orders,
|
||||||
BonusProgram
|
BonusProgram,
|
||||||
|
RefSystem
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Page {
|
export interface Page {
|
||||||
code: PageCode;
|
code: PageCode;
|
||||||
component?: any;
|
component?: any;
|
||||||
name: string;
|
name: string;
|
||||||
|
description?: string;
|
||||||
getMethod?: string;
|
getMethod?: string;
|
||||||
resName?: string;
|
resName?: string;
|
||||||
onSideBar: boolean
|
onSideBar: boolean
|
||||||
|
|||||||
@ -1,34 +1,57 @@
|
|||||||
<div class="woocommerce">
|
<div class="woocommerce">
|
||||||
<nav *ngIf="currentPage.code !== PageCode.Auth" class="woocommerce-MyAccount-navigation">
|
<div *ngIf="currentPage.code !== PageCode.Auth" class="top-left-attribute"></div>
|
||||||
<ul>
|
<div [ngSwitch]="currentPage.code" class="">
|
||||||
<ng-container *ngFor="let page of pageList; let index = index;">
|
<ng-container *ngSwitchCase="PageCode.Auth">
|
||||||
<li
|
<app-auth
|
||||||
*ngIf="page.onSideBar"
|
[handleHttpError]="handleHttpErrorFunc"
|
||||||
class="woocommerce-MyAccount-navigation-link"
|
(phoneConfirmed)="phoneConfirmed()"
|
||||||
[ngClass]="{
|
></app-auth>
|
||||||
'is-active': page === currentPage,
|
</ng-container>
|
||||||
'first': index === 1
|
<ng-container *ngSwitchCase="PageCode.Orders">
|
||||||
}"
|
<app-orders></app-orders>
|
||||||
(click)="changePage($event, page)"
|
</ng-container>
|
||||||
>
|
<ng-container *ngSwitchCase="PageCode.BonusProgram">
|
||||||
<a href="#">{{page.name}}</a>
|
<app-bonus-program></app-bonus-program>
|
||||||
</li>
|
</ng-container>
|
||||||
</ng-container>
|
|
||||||
<li class="woocommerce-MyAccount-navigation-link">
|
|
||||||
<a href="#" (click)="logout($event)">Выход</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
<div [ngSwitch]="currentPage.code" class="">
|
|
||||||
<ng-container *ngSwitchCase="PageCode.Auth">
|
|
||||||
<app-auth [handleHttpError]="handleHttpErrorFunc" (phoneConfirmed)="phoneConfirmed()"></app-auth>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngSwitchCase="PageCode.Orders">
|
|
||||||
<app-orders></app-orders>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngSwitchCase="PageCode.BonusProgram">
|
|
||||||
<app-bonus-program></app-bonus-program>
|
|
||||||
</ng-container>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<nav
|
||||||
|
*ngIf="currentPage.code !== PageCode.Auth"
|
||||||
|
class="woocommerce-MyAccount-navigation"
|
||||||
|
>
|
||||||
|
<ul>
|
||||||
|
<ng-container *ngFor="let page of pageList; let index = index">
|
||||||
|
<li
|
||||||
|
*ngIf="page.onSideBar"
|
||||||
|
class="woocommerce-MyAccount-navigation-link"
|
||||||
|
[ngClass]="{
|
||||||
|
'is-active': page === currentPage,
|
||||||
|
first: index === 1
|
||||||
|
}"
|
||||||
|
(click)="changePage($event, page)"
|
||||||
|
>
|
||||||
|
<div class="container">
|
||||||
|
<img
|
||||||
|
src="{{ '../../../assets/menu-icons/' + page.resName + '.png' }}"
|
||||||
|
alt="Иконка меню"
|
||||||
|
/>
|
||||||
|
<div class="menu-item-info">
|
||||||
|
<a href="#">{{ page.name }}</a>
|
||||||
|
<p>{{ page.description }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ng-container>
|
||||||
|
<li class="woocommerce-MyAccount-navigation-link">
|
||||||
|
<div class="container">
|
||||||
|
<img
|
||||||
|
src="../../../assets/menu-icons/exit.png"
|
||||||
|
alt="Иконка меню"
|
||||||
|
/>
|
||||||
|
<div class="menu-item-info">
|
||||||
|
<a href="#" (click)="logout($event)">Выход</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
|||||||
@ -1,36 +1,74 @@
|
|||||||
:host {
|
:host {
|
||||||
.woocommerce {
|
.woocommerce {
|
||||||
min-height: calc(100vh - 64px);
|
min-height: calc(100vh - 39px);
|
||||||
padding: 24px 12px;
|
padding: 20px 18px;
|
||||||
nav {
|
nav {
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
ul {
|
||||||
|
max-width: 400px;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 6px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-direction: column;
|
||||||
|
li {
|
||||||
|
padding: 12px;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
cursor: pointer;
|
||||||
|
height: 81px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
background: #ffffff;
|
||||||
|
box-shadow: 0px 0px 5px rgb(0 0 0 / 15%);
|
||||||
|
color: #000;
|
||||||
|
border-radius: 15px;
|
||||||
|
&.is-active {
|
||||||
|
// background-color: #009688;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
&.first {
|
||||||
|
// border-radius: 7px 0 0 7px;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
align-items: center;
|
||||||
ul {
|
height: 100%;
|
||||||
max-width: 400px;
|
.menu-item-info {
|
||||||
width: 100%;
|
margin-left: 16px;
|
||||||
background: #161616;
|
& > a {
|
||||||
border-radius: 6px;
|
font-style: normal;
|
||||||
display: flex;
|
font-weight: 700;
|
||||||
justify-content: space-between;
|
font-size: 18px;
|
||||||
li {
|
line-height: 22px;
|
||||||
padding: 12px;
|
text-decoration: none;
|
||||||
width: 100%;
|
color: #000;
|
||||||
white-space: nowrap;
|
display: block;
|
||||||
text-align: center;
|
text-align-last: left;
|
||||||
cursor: pointer;
|
}
|
||||||
&.is-active {
|
& > p {
|
||||||
background-color: #009688;
|
font-style: normal;
|
||||||
}
|
font-weight: 400;
|
||||||
&.first {
|
font-size: 12px;
|
||||||
border-radius: 7px 0 0 7px;
|
line-height: 15px;
|
||||||
}
|
text-align: left;
|
||||||
a {
|
}
|
||||||
text-decoration: none;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
li:nth-child(odd) {
|
||||||
|
background-color: #EBEBEB;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
.top-left-attribute {
|
||||||
|
width: 10px;
|
||||||
|
height: 5px;
|
||||||
|
background: #09467f;
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 69px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -32,12 +32,12 @@ export class AccountComponent implements OnInit {
|
|||||||
readonly pageList = environment.hasBonusProgram ? PageListWithBonus : PageList;
|
readonly pageList = environment.hasBonusProgram ? PageListWithBonus : PageList;
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.currentPage = this.getToken() ? this.pageList[2] : this.pageList[0];
|
this.currentPage = this.getToken() ? this.pageList[1] : this.pageList[0];
|
||||||
document.body.classList.add('woocommerce-account', 'woocommerce-page', 'woocommerce-orders');
|
document.body.classList.add('woocommerce-account', 'woocommerce-page', 'woocommerce-orders');
|
||||||
}
|
}
|
||||||
|
|
||||||
phoneConfirmed(): void{
|
phoneConfirmed(): void{
|
||||||
this.currentPage = this.pageList[2];
|
this.currentPage = this.pageList[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
changePage(event: MouseEvent, page: Page): void{
|
changePage(event: MouseEvent, page: Page): void{
|
||||||
|
|||||||
@ -1,16 +1,14 @@
|
|||||||
<div class="woocommerce-notices-wrapper"></div>
|
<div class="woocommerce-notices-wrapper"></div>
|
||||||
<h2>Вход</h2>
|
|
||||||
<ng-container *ngIf="!isCodeConfirm; else confirmPhoneField">
|
<ng-container *ngIf="!isCodeConfirm; else confirmPhoneField">
|
||||||
<form
|
<form
|
||||||
class="woocommerce-form woocommerce-form-login login"
|
class="woocommerce-form woocommerce-form-login login"
|
||||||
(submit)="getCode($event)"
|
(submit)="getCode($event)"
|
||||||
>
|
>
|
||||||
|
<h2>Вход</h2>
|
||||||
<p
|
<p
|
||||||
class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide"
|
class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide"
|
||||||
>
|
>
|
||||||
<label for="phone"
|
<label for="phone">Введите Ваш номер телефона</label>
|
||||||
>Номер телефона <span class="required">*</span></label
|
|
||||||
>
|
|
||||||
<p-inputMask
|
<p-inputMask
|
||||||
mask="+7 (999) 999-99-99"
|
mask="+7 (999) 999-99-99"
|
||||||
characterPattern="[0-9]"
|
characterPattern="[0-9]"
|
||||||
@ -18,7 +16,7 @@
|
|||||||
name="phone"
|
name="phone"
|
||||||
inputId="phone"
|
inputId="phone"
|
||||||
autocomplete="phone"
|
autocomplete="phone"
|
||||||
placeholder="+7 (___) ___-__-__"
|
placeholder="+7 (000) 000-00-00"
|
||||||
[unmask]="true"
|
[unmask]="true"
|
||||||
[(ngModel)]="phone"
|
[(ngModel)]="phone"
|
||||||
></p-inputMask>
|
></p-inputMask>
|
||||||
@ -40,24 +38,23 @@
|
|||||||
></p-progressSpinner>
|
></p-progressSpinner>
|
||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
|
<div class="decoration-pattern"></div>
|
||||||
</form>
|
</form>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-template #confirmPhoneField>
|
<ng-template #confirmPhoneField>
|
||||||
<form
|
<form
|
||||||
class="woocommerce-form woocommerce-form-login login"
|
class="woocommerce-form woocommerce-form-login login"
|
||||||
action="false"
|
action="false"
|
||||||
|
style="height: 334px;"
|
||||||
(submit)="confirmCode($event)"
|
(submit)="confirmCode($event)"
|
||||||
>
|
>
|
||||||
|
<h2>Вход</h2>
|
||||||
<p
|
<p
|
||||||
class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide"
|
class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide"
|
||||||
>
|
>
|
||||||
<label for="code">
|
<label for="code">
|
||||||
Введите 4 последних цифры позвонившего вам номера телефона. На звонок
|
Введите 4 последних цифры позвонившего вам номера телефона. На звонок
|
||||||
отвечать не нужно.<br />
|
отвечать не нужно.
|
||||||
Например: +7 (XXX) XXX-<span style="color: #d7120b">XX</span>-<span
|
|
||||||
style="color: #d7120b"
|
|
||||||
>XX</span
|
|
||||||
>
|
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
pInputText
|
pInputText
|
||||||
@ -66,11 +63,11 @@
|
|||||||
name="code"
|
name="code"
|
||||||
id="code"
|
id="code"
|
||||||
autocomplete="code"
|
autocomplete="code"
|
||||||
placeholder="****"
|
placeholder="00-00"
|
||||||
[(ngModel)]="code"
|
[(ngModel)]="code"
|
||||||
/>
|
/>
|
||||||
</p>
|
</p>
|
||||||
<p class="form-row">
|
<p class="form-row" style="margin-bottom: 6px;">
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="woocommerce-button button woocommerce-form-login__submit"
|
class="woocommerce-button button woocommerce-form-login__submit"
|
||||||
@ -90,5 +87,6 @@
|
|||||||
<p style="color: red; margin: 0" *ngIf="errorConfirmCode">
|
<p style="color: red; margin: 0" *ngIf="errorConfirmCode">
|
||||||
Пароль введен неверно
|
Пароль введен неверно
|
||||||
</p>
|
</p>
|
||||||
|
<div class="decoration-pattern"></div>
|
||||||
</form>
|
</form>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|||||||
@ -1,52 +1,95 @@
|
|||||||
:host{
|
:host {
|
||||||
.woocommerce-form-login__submit{
|
.woocommerce-form-login__submit {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
width: 100%;
|
||||||
font-size: 24px;
|
height: 49px;
|
||||||
margin-bottom: 16px;
|
text-align: left;
|
||||||
|
padding-top: 13px;
|
||||||
|
padding-left: 32px;
|
||||||
|
background: #0d457e;
|
||||||
|
position: relative;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 24px;
|
||||||
|
&::before {
|
||||||
|
content: "";
|
||||||
|
width: 19px;
|
||||||
|
height: 4px;
|
||||||
|
background: #fff;
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 24px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.woocommerce-form {
|
.woocommerce-form {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
background: #ffffff;
|
||||||
|
box-shadow: 0px 0px 10px rgb(0 0 0 / 15%);
|
||||||
|
border-radius: 15px;
|
||||||
|
height: 262px;
|
||||||
|
overflow: auto;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
.form-row {
|
.form-row {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
.button {
|
.button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 37px;
|
font-weight: 600;
|
||||||
background: #197664;
|
letter-spacing: 2px;
|
||||||
color: #fff;
|
border: none;
|
||||||
border-radius: 5px;
|
height: 45px;
|
||||||
font-weight: 600;
|
background: #b8deff;
|
||||||
letter-spacing: 2px;
|
border-radius: 15px;
|
||||||
border: none;
|
color: #000;
|
||||||
}
|
font-style: normal;
|
||||||
label {
|
font-weight: 700;
|
||||||
display:inline-block;
|
font-size: 16px;
|
||||||
margin-bottom: 8px;
|
line-height: 20px;
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
.input-text {
|
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
||||||
font-size: 1rem;
|
|
||||||
color: #495057;
|
|
||||||
background: #ffffff;
|
|
||||||
padding: 0.5rem 0.75rem;
|
|
||||||
border: 1px solid #ced4da;
|
|
||||||
transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
appearance: none;
|
|
||||||
border-radius: 4px;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
label {
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
margin-top: 15px;
|
||||||
|
color: #000;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
.input-text {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
||||||
|
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
|
||||||
|
"Segoe UI Symbol";
|
||||||
|
font-size: 1rem;
|
||||||
|
color: #495057;
|
||||||
|
background: #ffffff;
|
||||||
|
padding: 0.5rem 0.75rem;
|
||||||
|
border: 1px solid #ced4da;
|
||||||
|
transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
appearance: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.decoration-pattern {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 10px;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 34px;
|
||||||
|
background: url("../../../../assets/card-decorative-pattern.png") repeat-x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,6 +1,34 @@
|
|||||||
<div class="woocommerce-MyAccount-content">
|
<div class="woocommerce-MyAccount-content">
|
||||||
<span class="explanation">*Нажмите на карту, чтобы перевернуть её</span>
|
<h2>{{currentPage.name}}</h2>
|
||||||
<div [ngClass]="{
|
<p>{{currentPage.description}}</p>
|
||||||
|
<div class="card-container">
|
||||||
|
<div class="card-container__header">
|
||||||
|
<img src="../../../../assets/logo.svg" alt="Логотип карта">
|
||||||
|
<span *ngIf="accountData">#{{accountData.CardNumber}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="card-container__decorative-pattern">
|
||||||
|
<div class="imgs-row"></div>
|
||||||
|
<div class="imgs-row" style="background-position-x: -22px;"></div>
|
||||||
|
<div class="imgs-row"></div>
|
||||||
|
</div>
|
||||||
|
<div class="card-container__content">
|
||||||
|
<div class="info" *ngIf="accountData">
|
||||||
|
<div class="row">
|
||||||
|
<span class="key">Имя</span>
|
||||||
|
<span class="value" *ngIf="accountData.BonusProgramName">{{accountData.BonusProgramName}}</span>
|
||||||
|
<span class="value" *ngIf="!accountData.BonusProgramName">Не задано</span>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<span class="key">Баланс карты</span>
|
||||||
|
<span class="value">{{accountData.Bonuses}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-container__barcode-container">
|
||||||
|
<svg id="barcode"></svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div [ngClass]="{
|
||||||
'card-content': true,
|
'card-content': true,
|
||||||
'active_back': isCardBack
|
'active_back': isCardBack
|
||||||
}" (click)="rotateCard()">
|
}" (click)="rotateCard()">
|
||||||
@ -47,17 +75,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="bonus-account__container">
|
|
||||||
<h3>Доступно</h3>
|
|
||||||
<div *ngIf="accountData" class="bonus-account__value">
|
|
||||||
{{ accountData.Bonuses }}
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-content__back">
|
<div class="card-content__back">
|
||||||
<div class="card-content__barcode-container">
|
<div class="card-content__barcode-container">
|
||||||
<svg id="barcode"></svg>
|
<svg id="barcode"></svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,87 +1,169 @@
|
|||||||
:host {
|
:host {
|
||||||
.woocommerce-MyAccount-content {
|
.woocommerce-MyAccount-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
& > h2 {
|
||||||
.card-content {
|
font-style: normal;
|
||||||
position: relative;
|
font-weight: 700;
|
||||||
height: 200px;
|
font-size: 20px;
|
||||||
width: 100%;
|
line-height: 24px;
|
||||||
max-width: 400px;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
-o-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
&__front, &__back {
|
|
||||||
display: block;
|
|
||||||
transition-timing-function: cubic-bezier(.175, .885, .32, 1.275);
|
|
||||||
transition-duration: .7s;
|
|
||||||
transition-property: transform, opacity;
|
|
||||||
color: #fff;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background: #fdfdfd;
|
|
||||||
border-radius: 12px;
|
|
||||||
border: solid #a3a3a3 1px;
|
|
||||||
box-shadow: 0 0 3px 1px #fff;
|
|
||||||
padding: 12px;
|
|
||||||
background-size: cover;
|
|
||||||
}
|
|
||||||
&__front {
|
|
||||||
transform: rotateY(0deg);
|
|
||||||
background-image: url(../../../../assets/background.svg);
|
|
||||||
}
|
|
||||||
&__back {
|
|
||||||
position: absolute;
|
|
||||||
opacity: 0;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
transform: rotateY(-180deg);
|
|
||||||
background: #000;
|
|
||||||
}
|
|
||||||
&.active_back {
|
|
||||||
> .card-content__front {
|
|
||||||
transform: rotateY(180deg);
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
> .card-content__back {
|
|
||||||
opacity: 1;
|
|
||||||
transform: rotateY(0deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&__logo {
|
|
||||||
height: 30px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
.title {
|
|
||||||
color: #03d1be;
|
|
||||||
font-weight: 600;
|
|
||||||
letter-spacing: 2px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&__footer {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: flex-end;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 12px;
|
|
||||||
width: calc(100% - 24px);
|
|
||||||
.count {
|
|
||||||
font-size: 22px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&__barcode-container {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.explanation {
|
|
||||||
font-size: 12px;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
& > p {
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 15px;
|
||||||
|
line-height: 18px;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
.card-container {
|
||||||
|
background: #09467f;
|
||||||
|
box-shadow: 0px 0px 5px rgb(0 0 0 / 15%);
|
||||||
|
border-radius: 15px;
|
||||||
|
height: 466px;
|
||||||
|
margin-top: 11px;
|
||||||
|
overflow: hidden;
|
||||||
|
&__header {
|
||||||
|
height: 62px;
|
||||||
|
color: #fff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
img {
|
||||||
|
height: 38px;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 24px;
|
||||||
|
margin-top: 19px;
|
||||||
|
margin-right: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&__decorative-pattern {
|
||||||
|
height: 122px;
|
||||||
|
background-color: #fff;
|
||||||
|
padding-top: 9px;
|
||||||
|
.imgs-row {
|
||||||
|
background: url("../../../../assets/card-decorative-pattern.png")
|
||||||
|
repeat-x;
|
||||||
|
height: 32%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&__content {
|
||||||
|
background-color: #b8deff;
|
||||||
|
.info {
|
||||||
|
height: 79px;
|
||||||
|
border-bottom: solid #0d457e 1px;
|
||||||
|
padding: 14px 18px;
|
||||||
|
.row {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 7px;
|
||||||
|
.key {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 17px;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
.value {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&__barcode-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 33px 0;
|
||||||
|
#barcode {
|
||||||
|
border-radius: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-content {
|
||||||
|
position: relative;
|
||||||
|
height: 200px;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 400px;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
-o-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
&__front,
|
||||||
|
&__back {
|
||||||
|
display: block;
|
||||||
|
transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||||
|
transition-duration: 0.7s;
|
||||||
|
transition-property: transform, opacity;
|
||||||
|
color: #fff;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: #fdfdfd;
|
||||||
|
border-radius: 12px;
|
||||||
|
border: solid #a3a3a3 1px;
|
||||||
|
box-shadow: 0 0 3px 1px #fff;
|
||||||
|
padding: 12px;
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
&__front {
|
||||||
|
transform: rotateY(0deg);
|
||||||
|
background-image: url(../../../../assets/background.svg);
|
||||||
|
}
|
||||||
|
&__back {
|
||||||
|
position: absolute;
|
||||||
|
opacity: 0;
|
||||||
|
top: 0px;
|
||||||
|
left: 0px;
|
||||||
|
transform: rotateY(-180deg);
|
||||||
|
background: #000;
|
||||||
|
}
|
||||||
|
&.active_back {
|
||||||
|
> .card-content__front {
|
||||||
|
transform: rotateY(180deg);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
> .card-content__back {
|
||||||
|
opacity: 1;
|
||||||
|
transform: rotateY(0deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&__logo {
|
||||||
|
height: 30px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
.title {
|
||||||
|
color: #03d1be;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&__footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: flex-end;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 12px;
|
||||||
|
width: calc(100% - 24px);
|
||||||
|
.count {
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&__barcode-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.explanation {
|
||||||
|
font-size: 12px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { lastValueFrom } from 'rxjs';
|
import { lastValueFrom } from 'rxjs';
|
||||||
import { orderStatuses } from 'src/app/app.constants';
|
import { orderStatuses, PageList, PageListWithBonus } from 'src/app/app.constants';
|
||||||
import { BonusProgramAccount, Purchase, Transaction } from 'src/app/interface/data';
|
import { BonusProgramAccount, Page, Purchase, Transaction } from 'src/app/interface/data';
|
||||||
import { JsonrpcService, RpcService } from 'src/app/services/jsonrpc.service';
|
import { JsonrpcService, RpcService } from 'src/app/services/jsonrpc.service';
|
||||||
import * as moment from 'moment-timezone';
|
import * as moment from 'moment-timezone';
|
||||||
import * as barcode from 'jsbarcode';
|
import * as barcode from 'jsbarcode';
|
||||||
|
import { environment } from 'src/environments/environment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-bonus-program',
|
selector: 'app-bonus-program',
|
||||||
@ -19,6 +20,8 @@ export class BonusProgramComponent implements OnInit {
|
|||||||
public isCardBack: boolean = false;
|
public isCardBack: boolean = false;
|
||||||
readonly orderStatuses = orderStatuses;
|
readonly orderStatuses = orderStatuses;
|
||||||
readonly moment = moment;
|
readonly moment = moment;
|
||||||
|
readonly pageList = environment.hasBonusProgram ? PageListWithBonus : PageList;
|
||||||
|
public currentPage: Page = this.pageList[1];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private jsonrpc: JsonrpcService,
|
private jsonrpc: JsonrpcService,
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
.main-container {
|
.main-container {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background-image: url(../../../assets/background.svg);
|
|
||||||
background-position: center;
|
|
||||||
}
|
}
|
||||||
BIN
src/assets/card-decorative-pattern.png
Normal file
BIN
src/assets/card-decorative-pattern.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
9
src/assets/logo.svg
Normal file
9
src/assets/logo.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 51 KiB |
BIN
src/assets/menu-icons/exit.png
Normal file
BIN
src/assets/menu-icons/exit.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 861 B |
BIN
src/assets/menu-icons/orders.png
Normal file
BIN
src/assets/menu-icons/orders.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 992 B |
BIN
src/assets/menu-icons/ref-system.png
Normal file
BIN
src/assets/menu-icons/ref-system.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@ -13,7 +13,7 @@
|
|||||||
<link rel="manifest" href="manifest.webmanifest">
|
<link rel="manifest" href="manifest.webmanifest">
|
||||||
<meta name="theme-color" content="#1976d2">
|
<meta name="theme-color" content="#1976d2">
|
||||||
</head>
|
</head>
|
||||||
<body style="background: #161616;">
|
<body>
|
||||||
<app-root></app-root>
|
<app-root></app-root>
|
||||||
<noscript>Please enable JavaScript to continue using this application.</noscript>
|
<noscript>Please enable JavaScript to continue using this application.</noscript>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Сброс стилей
|
// Сброс стилей
|
||||||
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:middle}
|
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:middle}
|
||||||
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}
|
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}
|
||||||
html{height:100%;color:#fff;}
|
html{height:100%;color:#000;}
|
||||||
body{line-height:1}
|
body{line-height:1}
|
||||||
ol,ul{list-style:none}
|
ol,ul{list-style:none}
|
||||||
blockquote,q{quotes:none}
|
blockquote,q{quotes:none}
|
||||||
@ -14,6 +14,9 @@ table{border-collapse:collapse;border-spacing:0}
|
|||||||
|
|
||||||
.p-inputtext {
|
.p-inputtext {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
border: 1px solid #B8DEFF;
|
||||||
|
border-radius: 15px;
|
||||||
|
height: 45px;
|
||||||
}
|
}
|
||||||
|
|
||||||
mark {
|
mark {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user