some changes for order reservation
This commit is contained in:
@@ -76,6 +76,11 @@ App.order_reservation = App.cable.subscriptions.create('OrderReservationChannel'
|
||||
if (typeof customTableClick !== 'undefined' && $.isFunction(customTableClick)) {
|
||||
customTableClick();
|
||||
}
|
||||
|
||||
if(parseInt(getOnlineOrderCount()) > 0){
|
||||
$('.order_no').addClass("order-badge");
|
||||
$('.order_no').html(parseInt(getOnlineOrderCount()));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -176,4 +176,25 @@ function audioPlayBackground(shop_code,audio){
|
||||
audio.play();
|
||||
// },10000);
|
||||
}
|
||||
/* end order reservation function */
|
||||
/* end order reservation function */
|
||||
|
||||
/* online order count*/
|
||||
function getOnlineOrderCount(){
|
||||
var count = 0;
|
||||
//Start Ajax
|
||||
$.ajax({
|
||||
async: false,
|
||||
type: "GET",
|
||||
url: "/origami/get_order_info",
|
||||
dataType: "json",
|
||||
success: function(data){
|
||||
if(parseInt(data) > 0){
|
||||
count = parseInt(data);
|
||||
}
|
||||
}
|
||||
});
|
||||
//end Ajax
|
||||
// alert(count);
|
||||
return count;
|
||||
}
|
||||
/* online order count*/
|
||||
@@ -20,6 +20,7 @@ $(function() {
|
||||
$('#cancel').hide();
|
||||
$(".tbl_customer").hide();
|
||||
$(".order_close_cashier").hide();
|
||||
$(".order_btns").show();
|
||||
refreshDetailData();
|
||||
if (type == "pending") {
|
||||
$(".first-1").click();
|
||||
@@ -41,6 +42,7 @@ $(function() {
|
||||
}else if(type == "processed"){
|
||||
$(".fifth-1").click();
|
||||
$(".order_close_cashier").show();
|
||||
$(".order_btns").hide();
|
||||
// $('#accepted').hide();
|
||||
// $('#cancel').hide();
|
||||
}
|
||||
@@ -501,6 +503,10 @@ function callback_url(callback,ref_no,order_id,status,min_type,time,exptime,reas
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
if(parseInt(getOnlineOrderCount()) > 0){
|
||||
$('.order_no').addClass("order-badge");
|
||||
$('.order_no').html(parseInt(getOnlineOrderCount()));
|
||||
}
|
||||
}
|
||||
|
||||
function showNewOrderAlert(order_reservation,shop_code){
|
||||
@@ -601,4 +607,25 @@ function timeFormat(date){
|
||||
(isPM ? ' PM' : ' AM');
|
||||
return time;
|
||||
}
|
||||
/* end order reservation function */
|
||||
/* end order reservation function */
|
||||
|
||||
/* online order count*/
|
||||
function getOnlineOrderCount(){
|
||||
var count = 0;
|
||||
//Start Ajax
|
||||
$.ajax({
|
||||
async: false,
|
||||
type: "GET",
|
||||
url: "/origami/get_order_info",
|
||||
dataType: "json",
|
||||
success: function(data){
|
||||
if(parseInt(data) > 0){
|
||||
count = parseInt(data);
|
||||
}
|
||||
}
|
||||
});
|
||||
//end Ajax
|
||||
// alert(count);
|
||||
return count;
|
||||
}
|
||||
/* online order count*/
|
||||
@@ -54,6 +54,7 @@
|
||||
.custom-card-footer .table td:first-child,
|
||||
.custom-card-footer .table td:nth-child(2){
|
||||
border-top:0px solid !important;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.custom-card-footer .footer-td ,
|
||||
@@ -62,13 +63,16 @@
|
||||
border-bottom:0px solid !important;
|
||||
font-weight: bold;
|
||||
padding:6px 10px;
|
||||
height: 64px;
|
||||
}
|
||||
.custom-card-header{
|
||||
border-bottom: 1px solid #F8BBD0 !important;
|
||||
padding:13px 5px !important;
|
||||
height: 50px;
|
||||
}
|
||||
.custom-card-footer{
|
||||
border-top: 1px solid #F8BBD0 !important;
|
||||
border-bottom: 1px solid #FAFAFA !important;
|
||||
}
|
||||
.custom-card-block,
|
||||
.grand-card-footer,
|
||||
@@ -87,8 +91,12 @@
|
||||
background-color : #FFCDD2;
|
||||
}
|
||||
.div_order_margin {
|
||||
margin: 0px 0px 0px -5px !important
|
||||
margin: -4px 0px 0px -5px !important
|
||||
}
|
||||
.div_card_order {
|
||||
margin: 0px -5px !important
|
||||
}
|
||||
td.grand-total-padding {
|
||||
font-size: 17px;
|
||||
padding-top: 20px !important;
|
||||
}
|
||||
@@ -283,4 +283,41 @@ section.content {
|
||||
padding: 0.5rem 0.44rem;
|
||||
}
|
||||
/* End Reset Theme */
|
||||
|
||||
/* shop name margin */
|
||||
.shop-name-margin {
|
||||
margin-left : 20%;
|
||||
}
|
||||
/* shop name margin */
|
||||
|
||||
/* online order margin */
|
||||
.online-order-margin {
|
||||
margin-left : 22%;
|
||||
margin-bottom : 9.9999px;
|
||||
}
|
||||
/* online order margin */
|
||||
/* default-header-color */
|
||||
div.online-order-margin > div > span {
|
||||
color : #FAFAFA;
|
||||
}
|
||||
/* default-header-color */
|
||||
/* order-no color */
|
||||
.order-badge {
|
||||
position: absolute;
|
||||
background: #ff6600;
|
||||
height: 1.8rem;
|
||||
bottom: -0.1rem;
|
||||
right: -1.3rem;
|
||||
width: 1.8rem;
|
||||
text-align: center;
|
||||
line-height: 1.7rem;
|
||||
font-size: 0.9rem;
|
||||
border-radius: 50%;
|
||||
color: white;
|
||||
border: 1px solid #ff6600;
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
/* order-no color */
|
||||
|
||||
/* *************************************************** */
|
||||
Reference in New Issue
Block a user