Browse Source

feat: updated copy requirements

CLDC-1790-sales-validation-content-updates
natdeanlewissoftwire 2 years ago
parent
commit
a421007141
  1. 2
      app/models/form/sales/questions/deposit_value_check.rb
  2. 2
      app/models/form/sales/questions/household_wheelchair_check.rb
  3. 2
      app/models/form/sales/questions/mortgage_value_check.rb
  4. 2
      app/models/form/sales/questions/savings_value_check.rb
  5. 2
      app/models/validations/sales/financial_validations.rb
  6. 6
      config/locales/en.yml
  7. 2
      spec/models/form/sales/questions/deposit_value_check_spec.rb
  8. 2
      spec/models/form/sales/questions/household_wheelchair_check_spec.rb
  9. 2
      spec/models/form/sales/questions/mortgage_value_check_spec.rb
  10. 2
      spec/models/form/sales/questions/savings_value_check_spec.rb

2
app/models/form/sales/questions/deposit_value_check.rb

@ -3,7 +3,7 @@ class Form::Sales::Questions::DepositValueCheck < ::Form::Question
super super
@id = "deposit_value_check" @id = "deposit_value_check"
@check_answer_label = "Deposit confirmation" @check_answer_label = "Deposit confirmation"
@header = "Are you sure that the deposit is this much higher than the buyer's savings?" @header = "Are you sure the buyer's deposit is this much higher than their savings?"
@type = "interruption_screen" @type = "interruption_screen"
@answer_options = { @answer_options = {
"0" => { "value" => "Yes" }, "0" => { "value" => "Yes" },

2
app/models/form/sales/questions/household_wheelchair_check.rb

@ -3,7 +3,7 @@ class Form::Sales::Questions::HouseholdWheelchairCheck < ::Form::Question
super super
@id = "wheel_value_check" @id = "wheel_value_check"
@check_answer_label = "Does anyone in the household use a wheelchair?" @check_answer_label = "Does anyone in the household use a wheelchair?"
@header = "Is this right? Earlier, you said someone in the household uses a wheelchair" @header = "Are you sure? Earlier, you said that that nobody in the household considers themselves to have a disability"
@type = "interruption_screen" @type = "interruption_screen"
@answer_options = { @answer_options = {
"0" => { "value" => "Yes" }, "0" => { "value" => "Yes" },

2
app/models/form/sales/questions/mortgage_value_check.rb

@ -3,7 +3,7 @@ class Form::Sales::Questions::MortgageValueCheck < ::Form::Question
super super
@id = "mortgage_value_check" @id = "mortgage_value_check"
@check_answer_label = "Mortgage confirmation" @check_answer_label = "Mortgage confirmation"
@header = "Are you sure that the mortgage is more than 5 times the income used for the mortgage application?" @header = "Are you sure the mortgage is more than 5 times the income used for the mortgage application?"
@type = "interruption_screen" @type = "interruption_screen"
@answer_options = { @answer_options = {
"0" => { "value" => "Yes" }, "0" => { "value" => "Yes" },

2
app/models/form/sales/questions/savings_value_check.rb

@ -3,7 +3,7 @@ class Form::Sales::Questions::SavingsValueCheck < ::Form::Question
super super
@id = "savings_value_check" @id = "savings_value_check"
@check_answer_label = "Savings confirmation" @check_answer_label = "Savings confirmation"
@header = "Are you sure the savings are higher than £100,000?" @header = "Are you sure savings are above £100,000?"
@type = "interruption_screen" @type = "interruption_screen"
@answer_options = { @answer_options = {
"0" => { "value" => "Yes" }, "0" => { "value" => "Yes" },

2
app/models/validations/sales/financial_validations.rb

@ -10,7 +10,7 @@ module Validations::Sales::FinancialValidations
record.errors.add :ownershipsch, I18n.t("validations.financial.income1.over_hard_max.inside_london") record.errors.add :ownershipsch, I18n.t("validations.financial.income1.over_hard_max.inside_london")
record.errors.add :la, I18n.t("validations.financial.income1.over_hard_max.inside_london") record.errors.add :la, I18n.t("validations.financial.income1.over_hard_max.inside_london")
record.errors.add :postcode_full, I18n.t("validations.financial.income1.over_hard_max.inside_london") record.errors.add :postcode_full, I18n.t("validations.financial.income1.over_hard_max.inside_london")
elsif record.income1 > 80_000 elsif !record.london_property? && record.income1 > 80_000
record.errors.add :income1, I18n.t("validations.financial.income1.over_hard_max.outside_london") record.errors.add :income1, I18n.t("validations.financial.income1.over_hard_max.outside_london")
record.errors.add :ecstat1, I18n.t("validations.financial.income1.over_hard_max.outside_london") record.errors.add :ecstat1, I18n.t("validations.financial.income1.over_hard_max.outside_london")
record.errors.add :ownershipsch, I18n.t("validations.financial.income1.over_hard_max.outside_london") record.errors.add :ownershipsch, I18n.t("validations.financial.income1.over_hard_max.outside_london")

6
config/locales/en.yml

@ -214,8 +214,8 @@ en:
earnings_missing: "Enter how much income the household has in total" earnings_missing: "Enter how much income the household has in total"
income1: income1:
over_hard_max: over_hard_max:
outside_london: "Income maximum under £80,000 for properties outside London local authorities" outside_london: "Income must not exceed £80,000 for properties outside London local authorities"
inside_london: "Income maximum £90,000 for properties within London local authorities" inside_london: "Income must not exceed £90,000 for properties within London local authorities"
negative_currency: "Enter an amount above 0" negative_currency: "Enter an amount above 0"
rent: rent:
less_than_shortfall: "Enter an amount that is more than the shortfall in basic rent" less_than_shortfall: "Enter an amount that is more than the shortfall in basic rent"
@ -423,7 +423,7 @@ en:
must_be_less_than_1_year_from_saledate: must_be_less_than_1_year_from_saledate:
Contract exchange date must be less than 1 year before completion date Contract exchange date must be less than 1 year before completion date
previous_property_beds: previous_property_beds:
property_type_bedsit: "A bedsit cannot have more than 1 bedroom" property_type_bedsit: "Number of bedrooms must be 1 if the property is a bedsit"
discounted_ownership_value: "Mortgage, deposit, and grant total must equal £%{value_with_discount}" discounted_ownership_value: "Mortgage, deposit, and grant total must equal £%{value_with_discount}"
monthly_rent: monthly_rent:
higher_than_expected: "Basic monthly rent must be between £0 and £9,999" higher_than_expected: "Basic monthly rent must be between £0 and £9,999"

2
spec/models/form/sales/questions/deposit_value_check_spec.rb

@ -16,7 +16,7 @@ RSpec.describe Form::Sales::Questions::DepositValueCheck, type: :model do
end end
it "has the correct header" do it "has the correct header" do
expect(question.header).to eq("Are you sure that the deposit is this much higher than the buyer's savings?") expect(question.header).to eq("Are you sure the buyer's deposit is this much higher than their savings?")
end end
it "has the correct check_answer_label" do it "has the correct check_answer_label" do

2
spec/models/form/sales/questions/household_wheelchair_check_spec.rb

@ -16,7 +16,7 @@ RSpec.describe Form::Sales::Questions::HouseholdWheelchairCheck, type: :model do
end end
it "has the correct header" do it "has the correct header" do
expect(question.header).to eq("Is this right? Earlier, you said someone in the household uses a wheelchair") expect(question.header).to eq("Are you sure? Earlier, you said that that nobody in the household considers themselves to have a disability")
end end
it "has the correct check_answer_label" do it "has the correct check_answer_label" do

2
spec/models/form/sales/questions/mortgage_value_check_spec.rb

@ -16,7 +16,7 @@ RSpec.describe Form::Sales::Questions::MortgageValueCheck, type: :model do
end end
it "has the correct header" do it "has the correct header" do
expect(question.header).to eq("Are you sure that the mortgage is more than 5 times the income used for the mortgage application?") expect(question.header).to eq("Are you sure the mortgage is more than 5 times the income used for the mortgage application?")
end end
it "has the correct check_answer_label" do it "has the correct check_answer_label" do

2
spec/models/form/sales/questions/savings_value_check_spec.rb

@ -16,7 +16,7 @@ RSpec.describe Form::Sales::Questions::SavingsValueCheck, type: :model do
end end
it "has the correct header" do it "has the correct header" do
expect(question.header).to eq("Are you sure the savings are higher than £100,000?") expect(question.header).to eq("Are you sure savings are above £100,000?")
end end
it "has the correct check_answer_label" do it "has the correct check_answer_label" do

Loading…
Cancel
Save