search in batches

This commit is contained in:
May Zin Oo
2017-10-25 11:42:56 +06:30
parent dce9c48eef
commit 87b340328e
8 changed files with 294 additions and 107 deletions

View File

@@ -0,0 +1,36 @@
<div class="card-header">
<strong>Batch List</strong>
<strong>(Count: <%= @count %> ) </strong>
</div>
<div class="card-block">
<table class="table" style="border-top:none" id="myTable">
<thead>
<tr>
<th>Order Ref</th>
<th>Created By</th>
<th>Qty Processing</th>
<th>Qty Success</th>
<th>Qty Fail</th>
<th>Export Count</th>
<th>Exported By</th>
<th>Created At</th>
</tr>
</thead>
<tbody>
<% @batches.each do |batch| %>
<tr>
<td><%= batch.order_ref rescue '' %></td>
<td><%= batch.user_name rescue '' %></td>
<td><%= batch.qty_processing rescue '' %></td>
<td><%= batch.qty_success rescue '' %></td>
<td><%= batch.qty_fail rescue '' %></td>
<td><%= batch.export_count %></td>
<td><%= batch.exported_by %></td>
<td><%= batch.created_at.strftime("%e,%b %Y %I:%M %p") rescue '' %></td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @batches %>
</div>