Merge branch 'master' into menu_sync
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
json.extract! dining_charge, :id, :created_at, :updated_at
|
||||
json.url dining_charge_url(dining_charge, format: :json)
|
||||
18
app/views/settings/dining_charges/_form.html.erb
Normal file
18
app/views/settings/dining_charges/_form.html.erb
Normal file
@@ -0,0 +1,18 @@
|
||||
<%= simple_form_for([:settings,@zone,@settings_dining_facility,@dining_charge]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :item_code %>
|
||||
<%= f.input :unit_price %>
|
||||
<%= f.input :taxable %>
|
||||
<%= f.input :charge_type %>
|
||||
<%= f.input :minimum_free_time %>
|
||||
<%= f.input :charge_block %>
|
||||
<%= f.input :time_rounding %>
|
||||
<%= f.input :time_rounding_block %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
19
app/views/settings/dining_charges/edit.html.erb
Normal file
19
app/views/settings/dining_charges/edit.html.erb
Normal file
@@ -0,0 +1,19 @@
|
||||
<!-- <h1>Editing Dining Charge</h1>
|
||||
|
||||
<%= render 'form', dining_charge: @dining_charge %>-->
|
||||
|
||||
<div class="span12">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li><a href="<%= settings_zone_path(@zone) %>">Zone</a></li>
|
||||
<% if @table %>
|
||||
<li><a href="<%= edit_settings_zone_table_path(@zone,@settings_dining_facility) %>">Table / Room</a></li>
|
||||
<% elsif @room %>
|
||||
<li><a href="<%= edit_settings_zone_room_path(@zone,@settings_dining_facility) %>">Table / Room</a></li>
|
||||
<% end %>
|
||||
<li>New</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= render 'form', dining_charge: @dining_charge %>
|
||||
</div>
|
||||
25
app/views/settings/dining_charges/index.html.erb
Normal file
25
app/views/settings/dining_charges/index.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<h1>Dining Charges</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @dining_charges.each do |dining_charge| %>
|
||||
<tr>
|
||||
<td><%= link_to 'Show', dining_charge %></td>
|
||||
<td><%= link_to 'Edit', edit_dining_charge_path(dining_charge) %></td>
|
||||
<td><%= link_to 'Destroy', dining_charge, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<%= link_to 'New Dining Charge', new_dining_charge_path %>
|
||||
1
app/views/settings/dining_charges/index.json.jbuilder
Normal file
1
app/views/settings/dining_charges/index.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.array! @dining_charges, partial: 'dining_charges/dining_charge', as: :dining_charge
|
||||
18
app/views/settings/dining_charges/new.html.erb
Normal file
18
app/views/settings/dining_charges/new.html.erb
Normal file
@@ -0,0 +1,18 @@
|
||||
<!-- <h1>New Dining Charge</h1>
|
||||
|
||||
<%= render 'form', dining_charge: @dining_charge %> -->
|
||||
<div class="span12">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li><a href="<%= settings_zone_path(@zone) %>">Zone</a></li>
|
||||
<% if @table %>
|
||||
<li><a href="<%= edit_settings_zone_table_path(@zone,@settings_dining_facility) %>">Table / Room</a></li>
|
||||
<% elsif @room %>
|
||||
<li><a href="<%= edit_settings_zone_room_path(@zone,@settings_dining_facility) %>">Table / Room</a></li>
|
||||
<% end %>
|
||||
<li>New</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= render 'form', dining_charge: @dining_charge %>
|
||||
</div>
|
||||
4
app/views/settings/dining_charges/show.html.erb
Normal file
4
app/views/settings/dining_charges/show.html.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<%= link_to 'Edit', edit_dining_charge_path(@dining_charge) %> |
|
||||
<%= link_to 'Back', dining_charges_path %>
|
||||
1
app/views/settings/dining_charges/show.json.jbuilder
Normal file
1
app/views/settings/dining_charges/show.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.partial! "dining_charges/dining_charge", dining_charge: @dining_charge
|
||||
@@ -16,6 +16,7 @@
|
||||
<th style="width:20%">Name</th>
|
||||
<th style="width:20%">Role</th>
|
||||
<th style="width:20%">Created At</th>
|
||||
<th style="width:20%">Updated At</th>
|
||||
<th style="width:20%">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -26,6 +27,7 @@
|
||||
<td><%= link_to employee.name,settings_employee_path(employee) %></td>
|
||||
<td><%= employee.role %></td>
|
||||
<td><%= employee.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
|
||||
<td><%= employee.updated_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
|
||||
<td>
|
||||
<%= link_to 'Edit', edit_settings_employee_path(employee) %>
|
||||
<%if employee.role != "administrator"%>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li><a href="<%= settings_employees_path %>">Employee</a></li>
|
||||
|
||||
|
||||
<span style="float: right">
|
||||
</span>
|
||||
</ul>
|
||||
@@ -15,7 +15,8 @@
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Role</th>
|
||||
|
||||
<th>Created At</th>
|
||||
<th>Updated At</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -24,6 +25,8 @@
|
||||
<tr>
|
||||
<td><%= @employee.name %></td>
|
||||
<td><%= @employee.role %></td>
|
||||
<td><%= @employee.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
|
||||
<td><%= @employee.updated_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
|
||||
<td>
|
||||
<%= link_to 'Edit', edit_settings_employee_path(@employee) %>
|
||||
</td>
|
||||
@@ -34,4 +37,3 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -7,6 +7,26 @@
|
||||
<%= f.input :seater %>
|
||||
<%= f.input :order_by %>
|
||||
<%= f.input :is_active %>
|
||||
<% if @settings_table.dining_charges.length == 0 %>
|
||||
<div class="div-border">
|
||||
<div class="col-md-10">
|
||||
<%= link_to 'Add For Extra Charges', new_settings_zone_table_dining_charge_path(@zone,@settings_table),:class => 'btn btn-primary' %>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<% @settings_table.dining_charges.each do |dc| %>
|
||||
<div class="div-border">
|
||||
<div class="col-md-10"><b><u>Dining Charge</u></b></div>
|
||||
<div class="col-md-10">item code : <%= dc.item_code %></div>
|
||||
<div class="col-md-10">Unit price : <%= dc.unit_price %></div>
|
||||
<div class="col-md-10">Charge type : <%= dc.charge_type %></div>
|
||||
<div class="col-md-10">
|
||||
<%= link_to 'Edit Charges', edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc),:class => 'btn btn-primary' %>
|
||||
<!-- <button class="btn btn-primary" src="<%= edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc) %>">Edit Charge</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
|
||||
Reference in New Issue
Block a user