chagne notification modal

This commit is contained in:
phyusin
2018-05-10 15:50:46 +06:30
parent 70b3e88b0e
commit 9fe77bb283
5 changed files with 92 additions and 74 deletions

View File

@@ -18,23 +18,29 @@ App.check_new_order = App.cable.subscriptions.create('CheckNewOrderChannel', {
});
// alert(order_lists);
swal({
title: 'Information',
target: document.getElementById("notify_new_order"),
text: "You have new orders <br/>"+
"Are you accept or reject for these orders <b>"+order_lists+"</b>?",
type: 'success',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function (isConfirm) {
if(isConfirm){
swal.close();
}
});
// $("#notify_new_order_lists").text(order_lists);
// $("#notify_new_order").modal({show: true, keyboard: false, backdrop: false});
// swal({
// title: 'Information',
// target: document.getElementById("notify_new_order"),
// text: "You have new orders <br/>"+
// "Are you accept or reject for these orders <b>"+order_lists+"</b>?",
// type: 'success',
// html: true,
// closeOnConfirm: false,
// closeOnCancel: false,
// allowOutsideClick: false
// }, function (isConfirm) {
// if(isConfirm){
// swal.close();
// }
// });
$("#notify_new_order_lists").text(order_lists);
$("#notify_new_order").on('shown.bs.modal', function(e){
$("#notify_new_order").focus();
$("#notify_order_send_to_kitchen").modal('hide');
$("#notify_order_ready_to_delivery").modal('hide');
}).on('hide.bs.modal', function (e) {
$("#notify_new_order").modal("hide");
}).modal({show: true, keyboard: false, backdrop: false});
}
}
});

View File

@@ -18,23 +18,29 @@ App.check_order_ready_to_delivery = App.cable.subscriptions.create('CheckOrderRe
});
// alert(order_lists);
swal({
title: 'Information',
target: document.getElementById("notify_order_ready_to_delivery"),
text: "You have orders that are ready to deliver <br/>"+
"Could you ready these orders <b>"+order_lists+"</b> to deliver?",
type: 'success',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function (isConfirm) {
if(isConfirm){
swal.close();
}
});
// $("#notify_order_ready_to_delivery_lists").text(order_lists);
// $("#notify_order_ready_to_delivery").modal({show: true, keyboard: false, backdrop: false});
// swal({
// title: 'Information',
// target: document.getElementById("notify_order_ready_to_delivery"),
// text: "You have orders that are ready to deliver <br/>"+
// "Could you ready these orders <b>"+order_lists+"</b> to deliver?",
// type: 'success',
// html: true,
// closeOnConfirm: false,
// closeOnCancel: false,
// allowOutsideClick: false
// }, function (isConfirm) {
// if(isConfirm){
// swal.close();
// }
// });
$("#notify_order_ready_to_delivery_lists").text(order_lists);
$("#notify_order_ready_to_delivery").on('shown.bs.modal', function(e){
$("#notify_order_ready_to_delivery").focus();
$("#notify_new_order").modal('hide');
$("#notify_order_send_to_kitchen").modal('hide');
}).on('hide.bs.modal', function (e) {
$("#notify_order_ready_to_delivery").modal("hide");
}).modal({show: true, keyboard: false, backdrop: false});
}
}
});

View File

@@ -18,23 +18,29 @@ App.check_order_send_to_kitchen = App.cable.subscriptions.create('CheckOrderSend
});
// alert(order_lists);
swal({
title: 'Information',
target: document.getElementById("notify_order_send_to_kitchen"),
text: "You have to send order to kitchen <br/>"+
"Could you send these orders <b>"+order_lists+"</b> to kitchen?",
type: 'success',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function (isConfirm) {
if(isConfirm){
swal.close();
}
});
// $("#notify_order_send_to_kitchen_lists").text(order_lists);
// $("#notify_order_send_to_kitchen").modal({show: true, keyboard: false, backdrop: false});
// swal({
// title: 'Information',
// target: document.getElementById("notify_order_send_to_kitchen"),
// text: "You have to send order to kitchen <br/>"+
// "Could you send these orders <b>"+order_lists+"</b> to kitchen?",
// type: 'success',
// html: true,
// closeOnConfirm: false,
// closeOnCancel: false,
// allowOutsideClick: false
// }, function (isConfirm) {
// if(isConfirm){
// swal.close();
// }
// });
$("#notify_order_send_to_kitchen_lists").text(order_lists);
$("#notify_order_send_to_kitchen").on('shown.bs.modal', function(e){
$("#notify_order_send_to_kitchen").focus();
$("#notify_new_order").modal('hide');
$("#notify_order_ready_to_delivery").modal('hide');
}).on('hide.bs.modal', function (e) {
$("#notify_order_send_to_kitchen").modal("hide");
}).modal({show: true, keyboard: false, backdrop: false});
}
}
});

View File

@@ -45,7 +45,7 @@ $(function() {
$("#accepted").on("click", function(){
if($(this).text().trim() == "ACCEPT"){
$("#status").text($(this).attr("data-value"));
var requested_time = $("#requested_date_time").text();
var requested_time = $("#requested_time").text();
$("#requested_order_time").text(requested_time);
$("#waiting_timeModal").modal({show : true, backdrop: false, keyboard : false});
}else{