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
This commit is contained in:
Ahmed Ejaz
2024-03-31 18:08:22 +05:00
parent 3bb44cfe6d
commit ac1595e718
3 changed files with 0 additions and 40 deletions

View File

@@ -1,16 +1,6 @@
# frozen_string_literal: true
module SharedHelper
def distributor_link_class(distributor)
cart = current_order(true)
@active_distributors ||= Enterprise.distributors_with_active_order_cycles
klass = "shop-distributor"
klass += " empties-cart" unless cart.line_items.empty? || cart.distributor == distributor
klass += @active_distributors.include?(distributor) ? ' active' : ' inactive'
klass
end
def enterprise_user?
spree_current_user&.enterprises&.count.to_i > 0
end

View File

@@ -1,3 +0,0 @@
= succeed ',' do
= link_to "<strong>#{distributor.name}</strong>".html_safe, enterprise_shop_path(distributor), {class: distributor_link_class(distributor)}
%span.secondary= distributor.city