14087 - Питьсбург. Правки в админке
This commit is contained in:
parent
1de86131c6
commit
08c4bdb12d
@ -5,7 +5,7 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve --proxy-config proxy.confi.json",
|
"start": "ng serve --proxy-config proxy.confi.json",
|
||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
"build-test:lithium": "ng build --output-path=/var/www/html/selfdelivery-pitsburg-test.mydatahosting.ru --configuration=test",
|
"build-test:lithium": "ng build --configuration=test",
|
||||||
"build-prod:lithium": "ng build --output-path=/var/www/html/selfdelivery-pitsburg.mydatahosting.ru",
|
"build-prod:lithium": "ng build --output-path=/var/www/html/selfdelivery-pitsburg.mydatahosting.ru",
|
||||||
"watch": "ng build --watch --configuration development",
|
"watch": "ng build --watch --configuration development",
|
||||||
"test": "ng test"
|
"test": "ng test"
|
||||||
|
|||||||
@ -68,7 +68,7 @@
|
|||||||
<ng-template #order_v>
|
<ng-template #order_v>
|
||||||
<div>
|
<div>
|
||||||
<button (click)="listOrders()">К списку</button>
|
<button (click)="listOrders()">К списку</button>
|
||||||
<h1>Заказ: {{order[0].id}}</h1>
|
<h1>Заказ: {{order[0]?.id}}</h1>
|
||||||
<p-table [value]="order">
|
<p-table [value]="order">
|
||||||
<ng-template pTemplate="header">
|
<ng-template pTemplate="header">
|
||||||
<tr>
|
<tr>
|
||||||
@ -150,7 +150,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Сумма оплаты</th>
|
<th>Сумма оплаты</th>
|
||||||
<th>Тип оплаты</th>
|
<th>Тип оплаты</th>
|
||||||
<th *ngIf="order[0].payment[0]?.type !== 'CASH'">Статус оплаты</th>
|
<th *ngIf="order[0].payment[0]?.type?.toUpperCase() !== 'CASH'">Статус оплаты</th>
|
||||||
<!-- <th *ngIf="['PAID', 'NOTIFIED', 'INTERNAL_ERROR', 'PROCESSING'].includes(order[0].payment[0]?.payload?.status || '') && order[0].payment[0]?.type !== 'CASH'">Отмена заказа</th> -->
|
<!-- <th *ngIf="['PAID', 'NOTIFIED', 'INTERNAL_ERROR', 'PROCESSING'].includes(order[0].payment[0]?.payload?.status || '') && order[0].payment[0]?.type !== 'CASH'">Отмена заказа</th> -->
|
||||||
<th>Отмена заказа</th>
|
<th>Отмена заказа</th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -159,7 +159,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{{pay.summ}}</td>
|
<td>{{pay.summ}}</td>
|
||||||
<td>{{pay.type | paymentType}}</td>
|
<td>{{pay.type | paymentType}}</td>
|
||||||
<td *ngIf="pay.type !== 'CASH'">{{pay?.payload?.status | paymentStatus}}</td>
|
<td *ngIf="pay?.type?.toUpperCase() !== 'CASH'">{{pay?.payload?.status | paymentStatus}}</td>
|
||||||
<!-- <td *ngIf="['PAID', 'NOTIFIED', 'INTERNAL_ERROR', 'PROCESSING'].includes(order[0].payment[0]?.payload?.status || '') && order[0].payment[0]?.type !== 'CASH'"> -->
|
<!-- <td *ngIf="['PAID', 'NOTIFIED', 'INTERNAL_ERROR', 'PROCESSING'].includes(order[0].payment[0]?.payload?.status || '') && order[0].payment[0]?.type !== 'CASH'"> -->
|
||||||
<td>
|
<td>
|
||||||
<button (click)="cancelOrder(pay.payload?.id)">Отменить</button>
|
<button (click)="cancelOrder(pay.payload?.id)">Отменить</button>
|
||||||
|
|||||||
@ -332,6 +332,9 @@ export class OrdersComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
error: (error) => {
|
error: (error) => {
|
||||||
console.log('ERROR: ', error);
|
console.log('ERROR: ', error);
|
||||||
|
if(error?.error?.error?.code === 3){
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.messageService.add({
|
this.messageService.add({
|
||||||
severity: 'error',
|
severity: 'error',
|
||||||
summary: 'Произошла ошибка!',
|
summary: 'Произошла ошибка!',
|
||||||
@ -341,7 +344,7 @@ export class OrdersComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cancelOrder(payment_request_id: string) {
|
cancelOrder(payment_request_id: string) {
|
||||||
if (this.order[0].payment[0]?.type === 'CASH') {
|
if (this.order[0].payment[0]?.type?.toUpperCase() === 'CASH' && !this.order[0].payment[0]?.payload?.id) {
|
||||||
this.changeOrderStatus(this.order[0].id, 'cancel');
|
this.changeOrderStatus(this.order[0].id, 'cancel');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user