update optimization

This commit is contained in:
Aung Myo
2018-07-05 18:19:16 +06:30
parent f0df6a80ba
commit a5bb0a6746
8 changed files with 34 additions and 28 deletions

View File

@@ -1,6 +1,7 @@
$(function() {
var role = $('#role').val();
var second_display_lookup = $("#display_type");
console.log(second_display_lookup)
type = window.location.href.indexOf("quick_service");
modify_order = window.location.href.indexOf("modify_order");
@@ -428,7 +429,7 @@ $(function() {
var items = $('.selected-set');
if (items.length >= min_qty) {
if ($('#server_mode').val() != "cloud") {
if ($('#server_mode').val() != "cloud" && second_display_lookup == 2) {
item = get_set_item(items);
customer_display_view(item,"set_add");
}
@@ -756,7 +757,7 @@ $(function() {
$('.add_to_order').attr('data-options',JSON.stringify(option_arr));
$('.add_to_order').attr('data-opt',JSON.stringify(option_arr));
var item_data = $(this);
if ($('#server_mode').val() != "cloud") {
if ($('#server_mode').val() != "cloud" && second_display_lookup == 2) {
item = get_item(item_data,"add_to_order");
customer_display_view(item,"add");
}
@@ -768,7 +769,7 @@ $(function() {
// click plus icon for add
$(document).on('click', '.add_icon', function(event){
var item_data = $(this);
if ($('#server_mode').val() != "cloud") {
if ($('#server_mode').val() != "cloud" && second_display_lookup == 2) {
item = get_item(item_data,"add_icon");
customer_display_view(item,"add");
}
@@ -895,7 +896,7 @@ $(function() {
window.location.href = "/origami/room/" + table_id
}
}
if ($('#server_mode').val() != "cloud") {
if ($('#server_mode').val() != "cloud" && second_display_lookup == 2){
customer_display_view(null,"reload");
}
}