Merge branch 'adminbsb_material_ui'
This commit is contained in:
@@ -177,7 +177,16 @@ class DiningFacility < ApplicationRecord
|
||||
if ENV["SERVER_MODE"] != 'cloud'
|
||||
ActionCable.server.broadcast "checkin_channel",table: table,from:from
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def get_current_booking_status
|
||||
booking = Booking.where("dining_facility_id = #{self.id} and booking_status ='assign' and checkin_at between '#{DateTime.now.utc - 5.hours}' and '#{DateTime.now.utc}'").limit(1) #and checkout_at is null
|
||||
if booking.count > 0 then
|
||||
return booking[0]
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user