Merge pull request #12663 from cyrillefr/Inventory_Producer_column_is_empty_in_review_page

Replace product by variant to see producer name on views
This commit is contained in:
Filipe
2024-07-17 18:17:58 +01:00
committed by GitHub
3 changed files with 3 additions and 2 deletions

View File

@@ -12,7 +12,7 @@
%th.add=t('admin.variant_overrides.index.add')
%tbody{ "ng-repeat": 'product in filteredProducts | limitTo:productLimit' }
%tr{ id: "v_{{variant.id}}", "ng-repeat": 'variant in product.variants | inventoryVariants:hub_id:views' }
%td.producer{ "ng-bind": '::producersByID[product.producer_id].name' }
%td.producer{ "ng-bind": '::producersByID[variant.producer_id].name' }
%td.product{ "ng-bind": '::product.name' }
%td.variant
%span{ "ng-bind": '::variant.display_name || ""' }

View File

@@ -13,7 +13,7 @@
%th.hide=t('admin.variant_overrides.index.hide')
%tbody{ "ng-repeat": 'product in filteredProducts | limitTo:productLimit' }
%tr{ id: "v_{{variant.id}}", "ng-repeat": 'variant in product.variants | inventoryVariants:hub_id:views' }
%td.producer{ "ng-bind-html": '::producersByID[product.producer_id].name' }
%td.producer{ "ng-bind-html": '::producersByID[variant.producer_id].name' }
%td.product{ "ng-bind": '::product.name' }
%td.variant
%span{ "ng-bind": '::variant.display_name || ""' }

View File

@@ -547,6 +547,7 @@ RSpec.describe "
visit admin_inventory_path
expect(page).to have_text first_variant.name
expect(page).to have_text first_variant.supplier.name
expect(page).to have_selector "tr.product", count: 10
expect(page).to have_button "Show more"
expect(page).to have_button "Show all (91 More)"