Pull from master

This commit is contained in:
San Wai Lwin
2018-05-22 13:26:23 +06:30
parent 574f320dfd
commit f1733d9f06
71 changed files with 1151 additions and 726 deletions

View File

@@ -157,15 +157,25 @@ class DiningFacility < ApplicationRecord
#Send to background job for processing
# CheckInBookingJob.perform_later(table)
#if ENV["SERVER_MODE"] != 'cloud'
ActionCable.server.broadcast "check_in_booking_channel",table: table
if ENV["SERVER_MODE"] == 'cloud'
from = request.subdomain + "." + request.domain
else
from = ""
end
ActionCable.server.broadcast "check_in_booking_channel",table: table,from:from
#end
end
def self.checkin_time
table = DiningFacility.get_checkin_booking
if table.length > 0
if ENV["SERVER_MODE"] == 'cloud'
from = request.subdomain + "." + request.domain
else
from = ""
end
if ENV["SERVER_MODE"] != 'cloud'
ActionCable.server.broadcast "checkin_channel",table: table
ActionCable.server.broadcast "checkin_channel",table: table,from:from
end
end
end