Browse Source

Move question for 2025/26

pull/2751/head
Manny Dinssa 8 months ago
parent
commit
daa937fda4
  1. 5
      app/models/form/sales/questions/staircase.rb
  2. 1
      app/models/form/sales/subsections/setup.rb
  3. 2
      app/models/form/sales/subsections/shared_ownership_scheme.rb
  4. 5
      config/locales/forms/2025/sales/sale_information.en.yml
  5. 6
      config/locales/forms/2025/sales/setup.en.yml

5
app/models/form/sales/questions/staircase.rb

@ -2,7 +2,7 @@ class Form::Sales::Questions::Staircase < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "staircase" @id = "staircase"
@copy_key = "sales.sale_information.staircasing" @copy_key = form.start_year_2025_or_later? ? "sales.setup.staircasing" : "sales.sale_information.staircasing"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@ -11,8 +11,7 @@ class Form::Sales::Questions::Staircase < ::Form::Question
ANSWER_OPTIONS = { ANSWER_OPTIONS = {
"1" => { "value" => "Yes" }, "1" => { "value" => "Yes" },
"2" => { "value" => "No" }, "2" => { "value" => "No" },
"3" => { "value" => "Don’t know" },
}.freeze }.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 76, 2024 => 78 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 76, 2024 => 78, 2025 => 7 }.freeze
end end

1
app/models/form/sales/subsections/setup.rb

@ -13,6 +13,7 @@ class Form::Sales::Subsections::Setup < ::Form::Subsection
Form::Sales::Pages::SaleDate.new(nil, nil, self), Form::Sales::Pages::SaleDate.new(nil, nil, self),
Form::Sales::Pages::PurchaserCode.new(nil, nil, self), Form::Sales::Pages::PurchaserCode.new(nil, nil, self),
Form::Sales::Pages::OwnershipScheme.new(nil, nil, self), Form::Sales::Pages::OwnershipScheme.new(nil, nil, self),
(Form::Sales::Pages::Staircase.new(nil, nil, self) if form.start_year_2025_or_later?),
Form::Sales::Pages::SharedOwnershipType.new(nil, nil, self), Form::Sales::Pages::SharedOwnershipType.new(nil, nil, self),
Form::Sales::Pages::DiscountedOwnershipType.new(nil, nil, self), Form::Sales::Pages::DiscountedOwnershipType.new(nil, nil, self),
Form::Sales::Pages::OutrightOwnershipType.new(nil, nil, self), Form::Sales::Pages::OutrightOwnershipType.new(nil, nil, self),

2
app/models/form/sales/subsections/shared_ownership_scheme.rb

@ -10,7 +10,7 @@ class Form::Sales::Subsections::SharedOwnershipScheme < ::Form::Subsection
@pages ||= [ @pages ||= [
Form::Sales::Pages::LivingBeforePurchase.new("living_before_purchase_shared_ownership_joint_purchase", nil, self, ownershipsch: 1, joint_purchase: true), Form::Sales::Pages::LivingBeforePurchase.new("living_before_purchase_shared_ownership_joint_purchase", nil, self, ownershipsch: 1, joint_purchase: true),
Form::Sales::Pages::LivingBeforePurchase.new("living_before_purchase_shared_ownership", nil, self, ownershipsch: 1, joint_purchase: false), Form::Sales::Pages::LivingBeforePurchase.new("living_before_purchase_shared_ownership", nil, self, ownershipsch: 1, joint_purchase: false),
Form::Sales::Pages::Staircase.new(nil, nil, self), (Form::Sales::Pages::Staircase.new(nil, nil, self) unless form.start_year_2025_or_later?),
Form::Sales::Pages::AboutStaircase.new("about_staircasing_joint_purchase", nil, self, joint_purchase: true), Form::Sales::Pages::AboutStaircase.new("about_staircasing_joint_purchase", nil, self, joint_purchase: true),
Form::Sales::Pages::AboutStaircase.new("about_staircasing_not_joint_purchase", nil, self, joint_purchase: false), Form::Sales::Pages::AboutStaircase.new("about_staircasing_not_joint_purchase", nil, self, joint_purchase: false),
Form::Sales::Pages::StaircaseBoughtValueCheck.new(nil, nil, self), Form::Sales::Pages::StaircaseBoughtValueCheck.new(nil, nil, self),

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

@ -25,11 +25,6 @@ en:
hint_text: "" hint_text: ""
question_text: "Did the buyer live in the property before purchasing it?" question_text: "Did the buyer live in the property before purchasing it?"
staircasing:
page_header: ""
check_answer_label: "Staircasing transaction"
hint_text: "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property"
question_text: "Is this a staircasing transaction?"
about_staircasing: about_staircasing:
page_header: "About the staircasing transaction" page_header: "About the staircasing transaction"
stairbought: stairbought:

6
config/locales/forms/2025/sales/setup.en.yml

@ -39,6 +39,12 @@ en:
hint_text: "" hint_text: ""
question_text: "Was this purchase made through an ownership scheme?" question_text: "Was this purchase made through an ownership scheme?"
staircasing:
page_header: ""
check_answer_label: "Staircasing transaction"
hint_text: "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property"
question_text: "Is this a staircasing transaction?"
type: type:
shared_ownership: shared_ownership:
page_header: "Type of shared ownership sale" page_header: "Type of shared ownership sale"

Loading…
Cancel
Save