Skip to content

Commit

Permalink
Move unit scale to separate column
Browse files Browse the repository at this point in the history
This is because it's going to move from product to variant soon, as part of Product Refactor.
  • Loading branch information
dacook committed Feb 21, 2024
1 parent eda5128 commit 4abae4c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/views/admin/products_v3/_product_row.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
-# empty
%td.align-right
-# empty
%td.align-right
-# empty
%td.align-left
.content= product.supplier&.name
%td.align-left
Expand Down
8 changes: 5 additions & 3 deletions app/views/admin/products_v3/_table.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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%"}
Expand All @@ -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
Expand All @@ -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')
Expand Down Expand Up @@ -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')
2 changes: 2 additions & 0 deletions app/views/admin/products_v3/_variant_row.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ en:
colums: Columns
columns:
name: Name
unit_scale: Unit scale
unit: Unit
price: Price
producer: Producer
Expand Down

0 comments on commit 4abae4c

Please sign in to comment.