mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-11 18:26:50 +00:00
Only show hub with inventory enabled
This commit is contained in:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user