Requested changes on view

- added a new partial to avoid template repetition
This commit is contained in:
cyrillefr
2024-06-03 22:33:31 +02:00
committed by Sigmund Petersen
parent dab49f3e89
commit 9adbb1d235
3 changed files with 3 additions and 2 deletions

View File

@@ -0,0 +1,2 @@
%template{ id: "producer_options"}
= options_for_select(producer_options, product.supplier_id)

View File

@@ -1,5 +1,3 @@
%template{ id: "producer_options"}
= options_for_select(producer_options, product.supplier_id)
%td.with-image{ id: "image-#{product.id}" }
= render partial: "product_image", locals: { product: }
%td.field.align-left.header.naked_inputs

View File

@@ -67,6 +67,7 @@
controller: "nested-form product",
action: 'rails-nested-form:add->bulk-form#registerElements rails-nested-form:remove->bulk-form#toggleFormChanged' } }
%tr
= render partial: 'producer_options_template', locals: { product:, producer_options: }
= render partial: 'product_row', locals: { f: product_form, product:, producer_options: }
- product.variants.each_with_index do |variant, variant_index|