CRUDcommission
This commit is contained in:
@@ -2,3 +2,43 @@
|
||||
|
||||
<%= link_to 'Edit', edit_commission_path(@commission) %> |
|
||||
<%= link_to 'Back', commissions_path %>
|
||||
|
||||
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li><a href="<%= origami_commissions_path %>">Commissions</a></li>
|
||||
|
||||
<span style="float: right">
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-block">
|
||||
<h4 class="card-title">Commission</h4>
|
||||
<table class="table">
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr><td style="width:20%">Product Name</td>
|
||||
<td>
|
||||
<% if Product.exists? %>
|
||||
<% product = Product.find(@commission.product_id) %>
|
||||
<%= product.name %>
|
||||
<% end %>
|
||||
|
||||
</td></tr>
|
||||
<tr><td style="width:20%">Amount</td><td><%= @commission.amount %></td></tr>
|
||||
<tr><td style="width:20%">Commission Type</td><td><%= @commission.commission_type %></td></tr>
|
||||
<tr><td style="width:20%">Active</td><td><%= @commission.is_active %></td></tr>
|
||||
|
||||
|
||||
<tr><td style="width:20%"><%= link_to 'Edit', edit_origami_commission_path(@commission) %></td><td><%= link_to 'Destroy', origami_commission_path(@commission), method: :delete, data: { confirm: 'Are you sure?' } %></td></tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user