diff --git a/app/controllers/families_controller.rb b/app/controllers/families_controller.rb index e2e838b1728..549737eb5a1 100644 --- a/app/controllers/families_controller.rb +++ b/app/controllers/families_controller.rb @@ -4,7 +4,7 @@ class FamiliesController < ApplicationController before_action :set_family #, only: [:index, :show, :new, :create, :edit, :update] # before_action :check_hbx_staff_role, except: [:welcome] - layout "two_column" + layout :resolve_layout # def index # @q = params.permit(:q)[:q] @@ -84,4 +84,13 @@ def check_hbx_staff_role redirect_to root_path, :flash => { :error => "You must be an HBX staff member" } end end + + def resolve_layout + case action_name + when "brokers", "inbox", "home", "enrollment_history", "personal", "manage_family", "verification" + EnrollRegistry.feature_enabled?(:bs4_consumer_flow) ? "progress" : "two_column" + else + "two_column" + end + end end diff --git a/app/controllers/insured/families_controller.rb b/app/controllers/insured/families_controller.rb index 5e17e4c8be2..5df777546ca 100644 --- a/app/controllers/insured/families_controller.rb +++ b/app/controllers/insured/families_controller.rb @@ -7,7 +7,7 @@ class Insured::FamiliesController < FamiliesController layout :resolve_layout - before_action :enable_bs4_layout, only: [:home, :find_sep, :record_sep, :check_qle_date, :check_move_reason, :check_marriage_reason, :check_insurance_reason, :personal, :inbox, :manage_family, :brokers, :enrollment_history] if EnrollRegistry.feature_enabled?(:bs4_consumer_flow) + before_action :enable_bs4_layout, only: [:home, :find_sep, :record_sep, :check_qle_date, :check_move_reason, :check_marriage_reason, :check_insurance_reason, :verification, :personal, :inbox, :manage_family, :brokers, :enrollment_history] if EnrollRegistry.feature_enabled?(:bs4_consumer_flow) before_action :updateable?, only: [:delete_consumer_broker, :record_sep, :purchase, :upload_notice] before_action :init_qualifying_life_events, only: [:home, :manage_family, :find_sep] before_action :check_for_address_info, only: [:find_sep, :home] @@ -142,7 +142,7 @@ def find_sep end respond_to do |format| - format.html + format.html { render :layout => EnrollRegistry.feature_enabled?(:bs4_consumer_flow) ? "progress" : "application" } end end @@ -374,7 +374,7 @@ def purchase @terminate_date = fetch_terminate_date(params["terminate_date_#{@enrollment.hbx_id}"]) if @terminate.present? @terminate_reason = params[:terminate_reason] || '' respond_to do |format| - format.html + format.html { render :layout => 'application' } end else redirect_to :back @@ -692,15 +692,4 @@ def conditionally_bs4_enabled_actions def enable_bs4_layout @bs4 = conditionally_bs4_enabled_actions.include?(action_name) ? params[:bs4] == "true" : true end - - def resolve_layout - case action_name - when "find_sep" - EnrollRegistry.feature_enabled?(:bs4_consumer_flow) ? "progress" : "application" - when "brokers", "inbox", "home", "enrollment_history", "personal", "manage_family" - EnrollRegistry.feature_enabled?(:bs4_consumer_flow) ? "progress" : "two_column" - when "purchase" - "two_column" - end - end end diff --git a/app/helpers/verification_helper.rb b/app/helpers/verification_helper.rb index 1fce67476f4..728acc5bd26 100644 --- a/app/helpers/verification_helper.rb +++ b/app/helpers/verification_helper.rb @@ -87,7 +87,7 @@ def verification_type_class(status) when 'outstanding', 'rejected' 'danger' when 'curam', 'attested', 'expired', 'unverified' - 'default' + @bs4 ? 'absent' : 'default' when 'pending' 'info' end diff --git a/app/javascript/css/main.scss b/app/javascript/css/main.scss index 7ac71d3e3af..e0acf055357 100644 --- a/app/javascript/css/main.scss +++ b/app/javascript/css/main.scss @@ -257,6 +257,16 @@ ul.list-right-section { background-color: var(--warning-status-tint); border: 1px solid var(--warning-border); } + + &.badge-info { + background-color: var(--info-tint); + border: 1px solid var(--info-color); + } + + &.badge-absent { + background-color: var(--grey-040); + border: 1px solid var(--grey-160); + } } .badge-current-plan { @@ -327,6 +337,22 @@ ul.list-right-section { display: none; } +.return-for-def-reason { + display: none; +} + +.fedhub-request { + display: none; +} + +.extend-request { + display: none; +} + +.view-history { + display: none; +} + // medium breakpoint @media screen and (max-width: 767px) { .d-flex.sm-block { diff --git a/app/views/insured/families/verification.html.erb b/app/views/insured/families/verification.html.erb index 976451aea43..5e23e7c50cd 100644 --- a/app/views/insured/families/verification.html.erb +++ b/app/views/insured/families/verification.html.erb @@ -1,26 +1,48 @@ -<% content_for :navigation do %> - <%= render partial: 'ui-components/v1/navs/families_navigation' %> -<% end %> -

