-
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
//middle edit
|
||||
$(function() {
|
||||
var role = $('#role').val();
|
||||
var second_display_lookup = $("#display_type").val();
|
||||
@@ -52,28 +53,16 @@ $(function() {
|
||||
if (type ==-1 && modify_order == -1){
|
||||
image_path = product[field].image_path.url;
|
||||
}
|
||||
}else{
|
||||
image_path = "/image/logo.png";
|
||||
}
|
||||
|
||||
row = '<div class="col-md-3">'
|
||||
|
||||
row = '<div class="col-md-6 col-sm-6 col-lg-3 mt-3">'
|
||||
+'<div class="card custom-card testimonial-card fadeInRight" style="height:100%;background-image:url(../../'+image_path+');background-repeat: no-repeat;">'
|
||||
+'<div class="custom-card-head card-head row" style="line-height:14px;margin:0px;" style="">'
|
||||
+'<div class="col-md-10">'+ product[field].name +'</div>'
|
||||
+"<div class='col-md-2 menu_item_box' data-item-code='"
|
||||
+ product[field].item_code +"' data-instance = '"
|
||||
+JSON.stringify(item_attributes)+"' data-id = '"
|
||||
+JSON.stringify(item_attributes)+"' data-item = '"
|
||||
+JSON.stringify(item_attributes)+"' data-option = '"
|
||||
+JSON.stringify(options)+"'data-opt = '"
|
||||
+JSON.stringify(options)+"' data-item-sets = '"
|
||||
+JSON.stringify(item_attributes)+"' data-image='"+image_path+"' data-toggle='modal' data-target='.sx_item_detailModal'>"
|
||||
+"<i class='fa fa-bars material-icons m-l--10'>"
|
||||
+'view_list</i>'
|
||||
+'</div>'
|
||||
|
||||
+'</div>'
|
||||
|
||||
+"<div class='add_icon p-t-65' data-item-code='"
|
||||
+"<div class='add_icon p-t-65 p-b-65' data-item-code='"
|
||||
+ product[field].item_code +"' data-name='"
|
||||
+ product[field].name +"' data-qty = '"+ qty +"' data-price = '"
|
||||
+ product[field].unit_price +"' data-instance-code = '"+ product[field].item_code +"' data-instance = '"
|
||||
@@ -81,16 +70,71 @@ $(function() {
|
||||
+ JSON.stringify(item_attributes) +"' data-options = '"
|
||||
+ JSON.stringify(options) +"' data-opt = '"
|
||||
+ JSON.stringify(options) +"' data-image='"+image_path+"'>"
|
||||
|
||||
// +"<div class='card-block custom-card-block'>"
|
||||
// +"<img id='logo' height='125px' src='"+image_path+"'>"
|
||||
// +"</div>"
|
||||
|
||||
+'<div class="card-footer custom-card-footer">'
|
||||
+'<span>'+ product[field].unit_price +'</span>'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
+'<div class="card-footer custom-card-footer custom-flex-footer">'
|
||||
+'<span style="font-weight:900;flex-grow:1;">'+ product[field].unit_price +'</span>'
|
||||
+"<div class='offset-4 col-2 menu_item_box' data-item-code='"
|
||||
+ product[field].item_code +"' data-instance = '"
|
||||
+JSON.stringify(item_attributes)+"' data-id = '"
|
||||
+JSON.stringify(item_attributes)+"' data-item = '"
|
||||
+JSON.stringify(item_attributes)+"' data-option = '"
|
||||
+JSON.stringify(options)+"'data-opt = '"
|
||||
+JSON.stringify(options)+"' data-item-sets = '"
|
||||
+JSON.stringify(item_attributes)+"' data-image='"+image_path+"' data-toggle='modal' data-target='.sx_item_detailModal'>"
|
||||
+"<i class='fa fa-bars material-icons m-l--10'>"
|
||||
+'view_list</i>'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
|
||||
+'</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
row = '<div class="col-md-6 col-sm-6 col-lg-3 mt-1">'
|
||||
+'<div class="card custom-card testimonial-card fadeInRight" style="height:100%;">'
|
||||
+'<div class="custom-card-head custom-card-no-img-head card-head row" style="margin:0px;display:flex;!important">'
|
||||
+"<div class='col-12 add_icon p-t-65 p-b-65' data-item-code='"
|
||||
+ product[field].item_code +"' data-name='"
|
||||
+ product[field].name +"' data-qty = '"+ qty +"' data-price = '"
|
||||
+ product[field].unit_price +"' data-instance-code = '"+ product[field].item_code +"' data-instance = '"
|
||||
+ product[field].name +"' data-promotion-price = '"+ 1 +"' data-attributes = '"
|
||||
+ JSON.stringify(item_attributes) +"' data-options = '"
|
||||
+ JSON.stringify(options) +"' data-opt = '"
|
||||
+ JSON.stringify(options) +"' data-image=''>"
|
||||
+'<div class="product_box">'+ product[field].name +'</div>'
|
||||
+'</div>'
|
||||
|
||||
|
||||
+'</div>'
|
||||
|
||||
+"<div class='add_icon' data-item-code='"
|
||||
+ product[field].item_code +"' data-name='"
|
||||
+ product[field].name +"' data-qty = '"+ qty +"' data-price = '"
|
||||
+ product[field].unit_price +"' data-instance-code = '"+ product[field].item_code +"' data-instance = '"
|
||||
+ product[field].name +"' data-promotion-price = '"+ 1 +"' data-attributes = '"
|
||||
+ JSON.stringify(item_attributes) +"' data-options = '"
|
||||
+ JSON.stringify(options) +"' data-opt = '"
|
||||
+ JSON.stringify(options) +"' data-image=''>"
|
||||
|
||||
+'</div>'
|
||||
|
||||
+'<div class="card-footer custom-card-no-img-footer custom-flex-footer">'
|
||||
+'<span style="font-weight:900;flex-grow:1;">'+ product[field].unit_price +'</span>'
|
||||
+"<div class='offset-4 col-2 menu_item_box menu_item_no_img_box' data-item-code='"
|
||||
+ product[field].item_code +"' data-instance = '"
|
||||
+JSON.stringify(item_attributes)+"' data-id = '"
|
||||
+JSON.stringify(item_attributes)+"' data-item = '"
|
||||
+JSON.stringify(item_attributes)+"' data-option = '"
|
||||
+JSON.stringify(options)+"'data-opt = '"
|
||||
+JSON.stringify(options)+"' data-item-sets = '"
|
||||
+JSON.stringify(item_attributes)+"' data-image='' data-toggle='modal' data-target='.sx_item_detailModal'>"
|
||||
+"<i class='fa fa-bars material-icons m-l--10'>"
|
||||
+'view_list</i>'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
|
||||
+'</div>';
|
||||
}
|
||||
$('.menu_items_list').append(row);
|
||||
}
|
||||
}
|
||||
@@ -497,7 +541,6 @@ $(function() {
|
||||
|
||||
//click item row for add order
|
||||
$(document).on('click', '.menu_item_box', function(event){
|
||||
|
||||
$('.attributes-list').empty();
|
||||
$('.options-list').empty();
|
||||
$('#modal_box_img').empty();
|
||||
@@ -842,8 +885,11 @@ $(function() {
|
||||
e.preventDefault();
|
||||
$("#oqs_loading_wrapper").show();
|
||||
var cashier_type = $("#link_type").val();
|
||||
localStorage.setItem('cashier_type',cashier_type);
|
||||
quick_service = window.location.href.indexOf("quick_service");
|
||||
localStorage.setItem('quick_service',quick_service);
|
||||
food_court = window.location.href.indexOf("food_court");
|
||||
localStorage.setItem('food_court',food_court);
|
||||
if (quick_service != -1 || food_court != -1) {
|
||||
type = cashier_type;
|
||||
var table_type = $('#table_type').text();
|
||||
@@ -1380,6 +1426,7 @@ $(function() {
|
||||
var menu_list = $('.menu_items_list');
|
||||
menu_list.empty();
|
||||
for(var field in menu_items) {
|
||||
console.log(menu_items[field].instances);
|
||||
if (menu_items[field].is_sub_item == false) {
|
||||
instances = menu_items[field].instances ;
|
||||
|
||||
@@ -1440,52 +1487,109 @@ $(function() {
|
||||
}else{
|
||||
image_path = menu_items[field].image;
|
||||
}
|
||||
row = '<div class="col-md-6 col-sm-6 col-lg-3">'
|
||||
+'<div class="card custom-card testimonial-card fadeInRight" style="height:100%;background-image:url(../../'+image_path+');background-repeat: no-repeat;">'
|
||||
+'<div class="custom-card-head card-head row" style="line-height:14px;margin:0px;" >'
|
||||
+'<div class="col-md-10 " style="padding:0px !important;">'+ menu_items[field].name +'</div>'
|
||||
|
||||
}else{
|
||||
if (modify_order) {
|
||||
image_path = "../../image/logo.png";
|
||||
}else{
|
||||
image_path = "image/logo.png";
|
||||
}
|
||||
}
|
||||
+'</div>'
|
||||
+"<div class='"+add_icon+" p-t-65 p-b-65 m-r-' "
|
||||
+" data-item-code='"+ menu_items[field].code +"' "
|
||||
+" data-name='"+ menu_items[field].name +"' "
|
||||
+" data-qty = '"+ qty +"' "
|
||||
+" data-price = '" + price +"' "
|
||||
+" data-instance-code = '"+ code +"' "
|
||||
+" data-instance = '" + name +"' "
|
||||
+" data-promotion-price = '"+ promotion_price +"' "
|
||||
+" data-attributes = '" + JSON.stringify(item_attributes) +"' "
|
||||
+" data-options = '"+ JSON.stringify(menu_items[field].options) +"' "
|
||||
+" data-opt = '" + JSON.stringify(menu_items[field].options) +"' "
|
||||
+" data-image='"+image_path+"' "
|
||||
+" data-toggle='"+data_modal+"' "
|
||||
+" data-target='."+data_target+"' "
|
||||
+" data-item-sets = '"+JSON.stringify(menu_items[field].item_sets)+""
|
||||
+" 'data-instances = '"+JSON.stringify(menu_items[field].instances)+"'>"
|
||||
+'</div>'
|
||||
+'<div class="card-footer custom-card-footer custom-flex-footer" style="opacity:0.7">'
|
||||
+'<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
|
||||
+ "' data-instance='" + JSON.stringify(menu_items[field].instances)
|
||||
+ "' data-id='" + JSON.stringify(menu_items[field].attributes)
|
||||
+ "' data-item='" + JSON.stringify(item_attributes)
|
||||
+ "' data-option='" + JSON.stringify(menu_items[field].options)
|
||||
+ "' data-opt='" + JSON.stringify(menu_items[field].options)
|
||||
+ "' data-item-sets='" + JSON.stringify(menu_items[field].item_sets)
|
||||
+ "' data-toggle='modal'"
|
||||
+ " data-target='." + data_target +"'"
|
||||
+ " style='padding:0px 5px 0px 5px' >"
|
||||
+ "<i class='m-l--5 fa " + fa_plus + "'>"
|
||||
+ add
|
||||
+ "</i>"
|
||||
+'</div>'
|
||||
|
||||
row = '<div class="col-md-3">'
|
||||
+'<div class="card custom-card testimonial-card fadeInRight" style="height:100%;background-image:url(../../'+image_path+');background-repeat: no-repeat;">'
|
||||
+'<div class="custom-card-head card-head row" style="line-height:14px;margin:0px;" style="">'
|
||||
+'<div class="col-md-10 " style="padding:0px !important;">'+ menu_items[field].name +'</div>'
|
||||
+"<div class='col-md-2 "+menu_item_box+" ' data-item-code='"
|
||||
+ menu_items[field].code +"' data-instance = '"
|
||||
+JSON.stringify(menu_items[field].instances)+"' data-id = '"
|
||||
+JSON.stringify(menu_items[field].attributes)+"' data-item = '"
|
||||
+JSON.stringify(item_attributes)+"' data-option = '"
|
||||
+JSON.stringify(menu_items[field].options)+"'data-opt = '"
|
||||
+JSON.stringify(menu_items[field].options)+"' data-item-sets = '"
|
||||
+JSON.stringify(menu_items[field].item_sets)+"' data-toggle='modal' data-target='."+data_target+"' style='padding:0px 5px 0px 5px'>"
|
||||
+"<i class='m-l--5 fa "+fa_plus+" '>"
|
||||
+add+ '</i>'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
+"<div class='"+add_icon+" p-t-65 m-r-' data-item-code='"
|
||||
+ menu_items[field].code +"' data-name='"
|
||||
+ menu_items[field].name +"' data-qty = '"+ qty +"' data-price = '"
|
||||
+ price +"' data-instance-code = '"+ code +"' data-instance = '"
|
||||
+ name +"' data-promotion-price = '"+ promotion_price +"' data-attributes = '"
|
||||
+ JSON.stringify(item_attributes) +"' data-options = '"
|
||||
+ JSON.stringify(menu_items[field].options) +"' data-opt = '"
|
||||
+ JSON.stringify(menu_items[field].options) +"' data-image='"+image_path+"' data-toggle='"
|
||||
+data_modal+"' data-target='."+data_target+"' data-item-sets = '"
|
||||
+JSON.stringify(menu_items[field].item_sets)+"'data-instances = '"
|
||||
+JSON.stringify(menu_items[field].instances)+"'>"
|
||||
+'</div>'
|
||||
+'</div>'; ;
|
||||
}else{
|
||||
row = '<div class="col-md-6 col-sm-6 col-lg-3 mt-1">'
|
||||
+'<div class="card custom-card testimonial-card fadeInRight" style="height:100%;">'
|
||||
+'<div class="custom-card-no-img-head card-head '+add_icon+' " style="margin:0px;display:flex;!important "'
|
||||
+" data-item-code='"+ menu_items[field].code +"' "
|
||||
+" data-name='" + menu_items[field].name +"' "
|
||||
+" data-qty = '"+ qty +"' "
|
||||
+" data-price = '" + price +"' "
|
||||
+" data-instance-code = '"+ code +"' "
|
||||
+" data-instance = '" + name +"' "
|
||||
+" data-promotion-price = '"+ promotion_price +"' "
|
||||
+" data-attributes = '" + JSON.stringify(item_attributes) +"' "
|
||||
+" data-options = '"+ JSON.stringify(menu_items[field].options) +"' "
|
||||
+" data-opt = '"+ JSON.stringify(menu_items[field].options) +"' "
|
||||
+" data-image='' data-toggle='"+data_modal+"' "
|
||||
+" data-target='."+data_target+"' "
|
||||
+" data-item-sets = '"+JSON.stringify(menu_items[field].item_sets)+"'"
|
||||
+" data-instances = '"+JSON.stringify(menu_items[field].instances)+"'>"
|
||||
|
||||
// +"<div class='card-block custom-card-block'>"
|
||||
// +"<img id='logo' height='' src='"+image_path+"'>"
|
||||
// +"</div>"
|
||||
+'<div class="product_box" style="width:100%;"><span>'+ menu_items[field].name +'<span></div>'
|
||||
+'</div>'
|
||||
+"<div class='"+add_icon+"' "
|
||||
+" data-item-code='"+ menu_items[field].code +"' "
|
||||
+" data-name='" + menu_items[field].name +"' "
|
||||
+" data-qty = '"+ qty +"' "
|
||||
+" data-price = '" + price +"' "
|
||||
+" data-instance-code = '"+ code +"' "
|
||||
+" data-instance = '" + name +"' "
|
||||
+" data-promotion-price = '"+ promotion_price +"' "
|
||||
+" data-attributes = '" + JSON.stringify(item_attributes) +"' "
|
||||
+" data-options = '"+ JSON.stringify(menu_items[field].options) +"' "
|
||||
+" data-opt = '"+ JSON.stringify(menu_items[field].options) +"' "
|
||||
+" data-image='' data-toggle='"+data_modal+"' "
|
||||
+" data-target='."+data_target+"' "
|
||||
+" data-item-sets = '"+JSON.stringify(menu_items[field].item_sets)+"'"
|
||||
+" data-instances = '"+JSON.stringify(menu_items[field].instances)+"'>"
|
||||
+'</div>'
|
||||
+'<div class="card-footer custom-card-no-img-footer custom-flex-footer">'
|
||||
+'<span style="font-weight:900;flex-grow:1;">'+ price + '</span>'
|
||||
+" <div class='offset-4 col-2 menu_item_no_img_box "+menu_item_box+" ' "
|
||||
+" data-item-code='"+ menu_items[field].code +"' "
|
||||
+" data-instance = '" +JSON.stringify(menu_items[field].instances)+"' "
|
||||
+" data-id = '"+JSON.stringify(menu_items[field].attributes)+"' "
|
||||
+" data-item = '" +JSON.stringify(item_attributes)+"' "
|
||||
+" data-option = '"+JSON.stringify(menu_items[field].options)+"'"
|
||||
+" data-opt = '"+JSON.stringify(menu_items[field].options)+"' "
|
||||
+" data-item-sets = '"+JSON.stringify(menu_items[field].item_sets)+"' "
|
||||
+" data-toggle='modal' "
|
||||
+" data-target='."+data_target+"' "
|
||||
+" style='padding:0px 5px 0px 5px'>"
|
||||
+"<i class='m-l--5 fa "+fa_plus+" '>"
|
||||
+add+ '</i>'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
|
||||
|
||||
+'</div>'
|
||||
+'</div>';
|
||||
}
|
||||
|
||||
+'<div class="card-footer custom-card-footer" style="opacity:0.7">'
|
||||
+'<span>'+ price +'</span>'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
+'</div>'; ;
|
||||
$('.menu_items_list').append(row);
|
||||
}
|
||||
//end instances in menu-items alest 1 instance
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
//= require BSBMaterial/demo.js
|
||||
//= require custom.js
|
||||
//= require jquery-fileupload/basic
|
||||
//= require induties/induties.js
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.count-to').countTo();
|
||||
|
||||
3
app/assets/javascripts/induties/assign_in_duties.coffee
Normal file
3
app/assets/javascripts/induties/assign_in_duties.coffee
Normal file
@@ -0,0 +1,3 @@
|
||||
# Place all the behaviors and hooks related to the matching controller here.
|
||||
# All this logic will automatically be available in application.js.
|
||||
# You can use CoffeeScript in this file: http://coffeescript.org/
|
||||
0
app/assets/javascripts/induties/induties.js
Normal file
0
app/assets/javascripts/induties/induties.js
Normal file
@@ -288,6 +288,8 @@ function show_order_detail(url,sr_no){
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
var scrollTo = document.getElementById('div_card_order');
|
||||
$("HTML, body").animate({scrollTop: scrollTo.offsetTop - 60 }, 500 );
|
||||
// console.log(data);
|
||||
$("#order_remark").text("");
|
||||
$(".tbl_customer").show();
|
||||
@@ -373,24 +375,49 @@ function show_order_detail(url,sr_no){
|
||||
item_price = items[i].unit_price;
|
||||
}
|
||||
var total = items[i].qty * item_price;
|
||||
if(items[i].options!='[]' && items[i].options!="" && items[i].options!=null){
|
||||
row = '<tr>'
|
||||
+'<td width ="70%" class="body-td align-left">'+items[i].item_name
|
||||
+' <br>'
|
||||
+' <i><span class="font-12">'+items[i].options+'</span></i><br>'+
|
||||
'<span class="font-13">'+items[i].qty+ '<span class="col-blue"> <b>X</b>'+items[i].unit_price+'</span></span>'
|
||||
+'</td>'
|
||||
+'<td width ="30%" class="body-td align-right">'+ total +'</td>'
|
||||
+'</tr>';
|
||||
}else{
|
||||
row = '<tr>'
|
||||
+'<td width ="70%" class="body-td align-left">'+items[i].item_name
|
||||
+' <br>'+
|
||||
'<span class="font-13">'+items[i].qty+ '<span class="col-blue"> <b>X</b>'+items[i].unit_price+'</span></span>'
|
||||
+'</td>'
|
||||
+'<td width ="30%" class="body-td align-right">'+ total +'</td>'
|
||||
+'</tr>';
|
||||
var check_mobile =document.getElementsByName("summary_items_mobile")[0].value;
|
||||
if (check_mobile == "true"){
|
||||
if(items[i].options!='[]' && items[i].options!="" && items[i].options!=null){
|
||||
row =
|
||||
'<tr>'
|
||||
+'<td width ="70%" class="body-td align-left">'+items[i].item_name
|
||||
+' <br>'
|
||||
+' <i><span class="font-12">'+items[i].options+'</span></i></td>'+
|
||||
'<td><span class="font-13">'+items[i].qty+ '</span>'
|
||||
+'</td>'
|
||||
+'<td width ="30%" class="body-td align-right">'+ total +'</td>'
|
||||
+'</tr>';
|
||||
}else{
|
||||
row = '<tr>'
|
||||
+'<td width ="70%" class="body-td align-left">'+items[i].item_name
|
||||
+' </td>'+
|
||||
'<td><span class="font-13">'+items[i].qty+ '</span></td>'
|
||||
+'<td width ="30%" class="body-td align-right">'+ total +'</td>'
|
||||
+'</tr>';
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(items[i].options!='[]' && items[i].options!="" && items[i].options!=null){
|
||||
row = '<tr>'
|
||||
+'<td width ="70%" class="body-td align-left">'+items[i].item_name
|
||||
+' <br>'
|
||||
+' <i><span class="font-12">'+items[i].options+'</span></i><br>'+
|
||||
'<span class="font-13">'+items[i].qty+ '<span class="col-blue"> <b>X</b>'+items[i].unit_price+'</span></span>'
|
||||
+'</td>'
|
||||
+'<td width ="30%" class="body-td align-right">'+ total +'</td>'
|
||||
+'</tr>';
|
||||
}else{
|
||||
row = '<tr>'
|
||||
+'<td width ="70%" class="body-td align-left">'+items[i].item_name
|
||||
+' <br>'+
|
||||
'<span class="font-13">'+items[i].qty+ '<span class="col-blue"> <b>X</b>'+items[i].unit_price+'</span></span>'
|
||||
+'</td>'
|
||||
+'<td width ="30%" class="body-td align-right">'+ total +'</td>'
|
||||
+'</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('.summary-items').append(row);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user