Browse Source

CLDC-3993: Add ability to update sales deposit question copy by ownership types (#3041)

* Update deposit question copy by ownership types

* Remove outright sale in 2025
main
Manny Dinssa 19 hours ago committed by GitHub
parent
commit
faca9004ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      app/models/form/sales/pages/deposit.rb
  2. 7
      app/models/form/sales/questions/deposit_amount.rb
  3. 23
      config/locales/forms/2023/sales/sale_information.en.yml
  4. 23
      config/locales/forms/2024/sales/sale_information.en.yml
  5. 17
      config/locales/forms/2025/sales/sale_information.en.yml

7
app/models/form/sales/pages/deposit.rb

@ -3,6 +3,7 @@ class Form::Sales::Pages::Deposit < ::Form::Page
super(id, hsh, subsection)
@ownershipsch = ownershipsch
@optional = optional
@copy_key = copy_key
end
def questions
@ -18,4 +19,10 @@ class Form::Sales::Pages::Deposit < ::Form::Page
log.ownershipsch == 1
end
def copy_key
return "sales.sale_information.deposit.shared_ownership" if @ownershipsch == 1
return "sales.sale_information.deposit.discounted_ownership" if @ownershipsch == 2
return "sales.sale_information.deposit.outright_sale" if @ownershipsch == 3
end
end

7
app/models/form/sales/questions/deposit_amount.rb

@ -12,6 +12,7 @@ class Form::Sales::Questions::DepositAmount < ::Form::Question
@question_number = QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.fetch(form.start_date.year, QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.max_by { |k, _v| k }.last)[ownershipsch]
@optional = optional
@top_guidance_partial = top_guidance_partial
@copy_key = copy_key
end
def derived?(log)
@ -29,4 +30,10 @@ class Form::Sales::Questions::DepositAmount < ::Form::Question
return "financial_calculations_discounted_ownership" if @ownershipsch == 2
return "financial_calculations_outright_sale" if @ownershipsch == 3
end
def copy_key
return "sales.sale_information.deposit.shared_ownership" if @ownershipsch == 1
return "sales.sale_information.deposit.discounted_ownership" if @ownershipsch == 2
return "sales.sale_information.deposit.outright_sale" if @ownershipsch == 3
end
end

23
config/locales/forms/2023/sales/sale_information.en.yml

@ -174,11 +174,24 @@ en:
question_text: "Does this include any extra borrowing?"
deposit:
page_header: "About the deposit"
check_answer_label: "Deposit amount"
check_answer_prompt: ""
hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan"
question_text: "How much cash deposit was paid on the property?"
discounted_ownership:
page_header: "About the deposit"
check_answer_label: "Deposit amount"
check_answer_prompt: ""
hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan."
question_text: "How much cash deposit was paid on the property?"
shared_ownership:
page_header: "About the deposit"
check_answer_label: "Deposit amount"
check_answer_prompt: ""
hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage."
question_text: "How much cash deposit was paid on the property?"
outright_sale:
page_header: "About the deposit"
check_answer_label: "Deposit amount"
check_answer_prompt: ""
hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage."
question_text: "How much cash deposit was paid on the property?"
cashdis:
page_header: "About the deposit"

23
config/locales/forms/2024/sales/sale_information.en.yml

@ -179,11 +179,24 @@ en:
question_text: "Does this include any extra borrowing?"
deposit:
page_header: "About the deposit"
check_answer_label: "Deposit amount"
check_answer_prompt: ""
hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan. As this is a fully staircased sale this question is optional. If you do not have the information available click save and continue"
question_text: "How much cash deposit was paid on the property?"
discounted_ownership:
page_header: "About the deposit"
check_answer_label: "Deposit amount"
check_answer_prompt: ""
hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan."
question_text: "How much cash deposit was paid on the property?"
shared_ownership:
page_header: "About the deposit"
check_answer_label: "Deposit amount"
check_answer_prompt: ""
hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage."
question_text: "How much cash deposit was paid on the property?"
outright_sale:
page_header: "About the deposit"
check_answer_label: "Deposit amount"
check_answer_prompt: ""
hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage."
question_text: "How much cash deposit was paid on the property?"
cashdis:
page_header: "About the deposit"

17
config/locales/forms/2025/sales/sale_information.en.yml

@ -212,11 +212,18 @@ en:
question_text: "Does this include any extra borrowing?"
deposit:
page_header: "About the deposit"
check_answer_label: "Deposit amount"
check_answer_prompt: ""
hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan."
question_text: "How much cash deposit was paid on the property?"
discounted_ownership:
page_header: "About the deposit"
check_answer_label: "Deposit amount"
check_answer_prompt: ""
hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan."
question_text: "How much cash deposit was paid on the property?"
shared_ownership:
page_header: "About the deposit"
check_answer_label: "Deposit amount"
check_answer_prompt: ""
hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage."
question_text: "How much cash deposit was paid on the property?"
cashdis:
page_header: "About the deposit"

Loading…
Cancel
Save