create productCommission
This commit is contained in:
10
app/views/origami/product_commissions/_form.html.erb
Normal file
10
app/views/origami/product_commissions/_form.html.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
<%= simple_form_for(@product_commission) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -0,0 +1,2 @@
|
||||
json.extract! product_commission, :id, :created_at, :updated_at
|
||||
json.url product_commission_url(product_commission, format: :json)
|
||||
6
app/views/origami/product_commissions/edit.html.erb
Normal file
6
app/views/origami/product_commissions/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing Product Commission</h1>
|
||||
|
||||
<%= render 'form', product_commission: @product_commission %>
|
||||
|
||||
<%= link_to 'Show', @product_commission %> |
|
||||
<%= link_to 'Back', product_commissions_path %>
|
||||
25
app/views/origami/product_commissions/index.html.erb
Normal file
25
app/views/origami/product_commissions/index.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<h1>Product Commissions</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @product_commissions.each do |product_commission| %>
|
||||
<tr>
|
||||
<td><%= link_to 'Show', product_commission %></td>
|
||||
<td><%= link_to 'Edit', edit_product_commission_path(product_commission) %></td>
|
||||
<td><%= link_to 'Destroy', product_commission, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<%= link_to 'New Product Commission', new_product_commission_path %>
|
||||
@@ -0,0 +1 @@
|
||||
json.array! @product_commissions, partial: 'product_commissions/product_commission', as: :product_commission
|
||||
5
app/views/origami/product_commissions/new.html.erb
Normal file
5
app/views/origami/product_commissions/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New Product Commission</h1>
|
||||
|
||||
<%= render 'form', product_commission: @product_commission %>
|
||||
|
||||
<%= link_to 'Back', product_commissions_path %>
|
||||
4
app/views/origami/product_commissions/show.html.erb
Normal file
4
app/views/origami/product_commissions/show.html.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<%= link_to 'Edit', edit_product_commission_path(@product_commission) %> |
|
||||
<%= link_to 'Back', product_commissions_path %>
|
||||
1
app/views/origami/product_commissions/show.json.jbuilder
Normal file
1
app/views/origami/product_commissions/show.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.partial! "product_commissions/product_commission", product_commission: @product_commission
|
||||
Reference in New Issue
Block a user