<%= l10n("documents") %>

-<% if EnrollRegistry.feature_enabled?(:show_new_documents_tab_text) %> -

<%= l10n("insured.verification_information") %>

-<% else %> -

<%= l10n("insured.verification_information_old") %>

-<% end %> -
- <% if @person && @family_members.present? %> - <% if individual_market_is_enabled? %> - <%= render 'insured/families/verification/verification' %> - <% end %> +<% if @bs4 %> + <%= render partial: 'shared/family_side_nav' %> +

<%= l10n("verifications") %>

+

<%= l10n(EnrollRegistry.feature_enabled?(:show_new_documents_tab_text) ? 'insured.verification_information' : 'insured.verification_information_old') %>

+
+ <% disable_list_flag = EnrollRegistry.feature_enabled?(:disable_documents_we_accept_list) %> + +
+ <%= render partial: "insured/families/verification/documents_verification_list" %> +
+
+ <% if @person && @family_members.present? && individual_market_is_enabled? %> + <%= render 'insured/families/verification/verification' %> <% end %> <% if EnrollRegistry.feature_enabled?(:financial_assistance) %> <%= render partial: "financial_assistance/applications/verifications/verification", locals: {family_id: @family.id} %> <% end %> -
-  -<% if medicaid_tax_credits_link_is_enabled? %> -
- <%= render partial: "navigate_to_curam_for_documents", :locals => {display_text: l10n('insured.families.apply_for_medicaid_widget')} %> +<% else %> + <% content_for :navigation do %> + <%= render partial: 'ui-components/v1/navs/families_navigation' %> + <% end %> +

<%= l10n("documents") %>

+ <% if EnrollRegistry.feature_enabled?(:show_new_documents_tab_text) %> +

<%= l10n("insured.verification_information") %>

+ <% else %> +

<%= l10n("insured.verification_information_old") %>

+ <% end %> +
+ <% if @person && @family_members.present? %> + <% if individual_market_is_enabled? %> + <%= render 'insured/families/verification/verification' %> + <% end %> + <% end %> + + <% if EnrollRegistry.feature_enabled?(:financial_assistance) %> + <%= render partial: "financial_assistance/applications/verifications/verification", locals: {family_id: @family.id} %> + <% end %>
+   + <% if medicaid_tax_credits_link_is_enabled? %> +
+ <%= render partial: "navigate_to_curam_for_documents", :locals => {display_text: l10n('insured.families.apply_for_medicaid_widget')} %> +
+ <% end %> <% end %> diff --git a/app/views/insured/families/verification/_verification.html.erb b/app/views/insured/families/verification/_verification.html.erb index 82a0b9b9e1e..ec3a486394e 100644 --- a/app/views/insured/families/verification/_verification.html.erb +++ b/app/views/insured/families/verification/_verification.html.erb @@ -1,133 +1,238 @@ -
-
-

