parent
d7265def88
commit
acc9175381
7
src/app/data/data.ts
Normal file
7
src/app/data/data.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export const OrderTypes = {
|
||||||
|
"mobileApp": "Мобильное приложение",
|
||||||
|
"offlineReline": "Кассовое приложение",
|
||||||
|
"mobileAppOfflineOrder": "Диплинк",
|
||||||
|
"selfServiceTerminalOrder": "Терминал самообслуживания",
|
||||||
|
"notFound": "Тип не найден"
|
||||||
|
}
|
||||||
@ -63,6 +63,7 @@ export interface Order {
|
|||||||
status_h: string;
|
status_h: string;
|
||||||
item_style: string;
|
item_style: string;
|
||||||
isWarnLine: boolean;
|
isWarnLine: boolean;
|
||||||
|
type: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Client {
|
export interface Client {
|
||||||
|
|||||||
@ -20,6 +20,7 @@
|
|||||||
<th>Внешний ID заказа</th>
|
<th>Внешний ID заказа</th>
|
||||||
<th>Телефон клиента</th>
|
<th>Телефон клиента</th>
|
||||||
<th>Тип оплаты</th>
|
<th>Тип оплаты</th>
|
||||||
|
<th>Тип заказа</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="position:sticky !important; top: 55px">
|
<tr style="position:sticky !important; top: 55px">
|
||||||
<th><p-columnFilter type="text" field="id" [matchModeOptions]="matchModeOptions" [matchMode]="'custom-contains'"></p-columnFilter></th>
|
<th><p-columnFilter type="text" field="id" [matchModeOptions]="matchModeOptions" [matchMode]="'custom-contains'"></p-columnFilter></th>
|
||||||
@ -43,6 +44,7 @@
|
|||||||
<td>{{order.external_id}}</td>
|
<td>{{order.external_id}}</td>
|
||||||
<td>{{order.phone}}</td>
|
<td>{{order.phone}}</td>
|
||||||
<td *ngIf="order.payment[0]; else nd">{{order.payment[0].type}}</td>
|
<td *ngIf="order.payment[0]; else nd">{{order.payment[0].type}}</td>
|
||||||
|
<td>{{orderTypes[leadToTypeOrderType(order.type)]}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template #nd>
|
<ng-template #nd>
|
||||||
@ -62,6 +64,7 @@
|
|||||||
<th>Дата создания</th>
|
<th>Дата создания</th>
|
||||||
<th>ID точки заказа</th>
|
<th>ID точки заказа</th>
|
||||||
<th>Статус</th>
|
<th>Статус</th>
|
||||||
|
<th>Тип заказа</th>
|
||||||
</tr>
|
</tr>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template pTemplate="body" let-ord>
|
<ng-template pTemplate="body" let-ord>
|
||||||
@ -89,6 +92,7 @@
|
|||||||
<option>Напечатан</option>
|
<option>Напечатан</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
|
<td>{{orderTypes[leadToTypeOrderType(ord.type)]}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</p-table>
|
</p-table>
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import { Order, Products, Delivery_address, Notification, Refund } from "src/app
|
|||||||
import { ClientsComponent } from "../clients/clients.component";
|
import { ClientsComponent } from "../clients/clients.component";
|
||||||
import { ToastModule } from 'primeng/toast';
|
import { ToastModule } from 'primeng/toast';
|
||||||
import { ConfirmationService, FilterService, FilterMatchMode, SelectItem } from 'primeng/api';
|
import { ConfirmationService, FilterService, FilterMatchMode, SelectItem } from 'primeng/api';
|
||||||
|
import { OrderTypes } from "src/app/data/data";
|
||||||
/*import { SwPush, NewsletterService } from '@angular/service-worker*/
|
/*import { SwPush, NewsletterService } from '@angular/service-worker*/
|
||||||
|
|
||||||
|
|
||||||
@ -36,6 +37,7 @@ export class OrdersComponent implements OnInit {
|
|||||||
public sumRef3: any = 0;
|
public sumRef3: any = 0;
|
||||||
public matchModeOptions!: SelectItem[];
|
public matchModeOptions!: SelectItem[];
|
||||||
public dis: boolean = false;
|
public dis: boolean = false;
|
||||||
|
public readonly orderTypes = OrderTypes
|
||||||
|
|
||||||
|
|
||||||
public statuses = [
|
public statuses = [
|
||||||
@ -398,4 +400,8 @@ notif2() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
leadToTypeOrderType(str: any) {
|
||||||
|
return str as keyof typeof this.orderTypes
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user