mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
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:
@@ -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 || ""' }
|
||||
|
||||
@@ -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 || ""' }
|
||||
|
||||
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user