control order to logout
This commit is contained in:
@@ -39,6 +39,16 @@ class DiningFacility < ApplicationRecord
|
||||
end
|
||||
end
|
||||
|
||||
def get_moved_booking
|
||||
booking = Booking.where("dining_facility_id = #{self.id} and booking_status ='moved' and checkin_at between '#{DateTime.now.utc - 5.hours}' and '#{DateTime.now.utc}' and checkout_at is null").limit(1)
|
||||
|
||||
if booking.count > 0 then
|
||||
return booking[0]
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
||||
def get_new_booking
|
||||
# query for new
|
||||
# if status
|
||||
|
||||
@@ -54,7 +54,7 @@ class Order < ApplicationRecord
|
||||
|
||||
end
|
||||
|
||||
return false, @message = "booking fail"
|
||||
return false
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user