Change table view in OQS
This commit is contained in:
@@ -89,6 +89,7 @@ class Oqs::HomeController < BaseOqsController
|
||||
|
||||
# Query for OQS with delivery status
|
||||
def queue_items_query(status)
|
||||
byebug
|
||||
AssignedOrderItem.select("assigned_order_items.assigned_order_item_id, oqs.id as station_id, oqs.station_name, oqs.is_active, oqpz.zone_id, df.name as zone, df.type as type, odt.order_id, odt.item_code, odt.item_name, odt.price, odt.qty, odt.item_order_by, odt.options, cus.name as customer_name, odt.created_at")
|
||||
.joins(" left join order_queue_stations as oqs on oqs.id = assigned_order_items.order_queue_station_id
|
||||
left join order_queue_process_by_zones as oqpz on oqpz.order_queue_station_id = oqs.id
|
||||
|
||||
@@ -161,9 +161,9 @@ class Oqs::HomeController < BaseOqsController
|
||||
oqs = "and assigned_order_items.order_queue_station_id = '#{oqs_id}' "
|
||||
end
|
||||
|
||||
if table_id.to_i>0
|
||||
table = "and df.id = '#{table_id}' "
|
||||
|
||||
if !table_id.empty?
|
||||
tableId = table_id.to_a.map{|h| h}.join(",")
|
||||
table = "and df.id IN (#{tableId})"
|
||||
else
|
||||
table = ''
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user