Module: Crm::CustomerSearchHelper
- Defined in:
- app/helpers/crm/customer_search_helper.rb
Overview
View helpers for the CRM customer search screens.
Used by app/views/searches/customer_search/_mass_drop_sales_rep.html.erb.
Instance Method Summary collapse
-
#drop_sales_rep_options_for_select ⇒ Array<Array(String, Integer)>
Options for the sales rep
<select>on customer search drop-action forms.
Instance Method Details
#drop_sales_rep_options_for_select ⇒ Array<Array(String, Integer)>
Options for the sales rep <select> on customer search drop-action forms.
Sales managers can pick any drop-action rep (plus an "All" entry); other
users are locked to themselves.
15 16 17 18 19 20 21 |
# File 'app/helpers/crm/customer_search_helper.rb', line 15 def if user_has_role?("sales_manager") [%w[All all]] + @search.drop_action_reps_for_select else [[@context_user.full_name, @context_user.id]] end end |