change js func:

This commit is contained in:
phyusin
2018-06-04 13:46:26 +06:30
parent 5ad58f5095
commit 6ee8192cde
3 changed files with 16 additions and 19 deletions

View File

@@ -31,7 +31,7 @@ App.order_reservation = App.cable.subscriptions.create('OrderReservationChannel'
if(key==0){
var order_id = value.order_reservation_id;
var sr_no = rowCount;
var url = "order_reservation/get_order/"+order_id;
var url = "/origami/order_reservation/get_order/"+order_id;
if (typeof show_order_detail !== 'undefined' && $.isFunction(show_order_detail)) {
show_order_detail(url,sr_no);
}

View File

@@ -1,6 +1,3 @@
//= require origami.js
$(function() {
$("#discount").hide();
$(".expected_time").hide();
@@ -215,7 +212,7 @@ function check_emp_access_code(access_code,type) {
url: url,
data: {},
success: function (result) {
console.log(result)
// console.log(result)
if (result.status == true) {
// createAccessCode(code);
$("#approved_code").text(code);
@@ -571,4 +568,15 @@ function getOrderMonth(month){
function getOrderDay(day){
var DAYS = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];
return DAYS[day - 1];
}
}
/* 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 */

View File

@@ -15,6 +15,7 @@
//= require BSBMaterial/turbolink_admin.js
//= require BSBMaterial/demo.js
//= require custom.js
//= require order_reservation.js
/* Constant Varaibles */
_CREDIT_PAYMENTS_ = "/   CREDIT PAYMENTS";
@@ -463,16 +464,4 @@ function showHideNavbar(webview,page){
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 */
}