Merge pull request #13804 from rioug/13802-revert-enbling-variant-tag-no-inventory

[Inventory] display inventory link for user who manage enterprises with inventory and enterprises without inventory
This commit is contained in:
Ahmed Ejaz
2025-12-13 01:13:34 +05:00
committed by GitHub
7 changed files with 11 additions and 14 deletions

View File

@@ -44,6 +44,8 @@ module Admin
def load_data
@hubs = OpenFoodNetwork::Permissions.new(spree_current_user).
variant_override_hubs.by_name
# Only display the ones with inventory enabled
@hubs = @hubs.select { |p| helpers.feature?(:inventory, p) }
# Used in JS to look up the name of the producer of each product
@producers = OpenFoodNetwork::Permissions.new(spree_current_user).