add fun: for checkin and checkout

This commit is contained in:
phyusin
2017-12-08 10:14:28 +06:30
parent 485eef3782
commit 46bbd90df5
6 changed files with 38 additions and 14 deletions

View File

@@ -27,7 +27,7 @@ class Origami::CheckInProcessController < BaseOrigamiController
end
@booking = Booking.create({:dining_facility_id => params[:dining_id],:type => type,
:checkin_by=>current_login_employee.name,:checkin_at => Time.now.utc,:checkout_at =>checkout_at, :booking_status => "assign" })
:checkin_by=>current_login_employee.name,:checkin_at => Time.now.utc,:checkout_at =>checkout_at, :booking_status => "assign", :reserved_at => checkout_at, :reserved_by => current_login_employee.name })
@booking.save!
respond = {:status => 'ok'}