From 555b5455ca1f902d9d2a0383ce6c2935119323b5 Mon Sep 17 00:00:00 2001 From: Adam Goldstone <13471320+agoldstone93@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:50:55 +0100 Subject: [PATCH 1/6] AP-3809: simple content changes Move details into translation file to follow pattern for rest of the codebase --- .../providers/check_capital_answers/show.html.erb | 6 ++++-- .../check_passported_answers/show.html.erb | 4 +++- .../_with_bank_statement_uploads.html.erb | 2 +- .../_with_cfe_result_details.html.erb | 2 +- app/views/shared/check_answers/_assets.html.erb | 13 ++++--------- app/views/shared/check_answers/_property.html.erb | 14 +++++++------- .../shared/check_answers/_restrictions.html.erb | 4 ++-- app/views/shared/check_answers/_vehicles.html.erb | 2 +- .../_income_payments_and_assets.html.erb | 2 +- ...s_and_assets_for_bank_statement_upload.html.erb | 2 +- config/locales/en/providers.yml | 1 + config/locales/en/shared.yml | 11 ++++++++++- 12 files changed, 36 insertions(+), 27 deletions(-) diff --git a/app/views/providers/check_capital_answers/show.html.erb b/app/views/providers/check_capital_answers/show.html.erb index 84839cd44c..746d67ee93 100644 --- a/app/views/providers/check_capital_answers/show.html.erb +++ b/app/views/providers/check_capital_answers/show.html.erb @@ -1,8 +1,10 @@ +<% individual = "_with_partner" if @legal_aid_application.applicant.has_partner_with_no_contrary_interest? %> + <%= page_template(page_title: t(".h1-heading")) do %> -

<%= t(".capital-section-heading") %>

+

<%= t(".capital-section-heading#{individual}") %>

- <%= render "shared/check_answers/assets" %> + <%= render "shared/check_answers/assets", individual: %>

<%= t(".what_happens_next.heading") %>

<%= t(".what_happens_next.text") %>

