table status color
This commit is contained in:
@@ -88,7 +88,11 @@ class DiningFacility < ApplicationRecord
|
|||||||
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
|
||||||
|
return nil
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
return nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -47,12 +47,8 @@
|
|||||||
Table <%= table.name %> ( <%= table.seater %> Seat )
|
Table <%= table.name %> ( <%= table.seater %> Seat )
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% 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 %>
|
|
||||||
<div class="card tables orange text-white" data-id="<%= table.id %>">
|
|
||||||
<% end %>
|
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
Zone <%= table.zone_id %> <br>
|
Zone <%= table.zone_id %> <br>
|
||||||
Table <%= table.name %> ( <%= table.seater %> Seat )
|
Table <%= table.name %> ( <%= table.seater %> Seat )
|
||||||
|
|||||||
@@ -40,23 +40,15 @@
|
|||||||
<% @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_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 %>
|
|
||||||
<div class="card tables orange text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
|
||||||
<% end %>
|
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<%= table.name %>
|
<%= table.name %>
|
||||||
<span class="float-right font-12 new_text_<%= table.id %>"> billed</span>
|
<span class="float-right font-12 new_text_<%= table.id %>"> billed</span>
|
||||||
<div style="font-size:12px;"></div>
|
<div style="font-size:12px;"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% 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 %>
|
|
||||||
<div class="card tables orange text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
|
||||||
<% end %>
|
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<%= table.name %>
|
<%= table.name %>
|
||||||
<span class="float-right font-12 new_text_<%= table.id %>"> new</span>
|
<span class="float-right font-12 new_text_<%= table.id %>"> new</span>
|
||||||
|
|||||||
@@ -39,23 +39,15 @@
|
|||||||
<div class="card-columns">
|
<div class="card-columns">
|
||||||
<% @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_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 %>
|
|
||||||
<div class="card tables orange text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
|
||||||
<% end %>
|
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<%= table.name %>
|
<%= table.name %>
|
||||||
<span class="pull-right font-12 new_text_<%= table.id %>"> billed</span>
|
<span class="pull-right font-12 new_text_<%= table.id %>"> billed</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% 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 %>
|
|
||||||
<div class="card tables orange text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
|
||||||
<% end %>
|
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<%= table.name %>
|
<%= table.name %>
|
||||||
<span class="pull-right font-12 new_text_<%= table.id %>"> new</span>
|
<span class="pull-right font-12 new_text_<%= table.id %>"> new</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user