Skip to content

Commit

Permalink
fix portal links (#4245)
Browse files Browse the repository at this point in the history
fix portals links for consumers
  • Loading branch information
kristinmerbach committed Sep 10, 2024
1 parent 97b1c73 commit 8401ff5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/helpers/bs4/bs4_header_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def bs4_portal_type(controller) # rubocop:disable Metrics/AbcSize, Metrics/Cyclo
link_to(l10n("layout.header.role.employee"), main_app.family_account_path)
end
elsif current_user.try(:has_consumer_role?)
if current_user.identity_verified_date.present?
if current_user.try(:has_consumer_role?).try(:identity_validation) == "valid"
link_to(l10n("layout.header.role.individual_and_family"), main_app.family_account_path)
else
l10n("layout.header.role.individual_and_family")
Expand Down Expand Up @@ -80,7 +80,7 @@ def my_portal_link(controller) # rubocop:disable Metrics/AbcSize, Metrics/Cyclom
link_to(ltext, main_app.family_account_path)
end
elsif current_user.try(:has_consumer_role?)
link_to(ltext, main_app.family_account_path) if current_user.identity_verified_date.present?
link_to(ltext, main_app.family_account_path) if current_user.try(:has_consumer_role?).try(:identity_validation) == "valid"
# rubocop:disable Lint/DuplicateBranch
elsif current_user.try(:has_broker_agency_staff_role?) && controller_path.exclude?('general_agencies') && controller_path.exclude?('employers')
link_to(ltext, get_broker_profile_path)
Expand Down
2 changes: 1 addition & 1 deletion app/views/ui-components/bs4/v1/navs/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<div class="bold m-0 p-0"><%= user_first_name_last_name_and_suffix %></div>
<div class="horizontal-links">
<% unless user_id.blank? %><span><%= l10n("id").upcase %>: <%= user_id %></span><% end %>
<% unless my_portal_link(controller) %><span><%= my_portal_link(controller) %></span><% end %>
<% if my_portal_link(controller).present? %><span><%= my_portal_link(controller) %></span><% end %>
<span><%= h(link_to l10n('layout.header.logout'), main_app.destroy_user_session_path, method: 'delete') %></span>
</div>
</div>
Expand Down

0 comments on commit 8401ff5

Please sign in to comment.