Merge branch 'adminbsb_material_ui'
This commit is contained in:
@@ -120,6 +120,13 @@ class Api::OrdersController < Api::ApiController
|
||||
if @status && @booking
|
||||
Order.process_order_queue(@order.order_id,@order.table_id,@order.source)
|
||||
end
|
||||
if @order.table_id.to_i > 0
|
||||
table = DiningFacility.find(@booking.dining_facility_id)
|
||||
type = 'order'
|
||||
from = getCloudDomain #get sub domain in cloud mode
|
||||
ActionCable.server.broadcast "order_channel",table: table,type:type,from:from
|
||||
|
||||
end
|
||||
# # for parallel order
|
||||
# remoteIP = ""
|
||||
# begin
|
||||
@@ -263,4 +270,16 @@ class Api::OrdersController < Api::ApiController
|
||||
return return_json_status_with_code(406, "Checkout time is over!")
|
||||
end
|
||||
end
|
||||
|
||||
#get cloud domain
|
||||
def getCloudDomain
|
||||
from = ""
|
||||
if ENV["SERVER_MODE"] == 'cloud'
|
||||
from = request.subdomain + "." + request.domain
|
||||
end
|
||||
|
||||
return from
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user