Files
openfoodnetwork/app/helpers/shared_helper.rb
Ahmed Ejaz ac1595e718 12314 - remove shared distributor partial
- this was only used in the enterprise show view
- the above view was deleted here 4f2389e257
- by removing this, we can remove distributor_link_class method
- it will also fix the rubocop error
2024-03-31 18:08:22 +05:00

16 lines
321 B
Ruby

# frozen_string_literal: true
module SharedHelper
def enterprise_user?
spree_current_user&.enterprises&.count.to_i > 0
end
def admin_user?
spree_current_user&.has_spree_role? 'admin'
end
def current_shop_products_path
"#{main_app.enterprise_shop_path(current_distributor)}#/shop_panel"
end
end