update action cable and other bugs

This commit is contained in:
Aung Myo
2018-05-21 13:00:55 +06:30
parent e722ab88e9
commit 7e8b69aa7c
26 changed files with 749 additions and 537 deletions

View File

@@ -116,7 +116,19 @@ class OrderQueueStation < ApplicationRecord
order = Order.find(order_id)
order_items = order.order_items
Order.pay_process_order_queue(order_id,table_id)
# Order.pay_process_order_queue(order_id,table_id)
if order
oqs = OrderQueueStation.new
oqs.process_order(order, table_id)
end
assign_order = AssignedOrderItem.assigned_order_item_by_job(order_id)
if ENV["SERVER_MODE"] == 'cloud'
from = request.subdomain + "." + request.domain
else
from = ""
end
ActionCable.server.broadcast "order_queue_station_channel",order: assign_order,from:from
if table_id.to_i > 0
# get dining
dining = DiningFacility.find(table_id)