change order reservation -not finished
This commit is contained in:
@@ -18,8 +18,23 @@ App.check_new_order = App.cable.subscriptions.create('CheckNewOrderChannel', {
|
||||
});
|
||||
|
||||
// alert(order_lists);
|
||||
$("#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").modal({show: true, keyboard: false, backdrop: false});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -18,8 +18,23 @@ App.check_order_ready_to_delivery = App.cable.subscriptions.create('CheckOrderRe
|
||||
});
|
||||
|
||||
// alert(order_lists);
|
||||
$("#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").modal({show: true, keyboard: false, backdrop: false});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -18,8 +18,23 @@ App.check_order_send_to_kitchen = App.cable.subscriptions.create('CheckOrderSend
|
||||
});
|
||||
|
||||
// alert(order_lists);
|
||||
$("#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").modal({show: true, keyboard: false, backdrop: false});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -55,7 +55,7 @@ $(function() {
|
||||
$("#cancel").on("click", function(){
|
||||
var order_status = $("#order_status").text();
|
||||
$("#status").text($(this).attr("data-value"));
|
||||
if(order_status!="new" && order_status!= "accepted"){
|
||||
if(order_status!="new" && order_status!= "accepted" && order_status!="send_to_kitchen"){
|
||||
$("#AccessCodeModal").modal({show: true, backdrop: false, keyboard: false});
|
||||
}else{
|
||||
$("#rejected_reasonModal").modal({show: true, backdrop: false, keyboard: false});
|
||||
@@ -63,13 +63,24 @@ $(function() {
|
||||
});
|
||||
|
||||
$(".send_status").on("click",function(){
|
||||
var status = $("#status").text();
|
||||
var order_id = $('#order_id').text();
|
||||
var callback = $('#callback_url').text();
|
||||
var ref_no = $('#ref_no').text();
|
||||
var reason = $('#reject_reason').val();
|
||||
var approved_code = $("#approved_code").text();
|
||||
callback_url(callback,ref_no,order_id,status,"","","",reason,approved_code);
|
||||
$("#reject_reasonErr").html("");
|
||||
if($('#reject_reason').val() != ""){
|
||||
var order_status = $("#order_status").text();
|
||||
var status = $("#status").text();
|
||||
var order_id = $('#order_id').text();
|
||||
var callback = $('#callback_url').text();
|
||||
var ref_no = $('#ref_no').text();
|
||||
var reason = "";
|
||||
var approved_code = $("#approved_code").text();
|
||||
if(order_status == 'ready_to_delivery'){
|
||||
reason = "VOID ::" + $('#reject_reason').val();
|
||||
}else{
|
||||
reason = $('#reject_reason').val();
|
||||
}
|
||||
callback_url(callback,ref_no,order_id,status,"","","",reason,approved_code);
|
||||
}else{
|
||||
$("#reject_reasonErr").html("This is required field");
|
||||
}
|
||||
});
|
||||
|
||||
$(".timer_type").on("click",function(){
|
||||
|
||||
Reference in New Issue
Block a user