dev #14607 Море. Правки по сайту: fix notification and auth new_customer
This commit is contained in:
parent
7808270bb4
commit
e640539d96
@ -7,7 +7,7 @@
|
|||||||
<div *ngIf="showDropdown" class="backdrop" (click)="closeMenu()"></div>
|
<div *ngIf="showDropdown" class="backdrop" (click)="closeMenu()"></div>
|
||||||
<div *ngIf="showMenu" class="menu">
|
<div *ngIf="showMenu" class="menu">
|
||||||
<button mat-button (click)="toggleMenu()">
|
<button mat-button (click)="toggleMenu()">
|
||||||
<span class="material-icons" style="color: var(--background-color)">
|
<span class="material-icons" style="color: var(--text-color)">
|
||||||
more_horiz
|
more_horiz
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<div class="menu__dropdown" *ngIf="showDropdown">
|
<div class="menu__dropdown" *ngIf="showDropdown">
|
||||||
<ul>
|
<ul>
|
||||||
<menu-item [handler]="handler(aboutApp)">
|
<menu-item [handler]="handler(aboutApp)">
|
||||||
<span class="material-icons icon" style="color: var(--background-color)">
|
<span class="material-icons icon" style="color: var(--main-color)">
|
||||||
info
|
info
|
||||||
</span>
|
</span>
|
||||||
<span class="item_title">О приложении</span>
|
<span class="item_title">О приложении</span>
|
||||||
|
|||||||
@ -4,14 +4,6 @@
|
|||||||
<div class="logo">
|
<div class="logo">
|
||||||
<img src="./assets/LOGO3.svg" alt=""/>
|
<img src="./assets/LOGO3.svg" alt=""/>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="authService.userInfo?.name" class="owner">
|
|
||||||
<span>Владелец карты</span>
|
|
||||||
<span class="name">{{authService.userInfo.name}}</span>
|
|
||||||
</div>
|
|
||||||
<div class="bonuses">
|
|
||||||
<span>Бонусы</span>
|
|
||||||
<span>{{authService.getBalanceAmount($any(authService.userInfo?.walletBalances))}}</span>
|
|
||||||
</div>
|
|
||||||
<div class="guest-card__qr" (click)="qrCodeClick()">
|
<div class="guest-card__qr" (click)="qrCodeClick()">
|
||||||
<qr-code
|
<qr-code
|
||||||
[value]="authService.userInfo?.phone?.substr(1) || 'Данные не найдены'"
|
[value]="authService.userInfo?.phone?.substr(1) || 'Данные не найдены'"
|
||||||
@ -23,6 +15,14 @@
|
|||||||
></qr-code>
|
></qr-code>
|
||||||
<span class="qr-value">{{authService.userInfo?.phone}}</span>
|
<span class="qr-value">{{authService.userInfo?.phone}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="authService.userInfo?.name" class="owner">
|
||||||
|
<span>Владелец карты</span>
|
||||||
|
<span class="name">{{authService.userInfo.name}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="bonuses">
|
||||||
|
<span>Бонусы</span>
|
||||||
|
<span>{{authService.getBalanceAmount($any(authService.userInfo?.walletBalances))}}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -229,9 +229,7 @@
|
|||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
margin-bottom: 200px;
|
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 40%;
|
width: 40%;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,18 +69,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 > 1) {
|
||||||
this.wpJsonService.newCustomer(
|
|
||||||
environment.systemId,
|
|
||||||
token,
|
|
||||||
environment.icardProxy,
|
|
||||||
)
|
|
||||||
.subscribe({
|
|
||||||
next: () => {
|
|
||||||
this.getUserInfo();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else if (value && value.error && value.error.code > 1) {
|
|
||||||
this.messageService.clear();
|
this.messageService.clear();
|
||||||
this.messageService.add({
|
this.messageService.add({
|
||||||
severity: 'error',
|
severity: 'error',
|
||||||
@ -186,7 +175,17 @@ export class AuthService {
|
|||||||
).subscribe({
|
).subscribe({
|
||||||
next: () => {
|
next: () => {
|
||||||
this.router.navigate(['/']);
|
this.router.navigate(['/']);
|
||||||
this.getUserInfo();
|
|
||||||
|
this.wpJsonService.newCustomer(
|
||||||
|
environment.systemId,
|
||||||
|
result?.data?.token,
|
||||||
|
environment.icardProxy,
|
||||||
|
)
|
||||||
|
.subscribe({
|
||||||
|
next: () => {
|
||||||
|
this.getUserInfo();
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
error: (err) => {
|
error: (err) => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Coffee Like More",
|
"name": "More",
|
||||||
"short_name": "Coffee Like More",
|
"short_name": "More",
|
||||||
"theme_color": "#1976d2",
|
"theme_color": "#1976d2",
|
||||||
"background_color": "#fafafa",
|
"background_color": "#fafafa",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
|
|||||||
@ -245,14 +245,12 @@ input::-webkit-date-and-time-value {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.p-toast-message-custom {
|
.p-toast-message-custom {
|
||||||
background-color: var(--background-color);
|
background-color: var(--background-color);
|
||||||
border: solid var(--main-color);
|
border: solid var(--main-color);
|
||||||
border-width: 0 0 0 6px;
|
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
|
|
||||||
.p-toast-icon-close {
|
.p-toast-icon-close {
|
||||||
color: var(--main-color);
|
color: var(--main-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user