Merge branch 'adminbsb_material_ui' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -5,8 +5,12 @@ class Api::CheckInProcessController < Api::ApiController
|
||||
dining_facility = DiningFacility.find(params[:dining_id])
|
||||
booking = dining_facility.get_current_checkout_booking
|
||||
if !booking.nil?
|
||||
|
||||
DiningFacility.check_in_booking(params[:dining_id])
|
||||
|
||||
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")
|
||||
|
||||
render :json => { :status => true, :check_in_time => check_in_time, :check_out_time => check_out_time }
|
||||
else
|
||||
render :json => { :status => false, :error_message => "No current booking!" }
|
||||
|
||||
Reference in New Issue
Block a user