table_id
This commit is contained in:
@@ -74,7 +74,8 @@ class Api::OrdersController < Api::ApiController
|
||||
else
|
||||
if checkin_checkout_time(params[:booking_id])
|
||||
|
||||
table = DiningFacility.find(params[:table_id]) if params[:table_id].present?
|
||||
table = DiningFacility.find_by_name(params[:table_name]) if params[:table_name].present?
|
||||
# table = DiningFacility.find(params[:table_id]) if params[:table_id].present?
|
||||
|
||||
booking = table.current_checkin_booking if table
|
||||
booking ||= Booking.find(params[:booking_id]) if params[:booking_id].present?
|
||||
@@ -107,7 +108,7 @@ class Api::OrdersController < Api::ApiController
|
||||
customer_id: params[:customer_id].present? ? params[:customer_id] : Customer.walkin.customer_id, # for no customer id from mobile
|
||||
items: items_arr,
|
||||
guest: params[:guest_info],
|
||||
table_id: params[:table_id],
|
||||
table_id: !table.nil? ? table.id : '',
|
||||
new_booking: true,
|
||||
waiters: @user.name,
|
||||
employee_name: @user.name,
|
||||
@@ -132,7 +133,8 @@ class Api::OrdersController < Api::ApiController
|
||||
end
|
||||
end
|
||||
else
|
||||
return return_json_status_with_code(406, "Checkout time is over!")
|
||||
@status =false
|
||||
@message ="Checkout time is over!"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user