diff --git a/src/app/app.component.scss b/src/app/app.component.scss
index 1ff9aa9..68161eb 100644
--- a/src/app/app.component.scss
+++ b/src/app/app.component.scss
@@ -1,3 +1,4 @@
.main-container {
height: 100%;
+ z-index: auto !important;
}
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index d444633..a4df18e 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -24,6 +24,8 @@ import { ExitComponentComponent } from './components/exit-component/exit-compone
import { TableModule } from 'primeng/table';
import { ScrollPanelModule } from 'primeng/scrollpanel';
import { ToastModule } from 'primeng/toast';
+import { ConfirmDialogModule } from 'primeng/confirmdialog';
+import { ConfirmationService } from 'primeng/api';
@@ -62,11 +64,12 @@ const routes = [
ReactiveFormsModule,
ToastModule,
MessagesModule,
+ ConfirmDialogModule,
TableModule,
ScrollPanelModule,
RouterModule.forRoot(routes)
],
- providers: [MessageService, {provide: APP_BASE_HREF, useValue: '/'}],
+ providers: [MessageService, { provide: APP_BASE_HREF, useValue: '/' }, ConfirmationService],
bootstrap: [AppComponent]
})
export class AppModule { }
diff --git a/src/app/pages/areas/areas.component.html b/src/app/pages/areas/areas.component.html
index d2b348a..c8010a6 100644
--- a/src/app/pages/areas/areas.component.html
+++ b/src/app/pages/areas/areas.component.html
@@ -9,7 +9,7 @@
-
+
| ID |
Наименование зоны |
|
@@ -22,7 +22,7 @@
{{areas.id}} |
{{areas.name}} |
|
- |
+ |
@@ -45,3 +45,6 @@
+
+
+
diff --git a/src/app/pages/areas/areas.component.ts b/src/app/pages/areas/areas.component.ts
index 08702b0..a9680e7 100644
--- a/src/app/pages/areas/areas.component.ts
+++ b/src/app/pages/areas/areas.component.ts
@@ -2,6 +2,7 @@ import { Component, OnInit } from "@angular/core";
import { JsonrpcService, RpcService } from "src/app/services/jsonrpc.service";
import { MessageService } from "primeng/api";
import { Areas } from "src/app/interface/data";
+import { ConfirmationService } from 'primeng/api';
@Component({
@@ -18,7 +19,8 @@ export class AreasComponent implements OnInit {
constructor(
private jsonRpcService: JsonrpcService,
- private messageService: MessageService
+ private messageService: MessageService,
+ private confirmationService: ConfirmationService
) { }
ngOnInit(): void {
@@ -87,7 +89,7 @@ export class AreasComponent implements OnInit {
});
this.new_ar = true;
this.jsonRpcService.changeId = "";
- this.getAreas();
+ setTimeout(() => this.getAreas(), 100);
}
deleteArea(id: any) {
@@ -146,4 +148,13 @@ export class AreasComponent implements OnInit {
}
+ confirm(id: any) {
+ this.confirmationService.confirm({
+ message: 'Вы действительно хотите удалить элемент?',
+ accept: () => {
+ this.deleteArea(id)
+ }
+ });
+ }
+
}
diff --git a/src/app/pages/clients/clients.component.html b/src/app/pages/clients/clients.component.html
index 7964bb1..c08ef58 100644
--- a/src/app/pages/clients/clients.component.html
+++ b/src/app/pages/clients/clients.component.html
@@ -5,45 +5,48 @@
Выберите клиента
-
-
-
-
-
- | ID |
- Наименование организации |
- |
- |
- |
-
-
-
-
-
- | {{client.id}} |
- {{client.name}} |
- |
- |
- |
-
-
-
-
-
-
-
-
-
-
- | Введите наименование организации: |
- |
-
-
-
-
-
-
-
-
+
+
+
+
+
+ | ID |
+ Наименование организации |
+ |
+ |
+ |
+
+
+
+
+ | {{client.id}} |
+ {{client.name}} |
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+ | Введите наименование организации: |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/pages/clients/clients.component.ts b/src/app/pages/clients/clients.component.ts
index 5571744..6e58f3d 100644
--- a/src/app/pages/clients/clients.component.ts
+++ b/src/app/pages/clients/clients.component.ts
@@ -2,6 +2,7 @@ import { Component, OnInit } from "@angular/core";
import { JsonrpcService, RpcService } from "src/app/services/jsonrpc.service";
import { MessageService } from "primeng/api";
import { Client } from "src/app/interface/data";
+import { ConfirmationService } from 'primeng/api';
@@ -21,7 +22,8 @@ export class ClientsComponent implements OnInit {
constructor(
private jsonRpcService: JsonrpcService,
- private messageService: MessageService
+ private messageService: MessageService,
+ private confirmationService: ConfirmationService
) { }
ngOnInit(): void {
@@ -116,13 +118,10 @@ export class ClientsComponent implements OnInit {
}
chooseClient(id: any, name: any) {
- this.myAudio.src = "../../../assets/myAudio.mp3"
this.jsonRpcService.ClientChooseName = name;
this.jsonRpcService.ClientChoose = id;
this.choose = this.jsonRpcService.ClientChoose;
this.chooseName = this.jsonRpcService.ClientChooseName;
- //this.myAudio.load();
- //this.myAudio.play();
}
createCient() {
@@ -155,4 +154,13 @@ export class ClientsComponent implements OnInit {
}
+ confirm(id: any) {
+ this.confirmationService.confirm({
+ message: 'Вы действительно хотите удалить элемент?',
+ accept: () => {
+ this.deleteClient(id)
+ }
+ });
+ }
+
}
diff --git a/src/app/pages/divisions/divisions.component.html b/src/app/pages/divisions/divisions.component.html
index fd93e87..ae521c5 100644
--- a/src/app/pages/divisions/divisions.component.html
+++ b/src/app/pages/divisions/divisions.component.html
@@ -22,7 +22,7 @@
{{Division.id}} |
{{Division.name}} |
|
- |
+ |
@@ -45,3 +45,7 @@
+
+
+
+
diff --git a/src/app/pages/divisions/divisions.component.ts b/src/app/pages/divisions/divisions.component.ts
index b997da0..f321cab 100644
--- a/src/app/pages/divisions/divisions.component.ts
+++ b/src/app/pages/divisions/divisions.component.ts
@@ -2,6 +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';
@Component({
@@ -15,10 +16,12 @@ export class DivisionsComponent implements OnInit {
public choose = this.jsonRpcService.ClientChoose;
public create = false;
public chooseName!: string;
+ public ind: boolean = false;
constructor(
private jsonRpcService: JsonrpcService,
- private messageService: MessageService
+ private messageService: MessageService,
+ private confirmationService: ConfirmationService
) { }
ngOnInit(): void {
@@ -87,7 +90,7 @@ export class DivisionsComponent implements OnInit {
});
this.new_div = true;
this.jsonRpcService.changeId = "";
- this.getDivisions();
+ setTimeout(() => this.getDivisions(), 100);
}
deleteDivision(id: any) {
@@ -153,4 +156,13 @@ export class DivisionsComponent implements OnInit {
}
+ confirm(id: any) {
+ this.confirmationService.confirm({
+ message: 'Вы действительно хотите удалить элемент?',
+ accept: () => {
+ this.deleteDivision(id)
+ }
+ });
+ }
+
}
diff --git a/src/app/pages/orders/orders.component.html b/src/app/pages/orders/orders.component.html
index c34bcc4..1081df1 100644
--- a/src/app/pages/orders/orders.component.html
+++ b/src/app/pages/orders/orders.component.html
@@ -10,7 +10,7 @@
-
+
| ID |
Статус |
@@ -21,7 +21,7 @@
Телефон клиента |
Тип оплаты |
-
+
|
|
|
@@ -45,9 +45,9 @@
{{order.payment[0].type}} |
-
- Нет данных |
-
+
+ Нет данных |
+
@@ -150,7 +150,7 @@
| {{sumRef}} |
-
+
|
@@ -159,6 +159,8 @@
+
+
diff --git a/src/app/pages/orders/orders.component.ts b/src/app/pages/orders/orders.component.ts
index b1d882a..0fe5bf9 100644
--- a/src/app/pages/orders/orders.component.ts
+++ b/src/app/pages/orders/orders.component.ts
@@ -5,6 +5,7 @@ import { MessageService } from "primeng/api";
import { Order, Products, Delivery_address, Notification, Refund } from "src/app/interface/data";
import { ClientsComponent } from "../clients/clients.component";
import { ToastModule } from 'primeng/toast';
+import { ConfirmationService } from 'primeng/api';
/*import { SwPush, NewsletterService } from '@angular/service-worker*/
@@ -57,6 +58,7 @@ export class OrdersComponent implements OnInit {
private jsonRpcService: JsonrpcService,
private messageService: MessageService,
private clientsComponent: ClientsComponent,
+ private confirmationService: ConfirmationService
) {
}
@@ -291,4 +293,13 @@ notif2() {
};
}
}
+
+ confirm(id: any, qr_id: any) {
+ this.confirmationService.confirm({
+ message: 'Вы действительно хотите отменить заказ?',
+ accept: () => {
+ this.doAdminRefund(id, qr_id)
+ }
+ });
+ }
}
diff --git a/src/app/pages/terminals/terminals.component.html b/src/app/pages/terminals/terminals.component.html
index f8536d8..b634672 100644
--- a/src/app/pages/terminals/terminals.component.html
+++ b/src/app/pages/terminals/terminals.component.html
@@ -1,7 +1,6 @@
Терминалы
-
Выбран: {{chooseName}}
Выберите клиента
@@ -12,16 +11,16 @@
-
-
- | ID |
- Наименование терминала |
- Адрес точки заказа |
- Список ID цехов готовки |
- Статус подключения |
- |
- |
-
+
+
+ | ID |
+ Наименование терминала |
+ Адрес точки заказа |
+ Список ID цехов готовки |
+ Статус подключения |
+ |
+ |
+
@@ -32,7 +31,7 @@
{{terminals.area_types}} |
|
|
- |
+ |
@@ -74,3 +73,6 @@
+
+
+
diff --git a/src/app/pages/terminals/terminals.component.ts b/src/app/pages/terminals/terminals.component.ts
index 5b357eb..b6589e9 100644
--- a/src/app/pages/terminals/terminals.component.ts
+++ b/src/app/pages/terminals/terminals.component.ts
@@ -3,6 +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';
@Component({
@@ -23,6 +24,7 @@ export class TerminalsComponent implements OnInit {
constructor(
private jsonRpcService: JsonrpcService,
private messageService: MessageService,
+ private confirmationService: ConfirmationService
//readonly swPush: SwPush,
//private newsletterService: NewsletterService
@@ -131,7 +133,7 @@ export class TerminalsComponent implements OnInit {
});
this.new_ter = true;
this.jsonRpcService.changeId = "";
- this.getTerminals();
+ setTimeout(() => this.getTerminals(), 100);
}
deleteTerminal(id: any) {
@@ -190,4 +192,13 @@ export class TerminalsComponent implements OnInit {
}
+ confirm(id: any) {
+ this.confirmationService.confirm({
+ message: 'Вы действительно хотите удалить элемент?',
+ accept: () => {
+ this.deleteTerminal(id)
+ }
+ });
+ }
+
}
diff --git a/src/styles.scss b/src/styles.scss
index ce676b9..ddd3e1c 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -52,4 +52,8 @@ h1 {
cursor: pointer;
}
+.mat-sidenav {
+ z-index: auto !important;
+}
+