diff --git a/app/views/providers/means_reports/_with_cfe_result_details.html.erb b/app/views/providers/means_reports/_with_cfe_result_details.html.erb index 458cd893f1..ede20c303f 100644 --- a/app/views/providers/means_reports/_with_cfe_result_details.html.erb +++ b/app/views/providers/means_reports/_with_cfe_result_details.html.erb @@ -68,6 +68,16 @@
+ <% individual_text = if @legal_aid_application.applicant.has_partner_with_no_contrary_interest? + "your client or their partner" + else + "your client" + end %> + + <%= render "caseworker_review" %> <% end %> diff --git a/app/views/shared/check_answers/_dependants.html.erb b/app/views/shared/check_answers/_dependants.html.erb index eedc0c8df8..84424e7459 100644 --- a/app/views/shared/check_answers/_dependants.html.erb +++ b/app/views/shared/check_answers/_dependants.html.erb @@ -1,10 +1,18 @@ -<% url = if @legal_aid_application.has_dependants? - providers_legal_aid_application_means_has_other_dependants_path - else - providers_legal_aid_application_means_has_dependants_path - end %> -<%= govuk_summary_list(classes: "govuk-!-margin-bottom-9") do |summary_list| %> +<% read_only = false unless local_assigns.key?(:read_only) %> +<% means_report = false unless local_assigns.key?(:means_report) %> + +<% unless read_only + url = if @legal_aid_application.has_dependants? + providers_legal_aid_application_means_has_other_dependants_path + else + providers_legal_aid_application_means_has_dependants_path + end + end %> + +<%= govuk_summary_list(actions: !read_only, + classes: "govuk-!-margin-bottom-9", + html_attributes: { id: "dependants-questions" }) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__dependants" }) do |row| %> <%= row.with_key(text: t("shared.check_answers.dependants.has_dependants", individual:), classes: "govuk-!-width-one-half") %> <%= row.with_value { yes_no(@legal_aid_application.has_dependants) } %> @@ -23,17 +31,18 @@

Dependant <%= index + 1 %>: <%= dependant.name %>

-
-

- <%= govuk_link_to( - t("generic.change"), - providers_legal_aid_application_means_dependant_path(@legal_aid_application, dependant), - "aria-label": "#{t('generic.change')} Dependant #{index + 1}: #{dependant.name}", - ) %> -

-
+ <% if !read_only %> +
+

+ <%= govuk_link_to( + t("generic.change"), + providers_legal_aid_application_means_dependant_path(@legal_aid_application, dependant), + "aria-label": "#{t('generic.change')} Dependant #{index + 1}: #{dependant.name}", + ) %> +

