From 2c6bfbb8bfda57ed28306b278470317107b53f65 Mon Sep 17 00:00:00 2001 From: kristinmerbach <78749008+kristinmerbach@users.noreply.github.com> Date: Thu, 8 Aug 2024 10:48:45 -0700 Subject: [PATCH] fix portal links (#4245) fix portals links for consumers --- app/helpers/bs4/bs4_header_helper.rb | 4 ++-- app/views/ui-components/bs4/v1/navs/_header.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/bs4/bs4_header_helper.rb b/app/helpers/bs4/bs4_header_helper.rb index cd27ae8505a..eb19353c5fb 100644 --- a/app/helpers/bs4/bs4_header_helper.rb +++ b/app/helpers/bs4/bs4_header_helper.rb @@ -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") @@ -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) diff --git a/app/views/ui-components/bs4/v1/navs/_header.html.erb b/app/views/ui-components/bs4/v1/navs/_header.html.erb index 3c46fd6dfb0..531e179b8f8 100644 --- a/app/views/ui-components/bs4/v1/navs/_header.html.erb +++ b/app/views/ui-components/bs4/v1/navs/_header.html.erb @@ -50,7 +50,7 @@
<%= user_first_name_last_name_and_suffix %>