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

@@ -13,8 +13,6 @@
<div class="row clearfix">
<div class="col-lg-9 col-md-9 col-sm-9">
<div class="card">
<div class="body">
<!-- <div class="main-box-body clearfix"> -->
<div class="body table-responsive">
<table class="table table-hover table-striped">
<!-- <div class="table-responsive">
@@ -55,36 +53,34 @@
</thead>
<tbody>
<% @i = 0 %>
<% @crm_customers.each do |crm_customer| %>
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
<td>
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
<td>
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
<%= @i += 1 %>
<%else%>
-
<% end %>
</td>
<td><%= crm_customer.name %></td>
<td><%= crm_customer.card_no rescue '-' %></td>
<td><%= crm_customer.contact_no %></td>
<td><%= crm_customer.email %></td>
<td><%= link_to t("views.btn.show"), crm_customer_path(crm_customer) %></td>
</tr>
<% if @crm_customers.count > 0 %>
<% @i = 0 %>
<% @crm_customers.each do |crm_customer| %>
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
<td>
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
<td>
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
<%= @i += 1 %>
<%else%>
-
<% end %>
</td>
<td><%= crm_customer.name %></td>
<td><%= crm_customer.card_no rescue '-' %></td>
<td><%= crm_customer.contact_no %></td>
<td><%= crm_customer.email %></td>
<td><%= link_to t("views.btn.show"), crm_customer_path(crm_customer) %></td>
</tr>
<% end %>
<% else %>
<tr><td colspan="7"><strong><p style="text-align: center;margin-bottom: -1px">There is no data for search <%=@filter%>....</p></strong></td></tr>
<% end %>
</tbody>
</table>
<br>
<%= paginate @crm_customers %>
</div>
<!-- </div> -->
</div>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-3">