change checkout fun: in UI
This commit is contained in:
@@ -85,7 +85,7 @@ class DiningFacility < ApplicationRecord
|
|||||||
checkout_at = booking.checkout_at.utc
|
checkout_at = booking.checkout_at.utc
|
||||||
checkout_at_hr = (checkout_at.utc.strftime("%H").to_i).to_int
|
checkout_at_hr = (checkout_at.utc.strftime("%H").to_i).to_int
|
||||||
checkout_at_min = (checkout_at.utc.strftime("%M").to_i).to_int
|
checkout_at_min = (checkout_at.utc.strftime("%M").to_i).to_int
|
||||||
checkout_at_min -= min
|
# checkout_at_min -= min
|
||||||
if (checkout_at_hr <= hr) && (checkout_at_min <= 15)
|
if (checkout_at_hr <= hr) && (checkout_at_min <= 15)
|
||||||
return booking
|
return booking
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
<% @tables.each do |table| %>
|
<% @tables.each do |table| %>
|
||||||
<% if table.status == 'occupied' %>
|
<% if table.status == 'occupied' %>
|
||||||
<% if table.get_booking.nil? %>
|
<% if table.get_booking.nil? %>
|
||||||
<% if table.get_current_checkout_booking.nil? %>
|
<% if table.get_checkout_booking.nil? %>
|
||||||
<div class="card tables red text-white" data-id="<%= table.id %>">
|
<div class="card tables red text-white" data-id="<%= table.id %>">
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="card tables orange text-white" data-id="<%= table.id %>">
|
<div class="card tables orange text-white" data-id="<%= table.id %>">
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if table.get_current_checkout_booking.nil? %>
|
<% if table.get_checkout_booking.nil? %>
|
||||||
<div class="card tables blue text-white" data-id="<%= table.id %>">
|
<div class="card tables blue text-white" data-id="<%= table.id %>">
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="card tables orange text-white" data-id="<%= table.id %>">
|
<div class="card tables orange text-white" data-id="<%= table.id %>">
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
<% @tables.each do |table| %>
|
<% @tables.each do |table| %>
|
||||||
<% if table.status == 'occupied' %>
|
<% if table.status == 'occupied' %>
|
||||||
<% if table.get_booking.nil? %>
|
<% if table.get_booking.nil? %>
|
||||||
<% if table.get_current_checkout_booking.nil? %>
|
<% if table.get_checkout_booking.nil? %>
|
||||||
<div class="card tables red text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
<div class="card tables red text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="card tables orange text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
<div class="card tables orange text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if table.get_current_checkout_booking.nil? %>
|
<% if table.get_checkout_booking.nil? %>
|
||||||
<div class="card tables blue text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
<div class="card tables blue text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="card tables orange text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
<div class="card tables orange text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
<% @tables.each do |table| %>
|
<% @tables.each do |table| %>
|
||||||
<% if table.status == 'occupied' %>
|
<% if table.status == 'occupied' %>
|
||||||
<% if table.get_booking.nil? %>
|
<% if table.get_booking.nil? %>
|
||||||
<% if table.get_current_checkout_booking.nil? %>
|
<% if table.get_checkout_booking.nil? %>
|
||||||
<div class="card tables red text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
<div class="card tables red text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="card tables orange text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
<div class="card tables orange text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if table.get_current_checkout_booking.nil? %>
|
<% if table.get_checkout_booking.nil? %>
|
||||||
<div class="card tables blue text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
<div class="card tables blue text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="card tables orange text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
<div class="card tables orange text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
||||||
|
|||||||
Reference in New Issue
Block a user