check color in completed
This commit is contained in:
@@ -39,24 +39,49 @@
|
||||
<div class="tab-pane " id="tables" role="tabpanel" style="">
|
||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||
<% @tables.each do |table| %>
|
||||
<% if table.status == 'occupied' %>
|
||||
<div class="card tables bg-red text-white" data-id="<%= table.id %>">
|
||||
<div class="card-block">
|
||||
<%= table.name %>
|
||||
<% if table.status == 'occupied' %>
|
||||
<% if table.get_booking.nil? %>
|
||||
<span style="font-size:12px;float:right;line-height:inherit;"> billed</span>
|
||||
<% else %>
|
||||
<span style="font-size:12px;float:right;line-height:inherit;"> new</span>
|
||||
<% if table.get_checkout_booking.nil? %>
|
||||
<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">
|
||||
<%= table.name %>
|
||||
<!-- <% if !@order_items_count.nil? %>
|
||||
<% if @order_items_count.key?(table.id) %>
|
||||
(Orders : <%= @order_items_count[table.id] %>)
|
||||
<% end %>
|
||||
<% end %> -->
|
||||
<span class="float-right font-12 new_text_<%= table.id %>"> billed</span>
|
||||
<div style="font-size:12px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<% if table.get_checkout_booking.nil? %>
|
||||
<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">
|
||||
<%= table.name %>
|
||||
<!-- <% if !@order_items_count.nil? %>
|
||||
<% if @order_items_count.key?(table.id) %>
|
||||
(Orders : <%= @order_items_count[table.id] %>)
|
||||
<% end %>
|
||||
<% end %> -->
|
||||
<span class="float-right font-12 new_text_<%= table.id %>"> new</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="card tables green text-white" data-id="<%= table.id %>">
|
||||
<div class="card-block">
|
||||
<%= table.name %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="card tables green text-white table_<%= table.id %>" data-id="<%= table.id %>">
|
||||
<div class="card-block">
|
||||
<%= table.name %>
|
||||
<span class="float-right font-12 new_text_<%= table.id %> hide"> new</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -65,24 +90,40 @@
|
||||
<div class="tab-pane" id="rooms" role="tabpanel" style="">
|
||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||
<% @rooms.each do |room| %>
|
||||
<% if room.status == 'occupied' %>
|
||||
<div class="card rooms bg-red text-white" data-id="<%= room.id %>">
|
||||
<div class="card-block">
|
||||
<%= room.name %>
|
||||
<% if room.get_booking.nil? %>
|
||||
<span style="font-size:12px;float:right;line-height:inherit;"> billed</span>
|
||||
<% else %>
|
||||
<span style="font-size:12px;float:right;line-height:inherit;"> new</span>
|
||||
<% if room.status == 'occupied' %>
|
||||
<% if room.get_booking.nil? %>
|
||||
<div class="card rooms red text-white table_<%= room.id %>" data-id="<%= room.id %>">
|
||||
<div class="card-block">
|
||||
<%= room.name %>
|
||||
<!-- <% if !@order_items_count.nil? %>
|
||||
<% if @order_items_count.key?(room.id) %>
|
||||
(Orders : <%= @order_items_count[room.id] %>)
|
||||
<% end %>
|
||||
<% end %> -->
|
||||
<span class="float-right font-12 new_text_<%= room.id %>"> billed</span>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="card rooms blue text-white table_<%= room.id %>" data-id="<%= room.id %>">
|
||||
<div class="card-block">
|
||||
<%= room.name %>
|
||||
<!-- <% if !@order_items_count.nil? %>
|
||||
<% if @order_items_count.key?(room.id) %>
|
||||
(Orders : <%= @order_items_count[room.id] %>)
|
||||
<% end %>
|
||||
<% end %> -->
|
||||
<span class="float-right font-12 new_text_<%= room.id %>"> new</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="card rooms green text-white" data-id="<%= room.id %>">
|
||||
<div class="card-block">
|
||||
<%= room.name %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="card rooms green text-white table_<%= room.id %>" data-id="<%= room.id %>">
|
||||
<div class="card-block">
|
||||
<%= room.name %>
|
||||
<span class="float-right font-12 new_text_<%= room.id %> hide">
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user