add alert for new,send_to_kitchen and ready_to_delivery

This commit is contained in:
phyusin
2018-05-03 17:22:59 +06:30
parent 0748478bb4
commit 9ff3018323
15 changed files with 445 additions and 235 deletions

View File

@@ -1,6 +1,4 @@
App.checkin = App.cable.subscriptions.create('OrderReservationChannel', {
// App.messages = App.cable.subscriptions.create('MessagesChannel', {
App.order_reservation = App.cable.subscriptions.create('OrderReservationChannel', {
connected: function() {},
disconnected: function() {},
@@ -14,15 +12,11 @@ App.checkin = App.cable.subscriptions.create('OrderReservationChannel', {
var active_class = "";
if(key==0){
active_class = "tr-active";
showNewOrder(order[key]);
}
var rowCount = key+1;
var date = new Date(value.created_at);
// var deliveries = value["delivery"];
var isPM = date.getHours() >= 12;
var isMidday = date.getHours() == 12;
var time = [date.getHours() - (isPM && !isMidday ? 12 : 0),
date.getMinutes() || '00'].join(':') +
(isPM ? ' PM' : 'AM');
var time = timeFormat(date);
var created_at = date.getFullYear() +'-'+ (date.getMonth() > 10? date.getMonth() : '0' + (date.getMonth() + 1)) +'-'+ (date.getDate()>10?date.getDate() : '0'+date.getDate());
var delivery_type = "";
@@ -48,11 +42,11 @@ App.checkin = App.cable.subscriptions.create('OrderReservationChannel', {
+'</td>'
+' </tr>';
$('.order_reserve_cable tbody').append(row);
$('.custom-table.order_reserve_cable tbody').append(row);
});
}
customTableClick();
}
});