check color in completed

This commit is contained in:
phyusin
2018-06-12 17:33:06 +06:30
parent 63b3f7ce65
commit 9882d0902f

View File

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