users clients batchlineItem fix
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
<table class="table" style="border-top:none">
|
||||
|
||||
<table class="table" style="border-top:none">
|
||||
<thead>
|
||||
<tr><b><i>Batch Line Items ( <%= @result_count %> )</i></b></tr>
|
||||
<tr>
|
||||
<th>Serail No</th>
|
||||
<th>Serial No</th>
|
||||
<th>Asset Identity</th>
|
||||
<th>Manufacture UID</th>
|
||||
<th>Batch No</th>
|
||||
<th>Asset Type</th>
|
||||
<th>Created At </th>
|
||||
<th>Update At </th>
|
||||
|
||||
<th>Updated At </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody>
|
||||
|
||||
<% @batchLineItems.each do |item| %>
|
||||
<tr>
|
||||
<td><%= item.serial_no rescue '' %></td>
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<div class="row content">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong>Batch Line Item List</strong>
|
||||
</div>
|
||||
<strong>Batch Line Item List</strong>
|
||||
</div>
|
||||
<div class="card-block">
|
||||
<% flash.each do |key, value| %>
|
||||
<% if key =='message' %>
|
||||
@@ -45,6 +45,7 @@
|
||||
<div id ="filterrific_results">
|
||||
<table class="table" style="border-top:none">
|
||||
<thead>
|
||||
<tr><b><i>Batch Line Items ( <%= @result_count %> )</i></b></tr>
|
||||
<tr>
|
||||
<th>Serial No</th>
|
||||
<th>Asset Identity</th>
|
||||
@@ -52,11 +53,11 @@
|
||||
<th>Batch No</th>
|
||||
<th>Asset Type</th>
|
||||
<th>Created At </th>
|
||||
<th>Update At </th>
|
||||
<th>Updated At </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @batchLineItems.each do |item| %>
|
||||
<% @batchLineItems.each do |item| %>
|
||||
<tr>
|
||||
<td><%= item.serial_no rescue '' %></td>
|
||||
<td><%= item.asset_identity rescue '' %></td>
|
||||
@@ -87,8 +88,15 @@ $(document).ready(function(){
|
||||
$('#product_category').on('change', function() {
|
||||
product_category_id=$(this).val();
|
||||
client_id=$("#client").val();
|
||||
get_batch(client_id,product_category_id)
|
||||
get_batch(client_id,product_category_id);
|
||||
});
|
||||
|
||||
$("#client" ).on('change', function(){
|
||||
client_id=$(this).val();
|
||||
product_category_id=$("#product_category").val();
|
||||
get_batch(client_id,product_category_id);
|
||||
});
|
||||
|
||||
function get_batch(client_id,product_category_id){
|
||||
$('#batch').multiselect('disable');
|
||||
$.ajax({
|
||||
@@ -103,7 +111,7 @@ $(document).ready(function(){
|
||||
$.each(result.data, function (i, item){
|
||||
$("#batch").append("<option value="+item.id+">"+ item.order_ref +"</option>")
|
||||
});
|
||||
$('#batch').multiselect("refresh");
|
||||
$("#batch").multiselect('refresh');
|
||||
$("#batch").multiselect('rebuild');
|
||||
|
||||
}
|
||||
@@ -112,17 +120,18 @@ $(document).ready(function(){
|
||||
}
|
||||
$("#product_category").change(function(){
|
||||
product_category=$(this).val();
|
||||
client=$("#client").val()
|
||||
client=$("#client").val();
|
||||
batch=$("#batch").val();
|
||||
filter(client,product_category,batch);
|
||||
})
|
||||
filter(client,product_category,batch);
|
||||
});
|
||||
|
||||
$("#client" ).on('change', function(){
|
||||
client=$(this).val();
|
||||
product_category=$("#product_category").val();
|
||||
batch=$("#batch").val();
|
||||
filter(client,product_category,batch);
|
||||
});
|
||||
|
||||
filter(client,product_category,batch);
|
||||
})
|
||||
$('#batch').change(function(){
|
||||
client=$("#client :selected").val();
|
||||
product_category=$("#product_category").val();
|
||||
@@ -145,6 +154,7 @@ $(document).ready(function(){
|
||||
},
|
||||
complete: function(){
|
||||
$('#loading').hide();
|
||||
|
||||
},
|
||||
success: function(data) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user