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) {
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<label></label>
|
||||
<div class="actions">
|
||||
<%= f.button :submit, :class => 'btn btn-primary',:id =>'btn_submit' %>
|
||||
<%= link_to 'Cancel', users_path ,:class => 'btn btn-primary',:id => 'btnback' %>
|
||||
<%= link_to 'Cancel', clients_path ,:class => 'btn btn-primary',:id => 'btnback' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="row">
|
||||
<nav class="breadcrumb">
|
||||
<a class="breadcrumb-item" href="<%= dashboard_path %>">Home</a>
|
||||
<a class="breadcrumb-item active" href="<%= users_path %>">Clients</a>
|
||||
<a class="breadcrumb-item active" href="<%= clients_path %>">Clients</a>
|
||||
<a class="breadcrumb-item active" href="#">Show</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
<td><%= user.nrc rescue '' %></td>
|
||||
<td><%= user.email rescue '' %></td>
|
||||
<td><%= user.phone rescue '' %></td>
|
||||
<td><%= user.address rescue '' %></td>
|
||||
<td><%= user.address rescue '' %></td>
|
||||
<td></td>
|
||||
<td><%= user.created_at.strftime("%e,%b %Y %I:%M %p") rescue '' %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@@ -91,12 +91,12 @@ $(document).ready(function() {
|
||||
success:function(result){
|
||||
// $("#show-data").html('')
|
||||
if (result.status == 'true'){
|
||||
enable_control(false)
|
||||
enable_control(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (result.data === null){
|
||||
enable_control(true)
|
||||
enable_control(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
<td><%= user.nrc rescue '' %></td>
|
||||
<td><%= user.email rescue '' %></td>
|
||||
<td><%= user.phone rescue '' %></td>
|
||||
<td><%= user.address rescue '' %></td>
|
||||
<td><%= user.address rescue '' %></td>
|
||||
<td></td>
|
||||
<td><%= user.created_at.strftime("%e,%b %Y %I:%M %p") rescue '' %></td>
|
||||
<td>
|
||||
<%= link_to 'Detail',
|
||||
|
||||
Reference in New Issue
Block a user