Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into r-1804001-01
This commit is contained in:
@@ -184,7 +184,11 @@ puts items_arr.to_json
|
||||
|
||||
@status, @sale = Sale.request_bill(@order,current_user,current_login_employee)
|
||||
# for second display
|
||||
if ENV["SERVER_MODE"] != 'cloud'
|
||||
|
||||
ActionCable.server.broadcast "second_display_channel",data: @sale,status:"sale"
|
||||
|
||||
end
|
||||
result = {:status=> @status, :data => @sale }
|
||||
render :json => result.to_json
|
||||
end
|
||||
|
||||
@@ -13,9 +13,10 @@ class Origami::SecondDisplayController < BaseOrigamiController
|
||||
else
|
||||
tax_profiles = nil
|
||||
end
|
||||
|
||||
if ENV["SERVER_MODE"] != 'cloud'
|
||||
ActionCable.server.broadcast "second_display_view_channel",data: params[:data],tax_profiles: tax_profiles,status:params[:status]
|
||||
end
|
||||
end
|
||||
#Shop Name in Navbor
|
||||
helper_method :shop_detail
|
||||
def shop_detail
|
||||
|
||||
@@ -334,13 +334,15 @@ class Order < ApplicationRecord
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
assign_order = AssignedOrderItem.assigned_order_item_by_job(self.id)
|
||||
ActionCable.server.broadcast "order_queue_station_channel",order: assign_order
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
#Process order items and send to order queue
|
||||
def self.pay_process_order_queue(id,table_id)
|
||||
if ENV["SERVER_MODE"] != 'cloud'
|
||||
sidekiq = Lookup.find_by_lookup_type("sidekiq")
|
||||
if !sidekiq.nil?
|
||||
OrderQueueProcessorJob.perform_later(id, table_id)
|
||||
@@ -354,6 +356,7 @@ class Order < ApplicationRecord
|
||||
ActionCable.server.broadcast "order_queue_station_channel",order: assign_order
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def check_cup_status(status)
|
||||
if status.include? "Active: active (running)" || "Active: active (exited)" #"Cup Server is already running"
|
||||
|
||||
Reference in New Issue
Block a user