From 882a27bfd74c5236c86a3ee7c3cde486761df98d Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Fri, 20 Jan 2023 17:40:16 +0000 Subject: [PATCH] feat: update text, remove separate redundant function, add value check page everywhere --- app/models/form/sales/pages/extra_borrowing_value_check.rb | 2 -- .../form/sales/questions/extra_borrowing_value_check.rb | 2 +- .../form/sales/subsections/discounted_ownership_scheme.rb | 3 +++ app/models/validations/sales/household_validations.rb | 4 ---- config/locales/en.yml | 3 +-- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app/models/form/sales/pages/extra_borrowing_value_check.rb b/app/models/form/sales/pages/extra_borrowing_value_check.rb index 013bfef8d..18f975b8d 100644 --- a/app/models/form/sales/pages/extra_borrowing_value_check.rb +++ b/app/models/form/sales/pages/extra_borrowing_value_check.rb @@ -10,8 +10,6 @@ class Form::Sales::Pages::ExtraBorrowingValueCheck < Form::Page "translation" => "soft_validations.extra_borrowing.title", } @informative_text = { - "translation" => "soft_validations.extra_borrowing.hint_text", - "arguments" => [], } end diff --git a/app/models/form/sales/questions/extra_borrowing_value_check.rb b/app/models/form/sales/questions/extra_borrowing_value_check.rb index a0bae0ba7..0f12ce110 100644 --- a/app/models/form/sales/questions/extra_borrowing_value_check.rb +++ b/app/models/form/sales/questions/extra_borrowing_value_check.rb @@ -18,6 +18,6 @@ class Form::Sales::Questions::ExtraBorrowingValueCheck < ::Form::Question }, ], } - @header = "Are you sure this there is no extra borrowing?" + @header = "Are you sure there is no extra borrowing?" end end diff --git a/app/models/form/sales/subsections/discounted_ownership_scheme.rb b/app/models/form/sales/subsections/discounted_ownership_scheme.rb index 9b58e4ab3..a751f8b9b 100644 --- a/app/models/form/sales/subsections/discounted_ownership_scheme.rb +++ b/app/models/form/sales/subsections/discounted_ownership_scheme.rb @@ -10,16 +10,19 @@ class Form::Sales::Subsections::DiscountedOwnershipScheme < ::Form::Subsection @pages ||= [ Form::Sales::Pages::LivingBeforePurchase.new("living_before_purchase_discounted_ownership", nil, self), Form::Sales::Pages::AboutPriceRtb.new(nil, nil, self), + Form::Sales::Pages::ExtraBorrowingValueCheck.new("extra_borrowing_value_check_discounted_ownership", nil, self), Form::Sales::Pages::AboutPriceNotRtb.new(nil, nil, self), Form::Sales::Pages::PurchasePrice.new("purchase_price_discounted_ownership", nil, self), Form::Sales::Pages::Mortgageused.new("mortgage_used_discounted_ownership", nil, self), Form::Sales::Pages::MortgageAmount.new("mortgage_amount_discounted_ownership", nil, self), + Form::Sales::Pages::ExtraBorrowingValueCheck.new("extra_borrowing_value_check_discounted_ownership", nil, self), Form::Sales::Pages::MortgageLender.new("mortgage_lender_discounted_ownership", nil, self), Form::Sales::Pages::MortgageLenderOther.new("mortgage_lender_other_discounted_ownership", nil, self), Form::Sales::Pages::MortgageLength.new("mortgage_length_discounted_ownership", nil, self), Form::Sales::Pages::ExtraBorrowing.new("extra_borrowing_discounted_ownership", nil, self), Form::Sales::Pages::ExtraBorrowingValueCheck.new("extra_borrowing_value_check_discounted_ownership", nil, self), Form::Sales::Pages::AboutDepositWithoutDiscount.new("about_deposit_discounted_ownership", nil, self), + Form::Sales::Pages::ExtraBorrowingValueCheck.new("extra_borrowing_value_check_discounted_ownership", nil, self), Form::Sales::Pages::DepositValueCheck.new("discounted_ownership_deposit_value_check", nil, self), Form::Sales::Pages::LeaseholdCharges.new("leasehold_charges_discounted_ownership", nil, self), ] diff --git a/app/models/validations/sales/household_validations.rb b/app/models/validations/sales/household_validations.rb index 385659c9a..443eb9cbb 100644 --- a/app/models/validations/sales/household_validations.rb +++ b/app/models/validations/sales/household_validations.rb @@ -54,10 +54,6 @@ private economic_status == 7 end - def person_economic_status_refused?(economic_status) - economic_status == 10 - end - def person_is_child?(relationship) relationship == "C" end diff --git a/config/locales/en.yml b/config/locales/en.yml index 22bc78668..a308da9cb 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -418,8 +418,7 @@ en: title: "You told us this person is %{age} or over and not retired" hint_text: "The minimum expected retirement age for %{gender} in England is %{age}." extra_borrowing: - title: "You told us this doesn't include any extra borrowing" - hint_text: "The mortgage and deposit are higher than the purchase minus the discount" + title: "The mortgage and deposit are higher than the purchase minus the discount" pregnancy: title: "You told us somebody in the household is pregnant" no_females: "You also told us there are no female tenants living at the property."