- <% if can_show_due_date?(@person) %> - <%= l10n("document_due_date") %>:   - <% due_date = @person.primary_family&.eligibility_determination&.outstanding_verification_earliest_due_date || default_verification_due_date %> - <% if due_date <= TimeKeeper.date_of_record %> - <%= due_date %> (<%= l10n("past_due") %>) - <% else %> - <%= due_date %> - <% end %> +<% if @bs4 %> +

<%= l10n('verification_documents') %>

+ <% if can_show_due_date?(@person) %> + <% due_date = @person.primary_family&.eligibility_determination&.outstanding_verification_earliest_due_date || default_verification_due_date %> +
+
<%= l10n("document_due_date") %>:
+
<%= due_date %> <%= "(#{l10n("past_date")})" if due_date <= TimeKeeper.date_of_record %>
+
+ <% end %> + <% @family_members.each do |family_member| %> + <% person = family_member.person %> +
+

<%= person.full_name %>

+
+ <% verification_filter = if EnrollRegistry.feature_enabled?(:location_residency_verification_type) %> + <% person.verification_types.active.all %> + <% else %> + <% person.verification_types.active.all.select {|v_type| v_type.type_name != EnrollRegistry[:enroll_app].setting(:state_residency).item} %> <% end %> - -
-
- -
-
- <% @family_members.each do |f_member| %> - <% person = f_member.person %> -
-
-
- <%= f_member.person.full_name %> + <% verification_filter.each do |verif_type| %> + <% v_type = verif_type.type_name %> + <% v_type_display = display_verification_type_name(v_type) %> + <% can_show_actions_button = current_user.has_hbx_staff_role? %> + <% badge_col_class = can_show_actions_button ? "5" : "4" %> + <% if can_display_or_modify_type?(verif_type) %> +
+
+
+
col-lg-3 col-4 px-0"> + <%= v_type_display %> +
+
+ + <%= show_v_type(verif_type.validation_status, current_user.has_hbx_staff_role?) %> + <%= pundit_span Family, :updateable? %> + +
+ <% if VerificationType::DUE_DATE_STATES.include?(verif_type.validation_status) %> +
+
<%= l10n("due_date") %>:
+
<%= verif_type.verif_due_date %>
+
+ <% end %> +
+
+ <% if can_show_actions_button %> + + <%= select_tag :verification_actions, admin_actions(verif_type, family_member.person), {id: "v-action-#{person.id}-#{v_type.split.join('-')}", prompt: l10n("insured.consumer_roles.upload_ridp_documents.actions"), class: "button-select"} %> + + <% end %> + <% if display_upload_for_verification?(verif_type) %> + <%= form_tag insured_verification_documents_upload_path, multipart: true, method: :post do %> + + + + + <%= hidden_field_tag 'docs_owner', person.id %> + <%= hidden_field_tag 'verification_type', verif_type.id %> + <% end %> + <% end %> +
+
-
- <% verification_filter = if EnrollRegistry.feature_enabled?(:location_residency_verification_type) %> - <% person.verification_types.active.all%> - <% else %> - <% person.verification_types.active.all.select {|v_type| v_type.type_name != EnrollRegistry[:enroll_app].setting(:state_residency).item} %> - <% end %> - <% verification_filter.each do |verif_type| %> - <% v_type = verif_type.type_name %> - <% if can_display_or_modify_type?(verif_type) %> -
-
-
- <%= display_verification_type_name(v_type) %> -
-
- - <%= show_v_type(verif_type.validation_status, current_user.has_hbx_staff_role?) %> -   - <%= pundit_span Family, :updateable? %> +
+ <% if verif_type.type_documents.any? %> + +
+ <% verif_type.type_documents.each do |vlp_doc| %> +
+
+ <%= vlp_doc.title.titleize %>
- -
- <% if VerificationType::DUE_DATE_STATES.include? verif_type.validation_status %> - <%= l10n('due_date') %> - <%= verif_type.verif_due_date %> +
+ <% if vlp_doc.identifier.present? %> + <% key = vlp_doc.identifier.split('#').last %> + <%= h(content_tag(:a, href: "/insured/verification_documents/download/#{key}", target: "_blank", rel: "noopener noreferrer", title: "Download", data: {toggle: "tooltip"}, class: "btn outline text-nowrap") do %> + + <%= l10n("download") %> + + <% end) %> <% end %> + + <%= link_to document_path(vlp_doc, :person_id => person.id, :verification_type => verif_type.id, :doc_title => vlp_doc.title.titleize), method: :delete, class: "btn-error outline text-nowrap" do %> + <%= l10n("insured.consumer_roles.upload_ridp_documents.remove") %> + <% end %> +
+
+ <% end %> +
+ <% end %> +
+ <% if current_user.has_hbx_staff_role? %> + <%= render :partial => "insured/families/verification/admin_verification_actions", locals: { person: person, type: verif_type, v_type: v_type, f_member: family_member} %> + <% end %> +
+ <% end %> + <% end %> + + <% end %> +<% else %> +
+
+

