Skip to content

Commit

Permalink
update the edit of productions
Browse files Browse the repository at this point in the history
  • Loading branch information
puppe1990 committed Sep 2, 2024
1 parent 789b227 commit f5e9e68
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions app/views/productions/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,18 @@
<div id="production-products">
<%= form.fields_for :production_products do |pp_form| %>
<div class="row mb-2">
<div class="col-md-3">
<div class="col-md-4">
<%= pp_form.label :product_id, Product.model_name.human, class: 'form-label' %>
<%= pp_form.collection_select :product_id, Product.all, :id, :name, { include_blank: true }, { class: 'form-control', required: true } %>
</div>
<div class="col-md-2">
<div class="col-md-4">
<%= pp_form.label :quantity, ProductionProduct.human_attribute_name(:quantity), class: 'form-label' %>
<%= pp_form.number_field :quantity, class: 'form-control', readonly: true %>
</div>
<div class="col-md-2">
<div class="col-md-4">
<%= pp_form.label :pieces_delivered, ProductionProduct.human_attribute_name(:pieces_delivered), class: 'form-label' %>
<%= pp_form.number_field :pieces_delivered, class: 'form-control' %>
</div>
<div class="col-md-2">
<%= pp_form.label :pieces_missing, ProductionProduct.human_attribute_name(:pieces_missing), class: 'form-label' %>
<%= pp_form.number_field :pieces_missing, class: 'form-control', readonly: true %>
</div>
</div>
<% end %>
</div>
Expand Down

0 comments on commit f5e9e68

Please sign in to comment.