Fix more rebase issue

This commit is contained in:
Gaetan Craig-Riou
2024-07-02 09:47:48 +10:00
parent be5a228509
commit fb2575aaeb
2 changed files with 1 additions and 25 deletions

View File

@@ -63,27 +63,4 @@
%th.align-left.col-inherits_properties= t('admin.products_page.columns.inherits_properties')
%th.align-right= t('admin.products_page.columns.actions')
- products.each_with_index do |product, product_index|
= form.fields_for("products", product, index: product_index) do |product_form|
%tbody.relaxed{ id: dom_id(product), data: { 'record-id': product_form.object.id,
controller: "nested-form product",
action: 'rails-nested-form:add->bulk-form#registerElements rails-nested-form:remove->bulk-form#toggleFormChanged' } }
%tr
= render partial: 'product_row', locals: { f: product_form, product: }
- product.variants.each_with_index do |variant, variant_index|
= form.fields_for("products][#{product_index}][variants_attributes][", variant, index: variant_index) do |variant_form|
%tr.condensed{ id: dom_id(variant), 'data-controller': "variant", 'class': "nested-form-wrapper", 'data-new-record': variant.new_record? ? "true" : false }
= render partial: 'variant_row', locals: { variant:, f: variant_form, category_options:, tax_category_options:, producer_options: }
= form.fields_for("products][#{product_index}][variants_attributes][NEW_RECORD", product.variants.build) do |new_variant_form|
%template{ 'data-nested-form-target': "template" }
%tr.condensed{ 'data-controller': "variant", 'class': "nested-form-wrapper", 'data-new-record': "true" }
= render partial: 'variant_row', locals: { variant: new_variant_form.object, f: new_variant_form, category_options:, tax_category_options:, producer_options: }
%tr{ 'data-nested-form-target': "target" }
%tr.condensed
%td
%td{ colspan: 11 }
%button.secondary.condensed.naked.icon-plus{ 'data-action': "nested-form#add",
'aria-label': t('.new_variant') }
=t('.new_variant')
= render partial: 'product_variant_row', locals: { form:, product:, product_index:, producer_options:, category_options:, tax_category_options: }

View File

@@ -902,7 +902,6 @@ en:
other: "%{count} products could not be saved. Please review the errors and try again."
reset: Discard changes
save: Save changes
new_variant: New variant
product_variant_row:
new_variant: New variant
bulk_update: