66 lines
2.6 KiB
Plaintext
66 lines
2.6 KiB
Plaintext
<div class="row ">
|
|
<nav class="breadcrumb">
|
|
<a class="breadcrumb-item active" href="<%= dashboard_path %>">Home</a>
|
|
<a class="breadcrumb-item active" href="#">Batch Line Item List</a>
|
|
</nav>
|
|
</div>
|
|
<div class="row top-content">
|
|
<%= form_tag export_path(:format => :csv),:method => :post do%>
|
|
<div class="col-lg-7">
|
|
</div>
|
|
<div class="col-lg-5">
|
|
<label><strong>Choose Batch:</strong></label>
|
|
<select class='selectpicker' id='batch' name='batch[]' multiple= "multiple" >
|
|
<% @batches.each do |batch| %>
|
|
<option value="<%= batch.id %>"><%= batch.order_ref %></option>
|
|
<% end %>
|
|
</select>
|
|
|
|
<%= button_tag "Export CSV",:class =>'btn btn-primary btn-sm',:id =>"btnexport" %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<div class="row content">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<strong>Batch Line Item List</strong>
|
|
</div>
|
|
<div class="card-block">
|
|
<table class="table" style="border-top:none">
|
|
<thead>
|
|
<tr>
|
|
<th>Serail No</th>
|
|
<th>Wristband Code</th>
|
|
<th>Manufacture UID</th>
|
|
<th>Batch No</th>
|
|
<th>Card Type</th>
|
|
<th>Created At </th>
|
|
<th>Update At </th>
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @batchLineItems.each do |item| %>
|
|
<tr>
|
|
<td><%= item.serial_no rescue '' %></td>
|
|
<td><%= item.wristband_code rescue '' %></td>
|
|
<td><%= item.manufacture_uid rescue '' %></td>
|
|
<td><%= item.batch_name rescue '' %></td>
|
|
<td><%= item.card_type rescue '' %></td>
|
|
<td><%= item.created_at.strftime("%e,%b %Y %I:%M %p") rescue '' %></td>
|
|
<td><%= item.updated_at.strftime("%e,%b %Y %I:%M %p") rescue '' %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<%=paginate @batchLineItems %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$(document).ready(function(){
|
|
$('#batch').multiselect()
|
|
$("#batch").multiselect("refresh");
|
|
|
|
})
|
|
</script> |