diff --git a/app/views/admin/variant_overrides/_hidden_products.html.haml b/app/views/admin/variant_overrides/_hidden_products.html.haml index 9871cdcb72..e7ae36ec81 100644 --- a/app/views/admin/variant_overrides/_hidden_products.html.haml +++ b/app/views/admin/variant_overrides/_hidden_products.html.haml @@ -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 || ""' } diff --git a/app/views/admin/variant_overrides/_new_products.html.haml b/app/views/admin/variant_overrides/_new_products.html.haml index fb727c84e1..d800c51688 100644 --- a/app/views/admin/variant_overrides/_new_products.html.haml +++ b/app/views/admin/variant_overrides/_new_products.html.haml @@ -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 || ""' } diff --git a/spec/system/admin/variant_overrides_spec.rb b/spec/system/admin/variant_overrides_spec.rb index 44937c3123..a121f1f707 100644 --- a/spec/system/admin/variant_overrides_spec.rb +++ b/spec/system/admin/variant_overrides_spec.rb @@ -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)"