parent
7bb05324a9
commit
7a9f9fc872
@ -17,12 +17,9 @@
|
||||
<div class="info">
|
||||
<div *ngIf="accountData" class="row">
|
||||
<span class="key">Имя</span>
|
||||
<span class="value" *ngIf="userName.length">{{
|
||||
userName
|
||||
<span class="value">{{
|
||||
userName && userName.length ? userName : 'Не задано'
|
||||
}}</span>
|
||||
<span class="value" *ngIf="!userName.length"
|
||||
>Не задано</span
|
||||
>
|
||||
</div>
|
||||
<div *ngIf="accountData" class="row">
|
||||
<span class="key">Баланс карты</span>
|
||||
|
||||
@ -92,9 +92,9 @@ export class BonusProgramComponent implements OnInit {
|
||||
);
|
||||
|
||||
this.accountData = getAccount && getAccount['Cards'][0];
|
||||
this.bonuses = this.accountData.BonusProgramAccounts.reduce((previous, {Bonuses}) => {
|
||||
this.bonuses = this.accountData.BonusProgramAccounts?.reduce((previous, {Bonuses}) => {
|
||||
return previous + Bonuses
|
||||
}, 0)
|
||||
}, 0) || this.accountData.Bonuses
|
||||
this.loadingBonuses = false;
|
||||
if (this.accountData) {
|
||||
barcode('#barcode')
|
||||
|
||||
@ -81,6 +81,7 @@
|
||||
></p-progressSpinner>
|
||||
<p
|
||||
*ngIf="purchases?.length === 0 && !ordersLoadingStatus"
|
||||
class="no-orders"
|
||||
style="width: 100%; text-align: center"
|
||||
>
|
||||
Нет заказов
|
||||
|
||||
@ -1,70 +1,76 @@
|
||||
.show-more-orders {
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
color: #09467f;
|
||||
margin-top: 16px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
color: #09467f;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.woocommerce-MyAccount-content {
|
||||
max-width: 400px;
|
||||
margin-left: calc(50vw - 200px);
|
||||
max-width: 400px;
|
||||
margin-left: calc(50vw - 200px);
|
||||
}
|
||||
.woocommerce-orders-table {
|
||||
border: 2px solid #dee2e6;
|
||||
border-bottom: 0;
|
||||
border-radius: 0.25rem;
|
||||
border-collapse: separate;
|
||||
text-align: left;
|
||||
margin-top: 8px;
|
||||
border: 2px solid #dee2e6;
|
||||
border-bottom: 0;
|
||||
border-radius: 0.25rem;
|
||||
border-collapse: separate;
|
||||
text-align: left;
|
||||
margin-top: 8px;
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
thead {
|
||||
display: none;
|
||||
}
|
||||
.woocommerce-orders-table {
|
||||
&__cell {
|
||||
padding: 0.7rem 1.5rem;
|
||||
border-bottom: 2px solid #dee2e6;
|
||||
text-align: right !important;
|
||||
display: block;
|
||||
&::before {
|
||||
content: attr(data-title) ": ";
|
||||
font-weight: 700;
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
&__row {
|
||||
display: block;
|
||||
&:nth-child(even) {
|
||||
background: #ebebeb;
|
||||
}
|
||||
}
|
||||
// &__cell-order-actions::before {
|
||||
// display: none;
|
||||
// }
|
||||
&__cell-order-actions {
|
||||
&.red-color {
|
||||
color: #ed0000;
|
||||
}
|
||||
&.green-color {
|
||||
color: #00a700;
|
||||
}
|
||||
}
|
||||
&__cell-order-number a {
|
||||
text-decoration: none;
|
||||
color: #009688;
|
||||
}
|
||||
}
|
||||
|
||||
.woocommerce-button {
|
||||
display: inline-block;
|
||||
color: #ffffff;
|
||||
background-color: #009688;
|
||||
padding: 13px;
|
||||
border-radius: 4px;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
thead {
|
||||
display: none;
|
||||
}
|
||||
.woocommerce-orders-table {
|
||||
&__cell {
|
||||
padding: 0.7rem 1.5rem;
|
||||
border-bottom: 2px solid #dee2e6;
|
||||
text-align: right!important;
|
||||
display: block;
|
||||
&::before {
|
||||
content: attr(data-title) ": ";
|
||||
font-weight: 700;
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
&__row {
|
||||
display: block;
|
||||
&:nth-child(even) {
|
||||
background: #ebebeb;
|
||||
}
|
||||
}
|
||||
// &__cell-order-actions::before {
|
||||
// display: none;
|
||||
// }
|
||||
&__cell-order-actions {
|
||||
&.red-color {
|
||||
color: #ed0000;
|
||||
}
|
||||
&.green-color {
|
||||
color: #00a700
|
||||
}
|
||||
}
|
||||
&__cell-order-number a {
|
||||
text-decoration: none;
|
||||
color: #009688;
|
||||
}
|
||||
}
|
||||
|
||||
.woocommerce-button {
|
||||
display: inline-block;
|
||||
color: #ffffff;
|
||||
background-color: #009688;
|
||||
padding: 13px;
|
||||
border-radius: 4px;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.no-orders {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 16px;
|
||||
}
|
||||
@ -34,6 +34,10 @@ export class UserDataComponent implements OnInit {
|
||||
params: []
|
||||
}, RpcService.authService, true).subscribe({
|
||||
next: (res) => {
|
||||
if (res.code === 45) {
|
||||
this.messageService.add({severity:'warn', summary:'Данные не найдены, заполните их на этой странице'});
|
||||
return
|
||||
}
|
||||
if (!res.data) {
|
||||
this.messageService.add({severity:'error', summary:'Произошла ошибка, попробуйте позже'});
|
||||
return
|
||||
|
||||
Loading…
Reference in New Issue
Block a user