Move unit scale to separate column

This is because it's going to move from product to variant soon, as part of Product Refactor.
This commit is contained in:
David Cook
2024-02-20 17:45:08 +11:00
parent 8f31d8799f
commit a1135f7db7
4 changed files with 10 additions and 3 deletions

View File

@@ -18,6 +18,8 @@
-# empty
%td.align-right
-# empty
%td.align-right
-# empty
%td.align-left
.content= product.supplier&.name
%td.align-left

View File

@@ -11,7 +11,8 @@
%col= # (grow to fill) Name
%col{ width:"8%"}
%col{ width:"8%"}
%col{ width:"8%"}
%col{ width:"5%"}
%col{ width:"5%"}
%col{ width:"10%"}
%col{ width:"15%"}= # Producer
%col{ width:"8%"}
@@ -20,7 +21,7 @@
%col{ width:"8%"}= # Actions
%thead
%tr
%td.form-actions-wrapper{ colspan: 11 }
%td.form-actions-wrapper{ colspan: 12 }
.form-actions-wrapper2
%fieldset.form-actions{ class: ("hidden" unless defined?(error_counts)), 'data-bulk-form-target': "actions" }
.container
@@ -41,6 +42,7 @@
%th.align-left= # image
%th.align-left.with-input= t('admin.products_page.columns.name')
%th.align-left.with-input= t('admin.products_page.columns.sku')
%th.align-right= t('admin.products_page.columns.unit_scale')
%th.align-right= t('admin.products_page.columns.unit')
%th.align-left.with-input= t('admin.products_page.columns.price')
%th.align-left.with-input= t('admin.products_page.columns.on_hand')
@@ -69,7 +71,7 @@
%tr{ 'data-nested-form-target': "target" }
%tr.condensed
%td
%td{ colspan: 10 }
%td{ colspan: 11 }
%button.secondary.condensed.naked.icon-plus{ 'data-action': "nested-form#add",
'aria-label': t('.new_variant') }
=t('.new_variant')

View File

@@ -7,6 +7,8 @@
%td.field
= f.text_field :sku, 'aria-label': t('admin.products_page.columns.sku')
= error_message_on variant, :sku
%td
-# empty
- if variant.persisted?
%td.align-right
.content= variant.unit_to_display

View File

@@ -559,6 +559,7 @@ en:
colums: Columns
columns:
name: Name
unit_scale: Unit scale
unit: Unit
price: Price
producer: Producer