commission update -> change route under settings
This commit is contained in:
38
app/views/settings/commissions/index.html.erb
Normal file
38
app/views/settings/commissions/index.html.erb
Normal 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>
|
||||
Reference in New Issue
Block a user