update customer view and order add column table and orderby

This commit is contained in:
Aung Myo
2017-11-23 10:32:20 +06:30
parent 3261fef3cf
commit 54120d7a46
7 changed files with 73 additions and 35 deletions

View File

@@ -48,6 +48,9 @@
<tr>
<th><%= t("views.right_panel.detail.order_id") %></th>
<th><%= t :table %>/<%= t :room %></th>
<th><%= t("views.right_panel.detail.order_by") %></th>
<th><%= t("views.right_panel.detail.type") %></th>
<th><%= t :customer %></th>
<th><%= t("views.right_panel.detail.order_status") %></th>
@@ -57,10 +60,14 @@
</thead>
<tbody>
<% @orders.each do |order| %>
<% @orders.each do |order|
@dining = BookingOrder.find_by_order_id(order.order_id).booking.dining_facility
%>
<tr>
<td><%= link_to order.order_id, transactions_order_path(order) %></td>
<td><%= @dining.type %>-<%= @dining.name %></td>
<td><%= order.waiters %></td>
<td><%= order.order_type %></td>
<td><%= order.customer.name rescue '-' %></td>
<td><%= order.status %></td>

View File

@@ -17,21 +17,25 @@
<table class="table table-striped">
<thead>
<tr>
<th><%= t :table %>/<%= t :room %></th>
<th><%= t("views.right_panel.detail.order_by") %></th>
<th><%= t("views.right_panel.detail.type") %></th>
<th><%= t :customer %></th>
<th><%= t("views.right_panel.detail.order_status") %></th>
<th><%= t("views.right_panel.detail.order_date") %></th>
<th><%= t("views.right_panel.detail.order_by") %></th>
</tr>
</thead>
<tbody>
<tr>
<td><%= @dining.type %>-<%= @dining.name %></td>
<td> <%= @order.waiters rescue '-' %> </td>
<td><%= @order.order_type %></td>
<td><%= @order.customer.name rescue '-' %></td>
<td><%= @order.status %></td>
<td> <%= @order.date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> </td>
<td> <%= @order.waiters rescue '-' %> </td>
</tr>
</tbody>
</table>