diff --git a/app/views/providers/check_passported_answers/show.html.erb b/app/views/providers/check_passported_answers/show.html.erb index 1bacdd9c55..98df2aa368 100644 --- a/app/views/providers/check_passported_answers/show.html.erb +++ b/app/views/providers/check_passported_answers/show.html.erb @@ -1,3 +1,5 @@ +<% individual = "_with_partner" if @legal_aid_application.applicant.has_partner_with_no_contrary_interest? %> + <%= page_template( page_title: t(".h1-heading"), back_link: { path: reset_providers_legal_aid_application_check_passported_answers_path(@legal_aid_application), method: :patch }, @@ -5,7 +7,7 @@

<%= t(".h2-heading") %>

- <%= render "shared/check_answers/assets" %> + <%= render "shared/check_answers/assets", individual: %>

<%= t(".chances_of_success_h2") %>

diff --git a/app/views/providers/means_reports/_with_bank_statement_uploads.html.erb b/app/views/providers/means_reports/_with_bank_statement_uploads.html.erb index 36884f14d6..5dc074a383 100644 --- a/app/views/providers/means_reports/_with_bank_statement_uploads.html.erb +++ b/app/views/providers/means_reports/_with_bank_statement_uploads.html.erb @@ -54,7 +54,7 @@ <%= t(".assets_heading") %> -<%= render "shared/check_answers/assets", read_only: true %> +<%= render "shared/check_answers/assets", read_only: true, individual: "" %> <% if @legal_aid_application.passported? && @manual_review_determiner.manual_review_required? %> <%= render "caseworker_review" %> 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 3de46ad704..2458a1db67 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 @@ -67,7 +67,7 @@ <%= t(".assets_heading") %> -<%= render "shared/check_answers/assets", read_only: true %> +<%= render "shared/check_answers/assets", read_only: true, individual: "" %> <% if @legal_aid_application.passported? && @manual_review_determiner.manual_review_required? %> <%= render "caseworker_review" %> diff --git a/app/views/shared/check_answers/_assets.html.erb b/app/views/shared/check_answers/_assets.html.erb index b7e4f30d2c..d404289430 100644 --- a/app/views/shared/check_answers/_assets.html.erb +++ b/app/views/shared/check_answers/_assets.html.erb @@ -1,14 +1,9 @@ <% read_only = false unless local_assigns.key?(:read_only) %> <% online_savings_accounts = @legal_aid_application.online_savings_accounts_balance %> <% online_current_accounts = @legal_aid_application.online_current_accounts_balance %> -<% individual = if @legal_aid_application.applicant.has_partner_with_no_contrary_interest? - "your client or their partner" - else - "your client" - end %> diff --git a/app/views/shared/review_application/_income_payments_and_assets_for_bank_statement_upload.html.erb b/app/views/shared/review_application/_income_payments_and_assets_for_bank_statement_upload.html.erb index cc5c01e4c1..7d866f816e 100644 --- a/app/views/shared/review_application/_income_payments_and_assets_for_bank_statement_upload.html.erb +++ b/app/views/shared/review_application/_income_payments_and_assets_for_bank_statement_upload.html.erb @@ -99,6 +99,6 @@ diff --git a/config/locales/en/providers.yml b/config/locales/en/providers.yml index c0c5578b09..89584fb0a0 100644 --- a/config/locales/en/providers.yml +++ b/config/locales/en/providers.yml @@ -1167,6 +1167,7 @@ en: show: h1-heading: Check your answers capital-section-heading: Your client's capital + capital-section-heading_with_partner: Your client's and their partner's capital what_happens_next: heading: What happens next text: We'll use your answers to check your client's financial eligibility for legal aid. diff --git a/config/locales/en/shared.yml b/config/locales/en/shared.yml index e54a43f99a..687e7eca26 100644 --- a/config/locales/en/shared.yml +++ b/config/locales/en/shared.yml @@ -238,8 +238,10 @@ en: assets: assets: other_assets: Which assets does your client have? + other_assets_with_partner: Which assets does either your client or their partner have? policy_disregards: Payments from scheme or charities savings_and_investments: Which savings or investments does your client have? + savings_and_investments_with_partner: Which savings or investments does either your client or their partner have? savings_account: Savings account current_account: Current account bank_accounts: Which bank accounts does your client have? @@ -248,11 +250,15 @@ en: property: heading_own_home: Property heading_property_details: Your client's property + heading_property_details_with_partner: Your client's and their partner's property own_home: Does your client own the home that they live in? + own_home_with_partner: Does your client or their partner own the home that they live in? property_value: How much is the home they live in worth? outstanding_mortgage: How much is left to pay on the mortgage? shared_ownership: Does your client own the home with anyone else? + shared_ownership_with_partner: Does your client or their partner own the home with anyone else? percentage_home: What percentage of the home does your client legally own? + percentage_home_with_partner: What percentage of the home do your client and their partner legally own? offline_savings_accounts: heading: Does your client have any savings accounts they cannot access online? offline_savings_accounts: Has savings accounts they cannot access online @@ -463,16 +469,19 @@ en: costs: *costs work: *work restrictions: + details: Details of restrictions citizens: heading: Restrictions on your assets question: Are there any legal restrictions that prevent you from selling or borrowing against your assets? providers: heading: Restrictions on your client's assets + heading_with_partner: Restrictions on your client's or their partner's assets question: Is your client banned from selling or borrowing against their assets? vehicles: providers: heading: Vehicles - own: Does %{individual} own a vehicle? + own: Does your client own a vehicle? + own_with_partner: Does your client or their partner own a vehicle? owner: Who owns the vehicle? estimated_value: What is the estimated value of the vehicle? payment_remaining: Are there any payments left on the vehicle? From b07e14631107230b5f4ec844e0a2c4ebf87c7290 Mon Sep 17 00:00:00 2001 From: Adam Goldstone <13471320+agoldstone93@users.noreply.github.com> Date: Mon, 16 Oct 2023 11:54:59 +0100 Subject: [PATCH 2/6] AP-3809: Bank account section content changes Update content in bank account section. Change instances of "No" and "None" to match designs. Update feature tests so they still pass. --- app/helpers/capital_helper.rb | 2 +- app/helpers/policy_disregards_helper.rb | 2 +- app/views/shared/check_answers/_assets.html.erb | 17 +++++++++-------- config/locales/en/shared.yml | 7 ++++--- features/providers/means_report.feature | 12 ++++++------ features/providers/review_and_print.feature | 8 ++++---- features/step_definitions/means_report_steps.rb | 4 ++-- .../check_capital_answers_controller_spec.rb | 2 +- 8 files changed, 28 insertions(+), 26 deletions(-) diff --git a/app/helpers/capital_helper.rb b/app/helpers/capital_helper.rb index 47116877dd..68a1941d99 100644 --- a/app/helpers/capital_helper.rb +++ b/app/helpers/capital_helper.rb @@ -53,7 +53,7 @@ def capital_amount_items(items, locale_namespace, percentage_values) def capital_amount_text(amount, type) if amount.nil? - "No" + t("generic.no") elsif type == :percentage number_to_percentage(amount, precision: 2) else diff --git a/app/helpers/policy_disregards_helper.rb b/app/helpers/policy_disregards_helper.rb index 3c74d08668..dbbe9fc0b5 100644 --- a/app/helpers/policy_disregards_helper.rb +++ b/app/helpers/policy_disregards_helper.rb @@ -16,7 +16,7 @@ def policy_disregards_list(policy_disregards) items&.compact! items.map do |item| - item.amount_text ||= "No" + item.amount_text ||= t("generic.no") end { diff --git a/app/views/shared/check_answers/_assets.html.erb b/app/views/shared/check_answers/_assets.html.erb index d404289430..84eec56b6f 100644 --- a/app/views/shared/check_answers/_assets.html.erb +++ b/app/views/shared/check_answers/_assets.html.erb @@ -9,20 +9,21 @@