diff --git a/app/views/admin/products_v3/_producer_options_template.html.haml b/app/views/admin/products_v3/_producer_options_template.html.haml new file mode 100644 index 0000000000..508da5468e --- /dev/null +++ b/app/views/admin/products_v3/_producer_options_template.html.haml @@ -0,0 +1,2 @@ +%template{ id: "producer_options"} + = options_for_select(producer_options, product.supplier_id) diff --git a/app/views/admin/products_v3/_product_row.html.haml b/app/views/admin/products_v3/_product_row.html.haml index 8d120d6d7b..62b33fb0e1 100644 --- a/app/views/admin/products_v3/_product_row.html.haml +++ b/app/views/admin/products_v3/_product_row.html.haml @@ -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 diff --git a/app/views/admin/products_v3/_table.html.haml b/app/views/admin/products_v3/_table.html.haml index 27d5d7434f..44a45d98bd 100644 --- a/app/views/admin/products_v3/_table.html.haml +++ b/app/views/admin/products_v3/_table.html.haml @@ -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|