From 27a3026c2a8642e826a66898149708fdef6887e0 Mon Sep 17 00:00:00 2001 From: phyusin Date: Mon, 19 Mar 2018 19:41:32 +0630 Subject: [PATCH] oqs edit --- app/models/order_queue_station.rb | 6 +++--- app/views/oqs/edit/index.html.erb | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/models/order_queue_station.rb b/app/models/order_queue_station.rb index 3380f244..889491ed 100755 --- a/app/models/order_queue_station.rb +++ b/app/models/order_queue_station.rb @@ -13,7 +13,7 @@ class OrderQueueStation < ApplicationRecord # validations validates_presence_of :station_name, :printer_name - def process_order (order, table_id) + def process_order (order, table_id, order_source = nil) oqs_stations = OrderQueueStation.active @@ -55,7 +55,7 @@ class OrderQueueStation < ApplicationRecord end end - if oqs.auto_print + if oqs.auto_print && order_source != "quick_service" if oqs_order_items.length > 0 print_slip(oqs, order, oqs_order_items) is_auto_printed = true @@ -90,7 +90,7 @@ class OrderQueueStation < ApplicationRecord end end - if oqs.auto_print + if oqs.auto_print && order_source != "quick_service" if oqs_order_items.length > 0 print_slip(oqs, order, oqs_order_items) is_auto_printed = true diff --git a/app/views/oqs/edit/index.html.erb b/app/views/oqs/edit/index.html.erb index 7a1eebab..70e9a0ff 100644 --- a/app/views/oqs/edit/index.html.erb +++ b/app/views/oqs/edit/index.html.erb @@ -144,9 +144,12 @@ $(document).ready(function(){ }); $('#back').on('click', function () { + var booking_id = '<%= @booking.booking_id %>'; <% if !@link_type.nil? %> <% if @link_type == 'oqs' %> window.location.href = '/oqs'; + <% elsif @link_type == 'pending' %> + window.location.href = '/origami/quick_service/pending_order/'+booking_id; <% else %> <% if !@dining_type.nil? %> <% if @dining_type == 'Table' %>