add pending order
This commit is contained in:
@@ -1014,7 +1014,8 @@ $(function() {
|
||||
dataType: "json",
|
||||
success:function(result){
|
||||
if (type == "quick_service" || type=="food_court") {
|
||||
window.location.href = "/origami/"+type;
|
||||
module_name = window.location.href.includes('foodcourt') ? 'foodcourt' : 'origami'
|
||||
window.location.href = "/"+module_name+"/"+type;
|
||||
}else{
|
||||
if(table_type == "Table"){
|
||||
window.location.href = "/origami/table/" + table_id;
|
||||
@@ -1093,7 +1094,13 @@ $(function() {
|
||||
});
|
||||
|
||||
}else if(result.data == 'OK'){
|
||||
window.location.href = '/origami/'+type+'/pending_order/' + $('#sale_id').text();
|
||||
if (window.location.pathname.includes('foodcourt')) {
|
||||
order_id = $('#order_id').val()
|
||||
window.location.href = '/foodcourt/food_court/'+order_id+'/request_bill'
|
||||
}
|
||||
else {
|
||||
window.location.href = '/origami/'+type+'/pending_order/' + $('#sale_id').text();
|
||||
}
|
||||
}else{
|
||||
if(result.current_user_role == 'cashier'){
|
||||
window.location.href = "/foodcourt/sale/"+result.data["sale_id"]+"/"+type+"/payment";
|
||||
@@ -1601,20 +1608,22 @@ $(function() {
|
||||
image_path = menu_items[field].image;
|
||||
}
|
||||
if (out_of_stock === true) {
|
||||
oos_item = out_of_stock_item
|
||||
oos_item = '<div class="card custom-card testimonial-card fadeInRight" id="'+ code +'" style="height:100%;background-image:url(../../'+image_path+');background-repeat: no-repeat;pointer-events: none;opacity: 0.4;">'
|
||||
oos_header = '<div class="head'+code+'" style="position: absolute;z-index: 5;top: 0;left: 0;right: 0;text-align: center;background: #fb483a;margin: auto;color: #fff;padding: 8px;font-weight: bolder;">OUT OF STOCK</div>'
|
||||
// oos_item = out_of_stock_item
|
||||
oos_item = '<div class="card custom-card testimonial-card fadeInRight imageOBJ" id="'+ code +'" style="pointer-events: none; height: 100%;">'
|
||||
oos_header = '<div class="head-'+code+'" style="position: absolute;z-index: 5;bottom: 0;left: 0;right: 0;text-align: center;background: #fb483a;margin: auto;color: #fff;padding: 8px;font-weight: bolder;">OUT OF STOCK</div>'
|
||||
opacity = 0.5
|
||||
}else{
|
||||
oos_item = '<div class="card custom-card testimonial-card fadeInRight" id="'+ code +'" style="height:100%;background-image:url(../../'+image_path+');background-repeat: no-repeat;">'
|
||||
oos_item = '<div class="card custom-card testimonial-card fadeInRight" id="'+ code +'" style="height: 100%;">'
|
||||
oos_header = ''
|
||||
opacity = ''
|
||||
}
|
||||
row = '<div class="col-md-6 col-sm-6 col-lg-3">'
|
||||
row = '<div class="col-md-6 col-sm-6 col-lg-3 m-t-2">'
|
||||
+ oos_item + oos_header
|
||||
+'<div class="custom-card-head card-head row" style="line-height:14px;margin:0px;" >'
|
||||
+'<div class="custom-card-head card-head row" style="margin:0px; height: auto; font-size: 0.9em;" >'
|
||||
+'<div class="col-md-10 " style="padding:0px !important;">'+ menu_items[field].name +'</div>'
|
||||
|
||||
+'</div>'
|
||||
+"<div class='"+add_icon+" p-t-65 p-b-65 m-r-' "
|
||||
+"<div class='"+add_icon+"' "
|
||||
+" data-item-code='"+ menu_items[field].code +"' "
|
||||
+" data-name='"+ menu_items[field].name +"' "
|
||||
+" data-qty = '"+ qty +"' "
|
||||
@@ -1630,8 +1639,9 @@ $(function() {
|
||||
+" data-target='."+data_target+"' "
|
||||
+" data-item-sets = '"+JSON.stringify(menu_items[field].item_sets)+""
|
||||
+" 'data-instances = '"+JSON.stringify(menu_items[field].instances)+"'>"
|
||||
+ '<img src = "../../'+image_path+'" class="img-fluid" />'
|
||||
+'</div>'
|
||||
+'<div class="card-footer custom-card-footer custom-flex-footer" style="opacity:0.7">'
|
||||
+'<div class="card-footer custom-card-footer custom-flex-footer">'
|
||||
+'<span style="font-weight:900;flex-grow:1;">'+ price +'</span>'
|
||||
+ "<div class='offset-4 col-2 "+menu_item_box
|
||||
+ "' data-item-code='" + menu_items[field].code
|
||||
@@ -1654,15 +1664,15 @@ $(function() {
|
||||
}else{
|
||||
if (out_of_stock === true) {
|
||||
// oos_item = out_of_stock_item
|
||||
oos_item = '<div class="card custom-card testimonial-card fadeInRight" id="'+ code +'" style="height:100%; pointer-events: none;opacity: 0.4;">'
|
||||
oos_header = '<div class="head'+code+'" style="position: absolute;z-index: 5;top: 0;left: 0;right: 0;text-align: center;background: #fb483a;margin: auto;color: #fff;padding: 8px;font-weight: bolder;">OUT OF STOCK</div>'
|
||||
oos_item = '<div class="card custom-card testimonial-card fadeInRight" id="'+ code +'" style="height:100%; pointer-events: none;">'
|
||||
oos_header = '<div class="head'+code+'" style="position: absolute;z-index: 5;bottom: 0;left: 0;right: 0;text-align: center;background: #fb483a;margin: auto;color: #fff;padding: 8px;font-weight: bolder;">OUT OF STOCK</div>'
|
||||
}else{
|
||||
oos_item = '<div class="card custom-card testimonial-card fadeInRight" id="'+ code +'" style="height:100%;">'
|
||||
oos_header = ''
|
||||
}
|
||||
row = '<div class="col-md-6 col-sm-6 col-lg-3 mt-1">'
|
||||
row = '<div class="col-md-6 col-sm-6 col-lg-3 m-t-2">'
|
||||
+ oos_item + oos_header
|
||||
+'<div class="custom-card-no-img-head card-head '+add_icon+' " id="oos'+ code +'" style="margin:0px;display:flex;!important "'
|
||||
+'<div class="custom-card-no-img-head card-head h-100 '+add_icon+' " id="oos'+ code +'" style="margin:0px;display:flex;!important "'
|
||||
+" data-item-code='"+ menu_items[field].code +"' "
|
||||
+" data-name='" + menu_items[field].name +"' "
|
||||
+" data-qty = '"+ qty +"' "
|
||||
|
||||
@@ -311,7 +311,7 @@ i.logout_icon{
|
||||
text-align:center;
|
||||
font-weight:900;
|
||||
color:#fff;
|
||||
font-size:1.5em;
|
||||
font-size:1.2em;
|
||||
margin:auto;
|
||||
}
|
||||
.custom-card-no-img-head{
|
||||
|
||||
Reference in New Issue
Block a user