+
+ <% end %> - <%= govuk_summary_list( actions: false, classes: "govuk-!-margin-bottom-9", @@ -41,9 +50,11 @@ ) do |summary_list| %> <% dependant_hash(dependant)&.fetch(:items, [])&.each_with_index do |item, index| %> <% name = item.name || "dependants_#{index + 1}_#{index}" %> - <%= summary_list.with_row do |row| %> - <%= row.with_key(text: item.label, classes: "govuk-!-width-one-half") %> - <%= row.with_value { safe_yes_or_no(item.amount_text) } %> + <% unless means_report && !item.label.in?(["Name", "Date of birth", "What is their relationship to your client?"]) %> + <%= summary_list.with_row do |row| %> + <%= row.with_key(text: item.label, classes: "govuk-!-width-one-half") %> + <%= row.with_value { safe_yes_or_no(item.amount_text) } %> + <% end %> <% end %> <% end %> <% end %> diff --git a/config/locales/en/generic.yml b/config/locales/en/generic.yml index 4e89a518ba..4bac162511 100644 --- a/config/locales/en/generic.yml +++ b/config/locales/en/generic.yml @@ -61,7 +61,7 @@ en: submit: Submit submit_and_continue: Submit and continue success: Success - tell_us: Your statement must include + tell_us: "Your statement must include:" total: Total toggle_navigation: Show or hide Top Level Navigation undefined: Undefined diff --git a/features/providers/means_report.feature b/features/providers/means_report.feature index acf570adbf..c9112f3081 100644 --- a/features/providers/means_report.feature +++ b/features/providers/means_report.feature @@ -15,6 +15,7 @@ Feature: Means report | h3 | Client employment income | | h2 | Outgoings | | h2 | Deductions | + | h2 | Dependants | | h2 | Caseworker Review | | h2 | Capital result | | h2 | Property, savings and other assets | @@ -38,7 +39,6 @@ Feature: Means report | h2 | Student finance | | h2 | Employed income result | | h2 | Declared cash income | - | h2 | Dependants | | h2 | Declared outgoings categories | | h2 | Declared cash outgoings | @@ -95,6 +95,15 @@ Feature: Means report | question | | Dependants allowance | | Total deductions | + + And the Dependants questions should exist: + | question | + | Does your client have any dependants? | + + And the Dependants detail questions should exist: + | Name | + | Date of birth | + | What is their relationship to your client? | And the Caseworker review section should contain: | question | answer | @@ -205,7 +214,6 @@ Feature: Means report | h2 | Student finance | | h2 | Employed income result | | h2 | Declared cash income | - | h2 | Dependants | | h2 | Declared outgoings categories | | h2 | Declared cash outgoings | | h3 | Bank statements | diff --git a/features/providers/mtr_accelerated/means_report.feature b/features/providers/mtr_accelerated/means_report.feature index 3b3418587a..4ac5c96a9d 100644 --- a/features/providers/mtr_accelerated/means_report.feature +++ b/features/providers/mtr_accelerated/means_report.feature @@ -18,6 +18,7 @@ Feature: Means report | h3 | Client employment income | | h2 | Outgoings | | h2 | Deductions | + | h2 | Dependants | | h2 | Caseworker Review | | h2 | Capital result | | h2 | Property, savings and other assets | @@ -41,7 +42,6 @@ Feature: Means report | h2 | Student finance | | h2 | Employed income result | | h2 | Declared cash income | - | h2 | Dependants | | h2 | Declared outgoings categories | | h2 | Declared cash outgoings | | h2 | Payments from scheme or charities | @@ -104,6 +104,15 @@ Feature: Means report | Dependants allowance | | Total deductions | + And the Dependants questions should exist: + | question | + | Does your client have any dependants? | + + And the Dependants detail questions should exist: + | Name | + | Date of birth | + | What is their relationship to your client? | + And the Caseworker review section should contain: | question | answer | | Caseworker review required? | Yes | @@ -193,6 +202,7 @@ Feature: Means report | h3 | Client employment income | | h2 | Outgoings | | h2 | Deductions | + | h2 | Dependants | | h2 | Caseworker Review | | h2 | Capital result | | h2 | Property, savings and other assets | @@ -213,7 +223,6 @@ Feature: Means report | h2 | Student finance | | h2 | Employed income result | | h2 | Declared cash income | - | h2 | Dependants | | h2 | Declared outgoings categories | | h2 | Declared cash outgoings | | h2 | Payments from scheme or charities | @@ -277,6 +286,15 @@ Feature: Means report | Dependants allowance | | Total deductions | + And the Dependants questions should exist: + | question | + | Does your client have any dependants? | + + And the Dependants detail questions should exist: + | Name | + | Date of birth | + | What is their relationship to your client? | + And the Caseworker review section should contain: | question | answer | | Caseworker review required? | Yes | diff --git a/features/providers/partner_means_assessment/means_report.feature b/features/providers/partner_means_assessment/means_report.feature index 7c96a81c8f..e0254cee2b 100644 --- a/features/providers/partner_means_assessment/means_report.feature +++ b/features/providers/partner_means_assessment/means_report.feature @@ -37,7 +37,6 @@ Feature: Means report when partner is present | h2 | Student finance | | h2 | Employed income result | | h2 | Declared cash income | - | h2 | Dependants | | h2 | Declared outgoings categories | | h2 | Declared cash outgoings | @@ -113,6 +112,15 @@ Feature: Means report when partner is present | Dependants allowance | | Total deductions | + And the Dependants questions should exist: + | question | + | Does your client or their partner have any dependants? | + + And the Dependants detail questions should exist: + | Name | + | Date of birth | + | What is their relationship to your client or their partner? | + And the Caseworker review section should contain: | question | answer | | Caseworker review required? | Yes |