+ <% if can_show_due_date?(@person) %> + <%= l10n("document_due_date") %>:   + <% due_date = @person.primary_family&.eligibility_determination&.outstanding_verification_earliest_due_date || default_verification_due_date %> + <% if due_date <= TimeKeeper.date_of_record %> + <%= due_date %> (<%= l10n("past_due") %>) + <% else %> + <%= due_date %> + <% end %> + <% end %> +

+
+
+ +
+
+ <% @family_members.each do |f_member| %> + <% person = f_member.person %> +
+
+
+ <%= f_member.person.full_name %> +
+
+ <% verification_filter = if EnrollRegistry.feature_enabled?(:location_residency_verification_type) %> + <% person.verification_types.active.all%> + <% else %> + <% person.verification_types.active.all.select {|v_type| v_type.type_name != EnrollRegistry[:enroll_app].setting(:state_residency).item} %> + <% end %> + <% verification_filter.each do |verif_type| %> + <% v_type = verif_type.type_name %> + <% if can_display_or_modify_type?(verif_type) %> +
+
+
+ <%= display_verification_type_name(v_type) %> +
+
+ + <%= show_v_type(verif_type.validation_status, current_user.has_hbx_staff_role?) %> +   + <%= pundit_span Family, :updateable? %> +
+ +
+ <% if VerificationType::DUE_DATE_STATES.include? verif_type.validation_status %> + <%= l10n('due_date') %> + <%= verif_type.verif_due_date %> + <% end %> +
-
- <% if display_upload_for_verification?(verif_type) %> - <%= form_tag insured_verification_documents_upload_path, multipart: true, method: :post do %> - - - <%= l10n('upload_documents') %> - <%= file_field_tag "file[]", type: :file, accept: ::FileUploadValidator::VERIFICATION_DOC_TYPES.join(','), id: "upload_identity_#{verif_type.id}", class: "doc-upload-file", tabindex:"-1", :multiple => true, value: "Upload Documents"%> - - <%= hidden_field_tag 'docs_owner', person.id %> - <%= hidden_field_tag 'verification_type', verif_type.id %> +
+ <% if display_upload_for_verification?(verif_type) %> + <%= form_tag insured_verification_documents_upload_path, multipart: true, method: :post do %> + + + <%= l10n('upload_documents') %> + <%= file_field_tag "file[]", type: :file, accept: ::FileUploadValidator::VERIFICATION_DOC_TYPES.join(','), id: "upload_identity_#{verif_type.id}", class: "doc-upload-file", tabindex:"-1", :multiple => true, value: "Upload Documents"%> + + <%= hidden_field_tag 'docs_owner', person.id %> + <%= hidden_field_tag 'verification_type', verif_type.id %> + <% end %> <% end %> +
+ <% if current_user.has_hbx_staff_role? %> +
+ <%= select_tag :verification_actions, admin_actions(verif_type, f_member.person), {id: "v-action-#{person.id}-#{v_type.split.join('-')}", prompt: 'Action'} %> +
<% end %>
- <% if current_user.has_hbx_staff_role? %> -
- <%= select_tag :verification_actions, admin_actions(verif_type, f_member.person), {id: "v-action-#{person.id}-#{v_type.split.join('-')}", prompt: 'Action'} %> -
- <% end %>
-
- <% end %> - <% if current_user.has_hbx_staff_role? %> - <%= render :partial => "insured/families/verification/admin_verification_actions", locals: { person: person, type: verif_type, v_type: v_type, f_member: f_member} %> - <% end %> + <% end %> + <% if current_user.has_hbx_staff_role? %> + <%= render :partial => "insured/families/verification/admin_verification_actions", locals: { person: person, type: verif_type, v_type: v_type, f_member: f_member} %> + <% end %> -
- <% if verif_type.type_documents.any? %> +
+ <% if verif_type.type_documents.any? %> -
- <% verif_type.type_documents.each do |vlp_doc|%> -
-
-
- <% if vlp_doc.identifier.present? %> - <% key = vlp_doc.identifier.split('#').last %> - <%= h(content_tag(:a, href: "/insured/verification_documents/download/#{key}", target: "_blank", rel: "noopener noreferrer", title: "Download", data: {toggle: "tooltip"}) do %> - <%= vlp_doc.title.titleize %> - <% end) %> - <% end %> -
-
- - <%= link_to document_path(vlp_doc, :person_id => person.id, :verification_type => verif_type.id, :doc_title => vlp_doc.title.titleize), method: :delete do %> - <%=l10n("delete")%> +
+ <% verif_type.type_documents.each do |vlp_doc|%> +
+
+
+ <% if vlp_doc.identifier.present? %> + <% key = vlp_doc.identifier.split('#').last %> + <%= h(content_tag(:a, href: "/insured/verification_documents/download/#{key}", target: "_blank", rel: "noopener noreferrer", title: "Download", data: {toggle: "tooltip"}) do %> + <%= vlp_doc.title.titleize %> + <% end) %> <% end %> - +
+
+ + <%= link_to document_path(vlp_doc, :person_id => person.id, :verification_type => verif_type.id, :doc_title => vlp_doc.title.titleize), method: :delete do %> + <%=l10n("delete")%> + <% end %> + +
-
- <% end %> -
- <% end %> -
- <% end %> + <% end %> +
+ <% end %> +
+ <% end %> +
-
- <% end %> + <% end %> +
-
-
-
- <% if current_user.has_hbx_staff_role? && all_family_members_verified && verification_needed?(@person) && EnrollRegistry.feature_enabled?(:complete_verification_for_enrollment) %> - <%= link_to l10n("insured.families.verification.complete_verification_for_enrollment"), enrollment_verification_documents_path(:person_id => @person.id), class: "btn btn-danger btn-sm", data: { confirm: l10n("insured.families.verification.complete_verification_for_enrollment_confirm") } %> - <% end %> -
-
- +
+
+ <% if current_user.has_hbx_staff_role? && all_family_members_verified && verification_needed?(@person) && EnrollRegistry.feature_enabled?(:complete_verification_for_enrollment) %> + <%= link_to l10n("insured.families.verification.complete_verification_for_enrollment"), enrollment_verification_documents_path(:person_id => @person.id), class: "btn btn-danger btn-sm", data: { confirm: l10n("insured.families.verification.complete_verification_for_enrollment_confirm") } %> + <% end %> +
+
-
-
- <%= render partial: "insured/families/verification/documents_verification_list" %> -
+
+ <%= render partial: "insured/families/verification/documents_verification_list" %> +
+<% end %>