update action cable and other bugs
This commit is contained in:
@@ -6,7 +6,16 @@ class Api::CheckInProcessController < Api::ApiController
|
||||
booking = dining_facility.get_current_checkout_booking
|
||||
if !booking.nil?
|
||||
|
||||
DiningFacility.check_in_booking(params[:dining_id])
|
||||
# DiningFacility.check_in_booking(params[:dining_id])
|
||||
|
||||
table = DiningFacility.find(params[:dining_id])
|
||||
#Send to background job for processing
|
||||
if ENV["SERVER_MODE"] == 'cloud'
|
||||
from = request.subdomain + "." + request.domain
|
||||
else
|
||||
from = ""
|
||||
end
|
||||
ActionCable.server.broadcast "check_in_booking_channel",table: table,from:from
|
||||
|
||||
check_in_time = booking.checkin_at.utc.getlocal.strftime("%Y-%m-%d %H:%M")
|
||||
check_out_time = booking.checkout_at.utc.getlocal.strftime("%Y-%m-%d %H:%M")
|
||||
|
||||
Reference in New Issue
Block a user