diff --git a/app/assets/javascripts/addorder.js b/app/assets/javascripts/addorder.js index 6ab73e7a..1b1f1170 100755 --- a/app/assets/javascripts/addorder.js +++ b/app/assets/javascripts/addorder.js @@ -1,3 +1,4 @@ +//middle edit $(function() { var role = $('#role').val(); var second_display_lookup = $("#display_type").val(); @@ -54,28 +55,16 @@ $(function() { if (type ==-1 && modify_order == -1){ image_path = product[field].image_path.url; } - }else{ - image_path = "/image/logo.png"; - } + - row = '
' + row = '
' +'
' +'
' +'
'+ product[field].name +'
' - +"' + +'
' - +"
" - - // +"
" - // +"" - // +"
" - - +'' + +'
' + +'' + +'
'; + } + else + { + row = '
' + +'
' + +'
' + +"
" + +'
'+ product[field].name +'
' + +'
' + + + +'
' + + +"
" + + +'
' + + +'' + + +'
'; + } $('.menu_items_list').append(row); } } @@ -499,7 +543,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(); @@ -1379,6 +1422,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 ; @@ -1439,52 +1483,109 @@ $(function() { }else{ image_path = menu_items[field].image; } - - }else{ - if (modify_order) { - image_path = "../../image/logo.png"; - }else{ - image_path = "image/logo.png"; - } - } + row = '
' + +'
' + +'
' + +'
'+ menu_items[field].name +'
' + + +'
' + +"
" + +'
' + +'' + +'
'; ; + }else{ + row = '
' + +'
' + +'
" + + +'
'+ menu_items[field].name +'
' + +'
' + +"
" + +'
' + +'' + + + +'
' + +'
'; + } - row = '
' - +'
' - +'
' - +'
'+ menu_items[field].name +'
' - +"
" - +"" - +add+ '' - +'
' - +'
' - +"
" - - // +"
" - // +"" - // +"
" - - +'' - +'
' - +'
'; ; $('.menu_items_list').append(row); } //end instances in menu-items alest 1 instance diff --git a/app/assets/stylesheets/addorder.scss b/app/assets/stylesheets/addorder.scss index 1ffdb8f0..1cda9286 100755 --- a/app/assets/stylesheets/addorder.scss +++ b/app/assets/stylesheets/addorder.scss @@ -3,12 +3,12 @@ section .content{ } .custom-card-head{ height: 40px; - #background-color: #54A5AF; - background-color: #a1aade; + background-color: #79D0F2; + color :#fff; + #background-color: #a1aade; opacity: 0.8; padding:5px; - color :#000000; - + font-weight:400; } .custom-card { border: 2px solid rgba(0, 0, 0, 0.125) !important; @@ -16,6 +16,10 @@ section .content{ } .custom-card-footer{ padding:0.35rem 1.25rem !important; + bottom:0; + position: absolute; + width: 100%; + font-weight:900; } .custom-card-block { @@ -192,7 +196,7 @@ section.content{ } .menu_item_box{ - cursor: pointer; + cursor: pointer; } /*Logout Icon*/ @@ -300,4 +304,33 @@ i.logout_icon{ .ls-closed section.content { margin-left: 15px !important; margin-right: 15px !important; -} \ No newline at end of file +} +.product_box{ + position:relative; + text-align:center; + font-weight:900; + color:#fff; + font-size:1.5em; + margin:auto; +} +.custom-card-no-img-head{ + #background-color: #54A5AF; + opacity: 0.8; + padding:5px; + color :#273040; + min-height:100px; + height: 150px; + background-color:#79D0F2; + +} +.menu_item_no_img_box{ + cursor: pointer; + +} +.custom-card-no-img-footer{ + padding:0.35rem 1.25rem !important; + +} +.custom-flex-footer{ + display:flex; +} diff --git a/app/assets/stylesheets/sx_font.css b/app/assets/stylesheets/sx_font.css index b8b08f2a..b08657e5 100755 --- a/app/assets/stylesheets/sx_font.css +++ b/app/assets/stylesheets/sx_font.css @@ -39,4 +39,4 @@ /* Support for IE. */ font-feature-settings: 'liga'; -} \ No newline at end of file +} diff --git a/app/models/printer/printer_worker.rb b/app/models/printer/printer_worker.rb index 8bbf1c6d..fee19a31 100755 --- a/app/models/printer/printer_worker.rb +++ b/app/models/printer/printer_worker.rb @@ -38,20 +38,20 @@ class Printer::PrinterWorker end def print(file_path,printer_destination = nil ) - # if printer_destination.nil? - # printer_destination = self.printer_destination - # end + if printer_destination.nil? + printer_destination = self.printer_destination + end - # puts printer_destination - # puts '........Printer Destination..........' + puts printer_destination + puts '........Printer Destination..........' - # copy = self.print_copies - # #Print only when printer information is not null - # if !self.printer_destination.nil? - # (1..copy).each do - # page = Cups::PrintJob.new(file_path, printer_destination) - # page.print - # end - # end + copy = self.print_copies + #Print only when printer information is not null + if !self.printer_destination.nil? + (1..copy).each do + page = Cups::PrintJob.new(file_path, printer_destination) + page.print + end + end end end diff --git a/app/views/origami/addorders/detail.html.erb b/app/views/origami/addorders/detail.html.erb index 50f25902..80fba22e 100644 --- a/app/views/origami/addorders/detail.html.erb +++ b/app/views/origami/addorders/detail.html.erb @@ -4,7 +4,6 @@ <% type = request.path_info.include?('quick_service') || request.path_info.include?('food_court')%> <% modify_order = request.path_info.include?('modify_order')%> -