diff --git a/src/app/pages/divisions/divisions.component.html b/src/app/pages/divisions/divisions.component.html
index ae521c5..61bcd34 100644
--- a/src/app/pages/divisions/divisions.component.html
+++ b/src/app/pages/divisions/divisions.component.html
@@ -9,12 +9,18 @@
-
+
| ID |
Наименование подразделения |
|
|
+
+ |
+ |
+ |
+ |
+
diff --git a/src/app/pages/divisions/divisions.component.ts b/src/app/pages/divisions/divisions.component.ts
index f321cab..6dc1f8f 100644
--- a/src/app/pages/divisions/divisions.component.ts
+++ b/src/app/pages/divisions/divisions.component.ts
@@ -2,7 +2,7 @@ import { Component, OnInit } from "@angular/core";
import { JsonrpcService, RpcService } from "src/app/services/jsonrpc.service";
import { MessageService } from "primeng/api";
import { Divisions } from "src/app/interface/data";
-import { ConfirmationService } from 'primeng/api';
+import { ConfirmationService, FilterService, FilterMatchMode, SelectItem } from 'primeng/api';
@Component({
@@ -17,15 +17,38 @@ export class DivisionsComponent implements OnInit {
public create = false;
public chooseName!: string;
public ind: boolean = false;
+ public matchModeOptions!: SelectItem[];
constructor(
private jsonRpcService: JsonrpcService,
private messageService: MessageService,
- private confirmationService: ConfirmationService
+ private confirmationService: ConfirmationService,
+ private filterService: FilterService
) { }
ngOnInit(): void {
if (this.choose) { this.getDivisions() };
+
+ const customFilterName = "custom-contains";
+ this.filterService.register(customFilterName, (value: any, filter: any): boolean => {
+ if (filter === undefined || filter === null || filter.trim() === '') {
+ return true;
+ }
+
+ if (value === undefined || value === null) {
+ return false;
+ }
+ let det = value.toString()
+ let det2 = det.toLowerCase()
+ return det2.includes(filter.toString()) || det.includes(filter.toString());
+
+ });
+
+ this.matchModeOptions = [
+ { label: 'Содержит', value: customFilterName },
+ { label: 'Равно', value: FilterMatchMode.EQUALS },
+ { label: 'Начинается с', value: FilterMatchMode.STARTS_WITH },
+ ];
}
async getDivisions() {
diff --git a/src/app/pages/orders/orders.component.html b/src/app/pages/orders/orders.component.html
index b96819c..0ee32ea 100644
--- a/src/app/pages/orders/orders.component.html
+++ b/src/app/pages/orders/orders.component.html
@@ -22,13 +22,13 @@
Тип оплаты |
- |
+ |
|
|
|
|
- |
- |
+ |
+ |
|
diff --git a/src/app/pages/terminals/terminals.component.html b/src/app/pages/terminals/terminals.component.html
index 724adff..3233903 100644
--- a/src/app/pages/terminals/terminals.component.html
+++ b/src/app/pages/terminals/terminals.component.html
@@ -14,13 +14,22 @@
| ID |
- Наименование терминала |
- Адрес точки заказа |
+ ID кассы ККМ |
+ ID точки заказа |
Список ID цехов готовки |
Статус подключения |
|
|
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
@@ -67,7 +76,6 @@
-
diff --git a/src/app/pages/terminals/terminals.component.ts b/src/app/pages/terminals/terminals.component.ts
index 0914eb2..f12c8da 100644
--- a/src/app/pages/terminals/terminals.component.ts
+++ b/src/app/pages/terminals/terminals.component.ts
@@ -3,7 +3,7 @@ import { JsonrpcService, RpcService } from "src/app/services/jsonrpc.service";
import { MessageService } from "primeng/api";
import { Terminals, Areas } from "src/app/interface/data";
import { ScrollPanelModule } from 'primeng/scrollpanel';
-import { ConfirmationService } from 'primeng/api';
+import { ConfirmationService, FilterService, FilterMatchMode, SelectItem } from 'primeng/api';
@Component({
@@ -19,12 +19,14 @@ export class TerminalsComponent implements OnInit {
public chooseName!: string;
public areas: Areas[] = [];
public chooseArea: Array = [];
+ public matchModeOptions!: SelectItem[];
constructor(
private jsonRpcService: JsonrpcService,
private messageService: MessageService,
- private confirmationService: ConfirmationService
+ private confirmationService: ConfirmationService,
+ private filterService: FilterService
//readonly swPush: SwPush,
//private newsletterService: NewsletterService
@@ -32,6 +34,28 @@ export class TerminalsComponent implements OnInit {
ngOnInit(): void {
if (this.choose) { this.getTerminals() };
+
+ const customFilterName = "custom-contains";
+ this.filterService.register(customFilterName, (value: any, filter: any): boolean => {
+ if (filter === undefined || filter === null || filter.trim() === '') {
+ return true;
+ }
+
+ if (value === undefined || value === null) {
+ return false;
+ }
+ let det = value.toString()
+ let det2 = det.toLowerCase()
+ return det2.includes(filter.toString()) || det.includes(filter.toString());
+
+ });
+
+ this.matchModeOptions = [
+ { label: 'Содержит', value: customFilterName },
+ { label: 'Равно', value: FilterMatchMode.EQUALS },
+ { label: 'Начинается с', value: FilterMatchMode.STARTS_WITH },
+ ];
+
}
async getTerminals() {