добавила уведомления на экране, изменила звук уведомления, отключила кнопку возврата дс
This commit is contained in:
parent
c883c2d914
commit
8bcf68b75d
@ -23,6 +23,8 @@ import { MenuComponent } from './components/menu/menu.component';
|
||||
import { ExitComponentComponent } from './components/exit-component/exit-component.component';
|
||||
import { TableModule } from 'primeng/table';
|
||||
import { ScrollPanelModule } from 'primeng/scrollpanel';
|
||||
import { ToastModule } from 'primeng/toast';
|
||||
|
||||
|
||||
|
||||
const routes = [
|
||||
@ -58,6 +60,7 @@ const routes = [
|
||||
MatSidenavModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
ToastModule,
|
||||
MessagesModule,
|
||||
TableModule,
|
||||
ScrollPanelModule,
|
||||
|
||||
@ -150,12 +150,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{sumRef}}</th>
|
||||
<th><button [disabled]="order[0].payment[0].summ == sumRef" (click)="doAdminRefund(order[0].external_id, order[0].payment[0].payload.id)">Возврат ДС</button></th>
|
||||
<!--<th><button [disabled]="order[0].payment[0].summ == sumRef" (click)="doAdminRefund(order[0].external_id, order[0].payment[0].payload.id)">Возврат ДС</button></th>-->
|
||||
<th><button disabled>Возврат ДС</button></th>
|
||||
</tr>
|
||||
</ng-template>
|
||||
</p-table>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<p-toast position="bottom-right" key="br" closable="false"></p-toast>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -48,3 +48,4 @@ tr {
|
||||
width: calc(100% - 5px);
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ import { JsonrpcService, RpcService } from "src/app/services/jsonrpc.service";
|
||||
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 { SwPush, NewsletterService } from '@angular/service-worker*/
|
||||
|
||||
|
||||
@ -118,7 +119,7 @@ export class OrdersComponent implements OnInit {
|
||||
document.getElementsByTagName('thead')[0].style.width = '100%';
|
||||
document.getElementsByTagName('thead')[0].style.tableLayout = 'fixed';
|
||||
document.getElementsByTagName('tbody')[0].style.display = 'block';
|
||||
document.getElementsByTagName('tbody')[0].style.maxHeight = 'calc(100vh - 290px)';
|
||||
document.getElementsByTagName('tbody')[0].style.maxHeight = 'calc(100vh - 385px)';
|
||||
document.getElementsByTagName('tbody')[0].style.overflowY = 'scroll';
|
||||
},
|
||||
error: (err) => {
|
||||
@ -131,8 +132,7 @@ export class OrdersComponent implements OnInit {
|
||||
}
|
||||
);
|
||||
}
|
||||
setTimeout (() => this.notif2(), 700)
|
||||
|
||||
setTimeout(() => this.notif2(), 700)
|
||||
}
|
||||
|
||||
|
||||
@ -146,13 +146,25 @@ notif2() {
|
||||
this.myAudioP.load();
|
||||
this.myAudioP.play();
|
||||
this.map_new_fin.set(this.orders[i].id, true);
|
||||
this.messageService.add({
|
||||
severity: 'info',
|
||||
detail: 'Пришел новый заказ №' + this.orders[i].external_id,
|
||||
summary: 'Новый заказ!',
|
||||
key: 'br', sticky: true
|
||||
})
|
||||
}
|
||||
var date1 = new Date();
|
||||
var date2 = new Date(this.orders[i].due_datetime);
|
||||
if ((date2.getTime() - date1.getTime() < 1000 * 3600) && (this.orders[i].status_h == 'К готовке') && (this.map_due.has(this.orders[i].id) == false) && (date2.getTime() - date1.getTime() > 1000 * 1080)) {
|
||||
if ((date2.getTime() - date1.getTime() < 1000 * 3600) && (this.orders[i].status_h == 'К готовке') && (this.map_due.has(this.orders[i].id) == false) && (date2.getTime() - date1.getTime() > 1000 * 3000)) {
|
||||
this.myAudioA.load();
|
||||
this.myAudioA.play();
|
||||
this.map_due.set(this.orders[i].id, true);
|
||||
this.messageService.add({
|
||||
severity: 'warn',
|
||||
detail: 'По заказу ' + this.orders[i].external_id + ' до прихода покупателя остался 1 час!',
|
||||
summary: 'Не взят в работу!',
|
||||
key: 'br', sticky: true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -233,7 +245,6 @@ notif2() {
|
||||
.subscribe({
|
||||
next: (result) => {
|
||||
let data = result.result
|
||||
console.log(data)
|
||||
},
|
||||
error: (err) => {
|
||||
console.log('ERROR: ', err)
|
||||
@ -244,7 +255,6 @@ notif2() {
|
||||
}
|
||||
}
|
||||
);
|
||||
console.log(id, qr_id)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user