qr code generate
This commit is contained in:
BIN
app/views/batches/.DS_Store
vendored
Normal file
BIN
app/views/batches/.DS_Store
vendored
Normal file
Binary file not shown.
2
app/views/batches/_batch.json.jbuilder
Normal file
2
app/views/batches/_batch.json.jbuilder
Normal file
@@ -0,0 +1,2 @@
|
||||
json.extract! batch, :id,:date,:user_id, :client_id, :order_ref,:batch_start,:batch_end,:exported_by,:qty_processing,:qty_success,:qty_fail,:batch_start_time,:batch_end_time,:export_count,:remark,:adult_or_child,:product_category_id
|
||||
json.url batch_url(batch, format: :json)
|
||||
29
app/views/batches/_form.html.erb
Normal file
29
app/views/batches/_form.html.erb
Normal file
@@ -0,0 +1,29 @@
|
||||
<%= simple_form_for(@batch) do |f| %>
|
||||
<nav class="breadcrumb">
|
||||
<a class="breadcrumb-item" href="<%= dashboard_path %>">Home</a>
|
||||
<a class="breadcrumb-item active" href="<%= batches_path %>">Batch</a>
|
||||
<a class="breadcrumb-item active" href="#">
|
||||
<% if !@batch.id.nil? %>
|
||||
Edit
|
||||
<% else %>
|
||||
New
|
||||
<% end %>
|
||||
</a>
|
||||
</nav>
|
||||
<div class="row">
|
||||
<div class="col-md-6" id="textbox_group">
|
||||
<div class ="form-group" >
|
||||
<label for="name" class="string optional control-label">Name:</label>
|
||||
<%= f.input :order_ref ,:label =>false,:error => false,:placeholder =>'Please enter name',input_html: { class: "form-control" } %>
|
||||
<%= f.error :order_ref ,style: 'color: red' %>
|
||||
</div>
|
||||
<div class ="form-group" >
|
||||
<label></label>
|
||||
<div class="actions">
|
||||
<%= f.button :submit, :class => 'btn btn-primary',:id =>'btn_submit' %>
|
||||
<%= link_to 'Cancel', batches_path ,:class => 'btn btn-primary',:id => 'btnback' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
1
app/views/batches/edit.html.erb
Normal file
1
app/views/batches/edit.html.erb
Normal file
@@ -0,0 +1 @@
|
||||
<%= render 'form', batch: @batch %>
|
||||
1
app/views/batches/new.html.erb
Normal file
1
app/views/batches/new.html.erb
Normal file
@@ -0,0 +1 @@
|
||||
<%= render 'form', batch: @batch %>
|
||||
92
app/views/batches/show.html.erb
Normal file
92
app/views/batches/show.html.erb
Normal file
@@ -0,0 +1,92 @@
|
||||
<div class="row">
|
||||
<nav class="breadcrumb">
|
||||
<a class="breadcrumb-item" href="<%= dashboard_path %>">Home</a>
|
||||
<a class="breadcrumb-item active" href="<%= clients_path %>">Batches</a>
|
||||
<a class="breadcrumb-item active" href="#">Show</a>
|
||||
<span style="float:right">
|
||||
<%= link_to 'Generate QR Code', generate_cards_path(@batch.id),:class => 'btn btn-primary' %>
|
||||
</span>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="row content">
|
||||
<div class="col-lg-6 show">
|
||||
<div class="row">
|
||||
<div class="col-lg-4"><strong>Order Ref:</strong></div>
|
||||
<div class="col-lg-8 uppercase"><%= @batch.order_ref %></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4"><strong>Exported By:</strong></div>
|
||||
<div class="col-lg-8"><%= @batch.exported_by %></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4"><strong>User Name:</strong></div>
|
||||
<div class="col-lg-8"><%= @batch.user.name %></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4"><strong>Client:</strong></div>
|
||||
<div class="col-lg-8"><%= @batch.client.name %></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4"><strong>Date:</strong></div>
|
||||
<div class="col-lg-8"><%= @batch.date.strftime("%e,%b %Y %I:%M %p") rescue '' %></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="col-lg-3"></div>
|
||||
<div class="col-lg-4 btn-show-action">
|
||||
<%= link_to 'Edit', edit_batch_path(@batch),:class => 'btn btn-primary' %>
|
||||
<%= link_to 'Back', batches_path ,:class => 'btn btn-primary'%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row content">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong>Batch Line Item List( <%= @result_count %> )</strong>
|
||||
</div>
|
||||
<div class="card-block">
|
||||
<% flash.each do |key, value| %>
|
||||
<% if key =='message' %>
|
||||
<div class="alert alert-danger center">
|
||||
<a class="close" data-dismiss="alert">×</a>
|
||||
<%= value %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div id ="filterrific_results">
|
||||
<table class="table" style="border-top:none">
|
||||
<thead>
|
||||
<tr>
|
||||
<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>Updated At </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @batchLineItems.each do |item| %>
|
||||
<tr>
|
||||
<td><%= item.serial_no rescue '' %></td>
|
||||
<td><%= item.asset_identity rescue '' %></td>
|
||||
<td><%= item.manufacture_uid rescue '' %></td>
|
||||
<td><%= item.batch_name rescue '' %></td>
|
||||
<td><%= item.asset_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>
|
||||
1
app/views/batches/show.json.jbuilder
Normal file
1
app/views/batches/show.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.partial! "batches/batch", batch: @batch
|
||||
Reference in New Issue
Block a user