Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix portal links #4245

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading