check order reservation update and payment route fixed
This commit is contained in:
@@ -426,13 +426,13 @@ function callback_url(callback,ref_no,order_id,status,min_type,time,exptime,reas
|
||||
access_code = approved_code;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: post_url,
|
||||
data: {url: callback, ref_no: ref_no, status: status, waiting_time: waiting_time, min_type: type, reason: reject_reason},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if(data.status){
|
||||
// $.ajax({
|
||||
// type: "POST",
|
||||
// url: post_url,
|
||||
// data: {url: callback, ref_no: ref_no, status: status, waiting_time: waiting_time, min_type: type, reason: reject_reason},
|
||||
// dataType: "json",
|
||||
// success: function(data) {
|
||||
// if(data.status){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
@@ -466,21 +466,21 @@ function callback_url(callback,ref_no,order_id,status,min_type,time,exptime,reas
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
swal({
|
||||
title: 'Oops',
|
||||
text: data.message,
|
||||
type: 'error',
|
||||
html: true,
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/order_reservation';
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
// }else{
|
||||
// swal({
|
||||
// title: 'Oops',
|
||||
// text: data.message,
|
||||
// type: 'error',
|
||||
// html: true,
|
||||
// closeOnConfirm: false,
|
||||
// closeOnCancel: false,
|
||||
// allowOutsideClick: false
|
||||
// }, function () {
|
||||
// window.location.href = '/origami/order_reservation';
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
function showNewOrderAlert(order_reservation,shop_code){
|
||||
|
||||
@@ -463,4 +463,21 @@ function showHideNavbar(webview,page){
|
||||
|
||||
function createAccessCode(code) {
|
||||
localStorage.setItem("access_code",code);
|
||||
}
|
||||
|
||||
//get menu item cache
|
||||
function getAllMenu(){
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: '/origami/get_all_menu',
|
||||
data: {},
|
||||
success:function(result){
|
||||
localStorage.setItem("menus", JSON.stringify(result));
|
||||
|
||||
var menu = localStorage.getItem("menus");
|
||||
if (menu != null ) {
|
||||
$( "#loading_wrapper").hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user