add order count and change orders UI for table and room

This commit is contained in:
phyusin
2018-02-08 17:56:41 +06:30
parent 420461918d
commit e445b3e88e
7 changed files with 355 additions and 197 deletions

View File

@@ -40,7 +40,7 @@
<!--- Panel 1 - Table Orders -->
<div class="tab-pane dining active " id="tables" role="tabpanel">
<div class="card-columns">
<% @tables.each do |table| %>
<% @tables.each do |table| %>
<% if table.status == 'occupied' %>
<% if table.get_booking.nil? %>
<% if table.get_checkout_booking.nil? %>
@@ -50,6 +50,11 @@
<% 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>
@@ -61,7 +66,12 @@
<div class="card tables orange text-white table_<%= table.id %>" data-id="<%= table.id %>">
<% end %>
<div class="card-block">
<%= table.name %>
<%= 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>
@@ -87,6 +97,11 @@
<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>
@@ -94,6 +109,11 @@
<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>