check checkout_time is available ot not
This commit is contained in:
@@ -36,6 +36,7 @@ class Api::CheckInProcessController < Api::ApiController
|
||||
if dining_facility.status == "available"
|
||||
lookup_checkout_time = Lookup.collection_of("checkout_time")
|
||||
|
||||
if !lookup_checkout_time.empty?
|
||||
checkout_at = Time.now.utc
|
||||
|
||||
if !lookup_checkout_time.nil?
|
||||
@@ -60,6 +61,9 @@ class Api::CheckInProcessController < Api::ApiController
|
||||
booking.save!
|
||||
|
||||
render :json => { :status => true, :checkout_at => booking.checkout_at.utc.getlocal.strftime("%Y-%m-%d %H:%M") }
|
||||
else
|
||||
render :json => { :status => true }
|
||||
end
|
||||
else
|
||||
error_message = "#{dining_facility.type} is not available!"
|
||||
render :json => { :status => false, :error_message => error_message }
|
||||
|
||||
Reference in New Issue
Block a user