commission update -> change route under settings

This commit is contained in:
Zin Lin Phyo
2017-08-28 09:46:36 +06:30
parent ef9fe32b5b
commit 3131823ae0
32 changed files with 861 additions and 817 deletions

View File

@@ -0,0 +1,38 @@
<div class="page-header">
<ul class="breadcrumb">
<li><a href="<%= settings_commissions_path %>">Home</a></li>
<li>Commissions</li>
<span style="float: right">
<%= link_to t('.new', :default => t("helpers.links.new")), new_settings_commission_path, :class => 'btn btn-primary btn-sm' %>
</span>
</ul>
</div>
<br>
<div class="card">
<table class="table table-striped">
<thead>
<tr>
<th>Product Name</th>
<th>Amount</th>
<th>Commission type</th>
<th>Active</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @commissions.each do |commission| %>
<tr>
<td><%= commission.menu_item.name rescue '-' %></td>
<td><%= commission.amount rescue '-' %></td>
<td><%= commission.commission_type rescue '-' %></td>
<td><%= commission.is_active rescue '-' %></td>
<td><%= link_to 'Show', settings_commissions_path(commission) %></td>
<td><%= link_to 'Edit', edit_settings_commission_path(commission) %></td>
<td><%= link_to 'Destroy', settings_commission_path(commission), method: :delete, data: {confirm: 'Are you sure?'} %></td>
</tr>
<% end %>
</tbody>
</table>
</div>