CRUDIn_Juties
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
<%= f.input :amount %>
|
||||
<%= f.input :commission_type, :collection => ['Percentage','Net Amount'], prompt: 'Select Commission Type', class: 'form-control' %>
|
||||
<label><%= f.check_box :is_active %> Active </label>
|
||||
|
||||
</div><br>
|
||||
<div class="form-actions">
|
||||
<%= link_to 'Back', origami_commissions_path, class: 'btn btn-success' %>
|
||||
|
||||
@@ -1,10 +1,33 @@
|
||||
<%= simple_form_for(@in_juty) do |f| %>
|
||||
<div class="col-md-3">
|
||||
<%= simple_form_for([:origami,@in_juty]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
</div>
|
||||
|
||||
<%= f.label :dinning_id %>
|
||||
<%= f.collection_select :dinning_id, DiningFacility.all, :id, :name, {prompt: 'Select Dining Facilities'}, {class: 'form-control'} %><br/>
|
||||
<%= f.label :commissioner_ids %>
|
||||
<%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %><br/>
|
||||
<label>In time</label>
|
||||
<%= f.text_field :in_time, :value=>DateTime.now.strftime("%Y-%m-%d / %I:%M %p"),:class=>"form-control datepicker"%><br/>
|
||||
<label>Out time</label>
|
||||
<%= f.text_field :out_time, :value=>DateTime.now.strftime("%Y-%m-%d / %I:%M %p"),:class=>"form-control datepicker"%>
|
||||
</div><br>
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit %>
|
||||
<%= link_to 'Back', origami_in_juties_path, class: 'btn btn-success' %>
|
||||
<%= f.button :submit, class: 'btn btn-info' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
$('.datepicker').datepicker({
|
||||
format : 'dd-mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
$('.datepicker').attr('ReadOnly','true');
|
||||
$('.datepicker').css('cursor','pointer');
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -1,6 +1,10 @@
|
||||
<h1>Editing In Juty</h1>
|
||||
|
||||
<%= render 'form', in_juty: @in_juty %>
|
||||
|
||||
<%= link_to 'Show', @in_juty %> |
|
||||
<%= link_to 'Back', in_juties_path %>
|
||||
<div class="span12">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= origami_root_path %>">Home</a></li>
|
||||
<li><a href="<%= origami_in_juties_path %>">In Juties</a></li>
|
||||
<li>Edit</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= render 'form', in_juty: @in_juty %>
|
||||
</div>
|
||||
@@ -1,25 +1,38 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<h1>In Juties</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @in_juties.each do |in_juty| %>
|
||||
<tr>
|
||||
<td><%= link_to 'Show', in_juty %></td>
|
||||
<td><%= link_to 'Edit', edit_in_juty_path(in_juty) %></td>
|
||||
<td><%= link_to 'Destroy', in_juty, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= origami_root_path %>">Home</a></li>
|
||||
<li>In Juties</li>
|
||||
<span style="float: right">
|
||||
<%= link_to t('.new', :default => t("helpers.links.new")), new_origami_in_juty_path, :class => 'btn btn-primary btn-sm' %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="card">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Dining Facility Name</th>
|
||||
<th>Commissioner Ids</th>
|
||||
<th>In time</th>
|
||||
<th>Out time</th>
|
||||
<th colspan="3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<%= link_to 'New In Juty', new_in_juty_path %>
|
||||
<tbody>
|
||||
<% @in_juties.each do |in_juty| %>
|
||||
<tr>
|
||||
<td><%= in_juty.dining_facility.name rescue '-' %></td>
|
||||
<td><%= in_juty.commissioner.name rescue '-' %></td>
|
||||
<td><%= in_juty.in_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %></td>
|
||||
<td><%= in_juty.out_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %></td>
|
||||
<td><%= link_to 'Show', origami_in_juty_path(in_juty) %></td>
|
||||
<td><%= link_to 'Edit', edit_origami_in_juty_path(in_juty) %></td>
|
||||
<td><%= link_to 'Destroy', origami_in_juty_path(in_juty), method: :delete, data: {confirm: 'Are you sure?'} %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<h1>New In Juty</h1>
|
||||
|
||||
<%= render 'form', in_juty: @in_juty %>
|
||||
|
||||
<%= link_to 'Back', in_juties_path %>
|
||||
<div class="span12">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= origami_root_path %>">Home</a></li>
|
||||
<li><a href="<%= origami_in_juties_path %>">In Juties</a></li>
|
||||
<li>New</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= render 'form', in_juty: @in_juty %>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,43 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= origami_root_path %>">Home</a></li>
|
||||
<li><a href="<%= origami_in_juties_path %>">In Juties</a></li>
|
||||
|
||||
<%= link_to 'Edit', edit_in_juty_path(@in_juty) %> |
|
||||
<%= link_to 'Back', in_juties_path %>
|
||||
<span style="float: right">
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-block">
|
||||
<h4 class="card-title">In Juty</h4>
|
||||
<table class="table">
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td style="width:20%">Dining Facility Name</td>
|
||||
<td><%= @in_juty.dining_facility.name%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:20%">Commissioner Name</td>
|
||||
<td>
|
||||
<%= @in_juty.commissioner.name rescue '-' %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:20%">In Time</td>
|
||||
<td><%= @in_juty.in_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:20%">Out Time</td>
|
||||
<td><%= @in_juty.out_time.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") rescue '-' %></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<%= link_to 'Back', origami_in_juties_path, class: 'btn btn-success' %>
|
||||
<%= link_to 'Edit', edit_origami_in_juty_path(@in_juty), class: 'btn btn-info' %>
|
||||
<%= link_to 'Destroy', origami_in_juty_path(@in_juty), method: :delete, data: {confirm: 'Are you sure?'}, class: 'btn btn-danger' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user