Merge branch 'adminbsb_ui_changes' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
phyusin
2018-05-31 10:31:08 +06:30
7 changed files with 73 additions and 33 deletions

View File

@@ -76,7 +76,7 @@ class Order < ApplicationRecord
# end
#send order to broadcast job
send_order_broadcast(booking)
# send_order_broadcast(booking)
return true, booking
end

View File

@@ -121,13 +121,13 @@ class OrderQueueStation < ApplicationRecord
# 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
# 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

View File

@@ -619,16 +619,16 @@ class SalePayment < ApplicationRecord
table.save
end
type = 'payment'
# type = 'payment'
#Send to background job for processing
# OrderBroadcastJob.perform_later(table,type)
#if ENV["SERVER_MODE"] != 'cloud'
if ENV["SERVER_MODE"] == 'cloud'
from = request.subdomain + "." + request.domain
else
from = ""
end
ActionCable.server.broadcast "order_channel",table: table,type:type,from:from
# if ENV["SERVER_MODE"] == 'cloud'
# from = request.subdomain + "." + request.domain
# else
# from = ""
# end
# ActionCable.server.broadcast "order_channel",table: table,type:type,from:from
#end
end
end