transactions for order reservation and api for tax profile
This commit is contained in:
@@ -15,7 +15,9 @@ App.order_reservation = App.cable.subscriptions.create('OrderReservationChannel'
|
||||
var active_class = "";
|
||||
if(key==0){
|
||||
active_class = "tr-active";
|
||||
showNewOrder(order[key],shop_code);
|
||||
if (typeof showNewOrder !== 'undefined' && $.isFunction(showNewOrder)) {
|
||||
showNewOrder(order[key],shop_code);
|
||||
}
|
||||
}
|
||||
var rowCount = key+1;
|
||||
var date = new Date(value.created_at);
|
||||
@@ -49,7 +51,9 @@ App.order_reservation = App.cable.subscriptions.create('OrderReservationChannel'
|
||||
});
|
||||
}
|
||||
|
||||
customTableClick();
|
||||
if (typeof customTableClick !== 'undefined' && $.isFunction(customTableClick)) {
|
||||
customTableClick();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -158,6 +158,7 @@ $(document).ready(function() {
|
||||
//end Notificaiotn message
|
||||
});
|
||||
|
||||
/* start order reservation function */
|
||||
function audioPlayBackground(shop_code){
|
||||
//audio play
|
||||
var audio = new Audio('/'+shop_code+'-beep.mp3'); // define your audio
|
||||
@@ -166,3 +167,4 @@ function audioPlayBackground(shop_code){
|
||||
audio.play();
|
||||
// },10000);
|
||||
}
|
||||
/* end order reservation function */
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
|
||||
//= require origami.js
|
||||
|
||||
$(function() {
|
||||
$("#discount").hide();
|
||||
$(".expected_time").hide();
|
||||
@@ -482,15 +484,6 @@ function callback_url(callback,ref_no,order_id,status,min_type,time,exptime,reas
|
||||
});
|
||||
}
|
||||
|
||||
function timeFormat(date){
|
||||
var isPM = date.getHours() >= 12;
|
||||
var isMidday = date.getHours() == 12;
|
||||
var time = [(date.getHours()>10? date.getHours() : '0'+date.getHours()) - (isPM && !isMidday ? 12 : 0),
|
||||
(date.getMinutes()>10? date.getMinutes() : '0'+date.getMinutes()) || '00'].join(':') +
|
||||
(isPM ? ' PM' : ' AM');
|
||||
return time;
|
||||
}
|
||||
|
||||
function showNewOrder(order_reservation,shop_code){
|
||||
if((order_reservation!=undefined) && (order_reservation!=null) && (order_reservation!="")){
|
||||
var date = new Date(order_reservation.requested_time);
|
||||
|
||||
@@ -464,3 +464,14 @@ function createAccessCode(code) {
|
||||
localStorage.setItem("access_code",code);
|
||||
}
|
||||
|
||||
/* start order reservation function */
|
||||
function timeFormat(date){
|
||||
var isPM = date.getHours() >= 12;
|
||||
var isMidday = date.getHours() == 12;
|
||||
var time = [(date.getHours()>10? date.getHours() : '0'+date.getHours()) - (isPM && !isMidday ? 12 : 0),
|
||||
(date.getMinutes()>10? date.getMinutes() : '0'+date.getMinutes()) || '00'].join(':') +
|
||||
(isPM ? ' PM' : ' AM');
|
||||
return time;
|
||||
}
|
||||
|
||||
/* end order reservation function */
|
||||
Reference in New Issue
Block a user