Browse Source

CLDC-3180 Update lettings question numbering (#2255)

* Update question numbers for 2024 lettings

* Stub form start date in question tests

* Stub form start date in page tests

* Fix a typo

* Refactor default question number

* Refactor people question numbers

* Update some question numbers

* Update missing tests

* Update UPRN known question number

* Reorder questions, revert earnings number switch
pull/2298/head
kosiakkatrina 10 months ago committed by GitHub
parent
commit
57b43d34c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      app/models/form/lettings/pages/address.rb
  2. 2
      app/models/form/lettings/pages/income_amount.rb
  3. 4
      app/models/form/lettings/questions/address_line1.rb
  4. 14
      app/models/form/lettings/questions/age.rb
  5. 4
      app/models/form/lettings/questions/age1.rb
  6. 4
      app/models/form/lettings/questions/age1_known.rb
  7. 14
      app/models/form/lettings/questions/age_known.rb
  8. 4
      app/models/form/lettings/questions/armedforces.rb
  9. 4
      app/models/form/lettings/questions/beds.rb
  10. 4
      app/models/form/lettings/questions/benefits.rb
  11. 4
      app/models/form/lettings/questions/brent_4_weekly.rb
  12. 4
      app/models/form/lettings/questions/brent_bi_weekly.rb
  13. 4
      app/models/form/lettings/questions/brent_monthly.rb
  14. 4
      app/models/form/lettings/questions/brent_weekly.rb
  15. 4
      app/models/form/lettings/questions/builtype.rb
  16. 4
      app/models/form/lettings/questions/chcharge_4_weekly.rb
  17. 4
      app/models/form/lettings/questions/chcharge_bi_weekly.rb
  18. 4
      app/models/form/lettings/questions/chcharge_monthly.rb
  19. 4
      app/models/form/lettings/questions/chcharge_weekly.rb
  20. 4
      app/models/form/lettings/questions/condition_effects.rb
  21. 4
      app/models/form/lettings/questions/county.rb
  22. 4
      app/models/form/lettings/questions/declaration.rb
  23. 4
      app/models/form/lettings/questions/earnings.rb
  24. 4
      app/models/form/lettings/questions/ethnic_arab.rb
  25. 4
      app/models/form/lettings/questions/ethnic_asian.rb
  26. 4
      app/models/form/lettings/questions/ethnic_black.rb
  27. 4
      app/models/form/lettings/questions/ethnic_group.rb
  28. 4
      app/models/form/lettings/questions/ethnic_mixed.rb
  29. 4
      app/models/form/lettings/questions/ethnic_white.rb
  30. 4
      app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb
  31. 4
      app/models/form/lettings/questions/gender_identity1.rb
  32. 4
      app/models/form/lettings/questions/hb.rb
  33. 4
      app/models/form/lettings/questions/hbrentshortfall.rb
  34. 4
      app/models/form/lettings/questions/hhmemb.rb
  35. 4
      app/models/form/lettings/questions/homeless.rb
  36. 4
      app/models/form/lettings/questions/household_charge.rb
  37. 4
      app/models/form/lettings/questions/housingneeds.rb
  38. 4
      app/models/form/lettings/questions/housingneeds_other.rb
  39. 4
      app/models/form/lettings/questions/housingneeds_type.rb
  40. 4
      app/models/form/lettings/questions/illness.rb
  41. 4
      app/models/form/lettings/questions/incfreq.rb
  42. 4
      app/models/form/lettings/questions/irproduct_other.rb
  43. 4
      app/models/form/lettings/questions/is_carehome.rb
  44. 4
      app/models/form/lettings/questions/joint.rb
  45. 4
      app/models/form/lettings/questions/la.rb
  46. 4
      app/models/form/lettings/questions/layear.rb
  47. 4
      app/models/form/lettings/questions/leftreg.rb
  48. 4
      app/models/form/lettings/questions/letting_allocation.rb
  49. 4
      app/models/form/lettings/questions/location_id.rb
  50. 4
      app/models/form/lettings/questions/majorrepairs.rb
  51. 4
      app/models/form/lettings/questions/managing_organisation.rb
  52. 4
      app/models/form/lettings/questions/mrcdate.rb
  53. 4
      app/models/form/lettings/questions/nationality.rb
  54. 4
      app/models/form/lettings/questions/nationality_all.rb
  55. 4
      app/models/form/lettings/questions/nationality_all_group.rb
  56. 4
      app/models/form/lettings/questions/needs_type.rb
  57. 4
      app/models/form/lettings/questions/net_income_known.rb
  58. 4
      app/models/form/lettings/questions/offered.rb
  59. 4
      app/models/form/lettings/questions/period.rb
  60. 14
      app/models/form/lettings/questions/person_gender_identity.rb
  61. 14
      app/models/form/lettings/questions/person_relationship.rb
  62. 14
      app/models/form/lettings/questions/person_working_situation.rb
  63. 4
      app/models/form/lettings/questions/postcode_for_full_address.rb
  64. 4
      app/models/form/lettings/questions/ppcodenk.rb
  65. 4
      app/models/form/lettings/questions/ppostcode_full.rb
  66. 4
      app/models/form/lettings/questions/preg_occ.rb
  67. 4
      app/models/form/lettings/questions/previous_la_known.rb
  68. 4
      app/models/form/lettings/questions/previous_let_type.rb
  69. 4
      app/models/form/lettings/questions/previous_tenure.rb
  70. 4
      app/models/form/lettings/questions/previous_tenure_renewal.rb
  71. 4
      app/models/form/lettings/questions/prevloc.rb
  72. 4
      app/models/form/lettings/questions/property_reference.rb
  73. 4
      app/models/form/lettings/questions/pscharge_4_weekly.rb
  74. 4
      app/models/form/lettings/questions/pscharge_bi_weekly.rb
  75. 4
      app/models/form/lettings/questions/pscharge_monthly.rb
  76. 4
      app/models/form/lettings/questions/pscharge_weekly.rb
  77. 4
      app/models/form/lettings/questions/reason.rb
  78. 4
      app/models/form/lettings/questions/reason_renewal.rb
  79. 4
      app/models/form/lettings/questions/reasonable_preference_reason.rb
  80. 4
      app/models/form/lettings/questions/reasonother.rb
  81. 4
      app/models/form/lettings/questions/reasonpref.rb
  82. 4
      app/models/form/lettings/questions/referral.rb
  83. 4
      app/models/form/lettings/questions/referral_prp.rb
  84. 4
      app/models/form/lettings/questions/referral_supported_housing.rb
  85. 4
      app/models/form/lettings/questions/referral_supported_housing_prp.rb
  86. 4
      app/models/form/lettings/questions/renewal.rb
  87. 4
      app/models/form/lettings/questions/rent_type.rb
  88. 4
      app/models/form/lettings/questions/reservist.rb
  89. 4
      app/models/form/lettings/questions/rsnvac.rb
  90. 4
      app/models/form/lettings/questions/rsnvac_first_let.rb
  91. 4
      app/models/form/lettings/questions/scharge_4_weekly.rb
  92. 4
      app/models/form/lettings/questions/scharge_bi_weekly.rb
  93. 4
      app/models/form/lettings/questions/scharge_monthly.rb
  94. 4
      app/models/form/lettings/questions/scharge_weekly.rb
  95. 4
      app/models/form/lettings/questions/scheme_id.rb
  96. 4
      app/models/form/lettings/questions/sheltered.rb
  97. 4
      app/models/form/lettings/questions/starter_tenancy_type.rb
  98. 4
      app/models/form/lettings/questions/startertenancy.rb
  99. 4
      app/models/form/lettings/questions/stock_owner.rb
  100. 4
      app/models/form/lettings/questions/supcharg_4_weekly.rb
  101. Some files were not shown because too many files have changed in this diff Show More

4
app/models/form/lettings/pages/address.rb

@ -2,7 +2,7 @@ class Form::Lettings::Pages::Address < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "address"
@header = "Q12 - What is the property's address?"
@header = "Q#{QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]} - What is the property's address?"
@depends_on = [
{ "is_supported_housing?" => false, "uprn_known" => nil },
{ "is_supported_housing?" => false, "uprn_known" => 0 },
@ -19,4 +19,6 @@ class Form::Lettings::Pages::Address < ::Form::Page
Form::Lettings::Questions::PostcodeForFullAddress.new(nil, nil, self),
]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 12, 2024 => 13 }.freeze
end

2
app/models/form/lettings/pages/income_amount.rb

@ -8,8 +8,8 @@ class Form::Lettings::Pages::IncomeAmount < ::Form::Page
def questions
@questions ||= [
Form::Lettings::Questions::Earnings.new(nil, nil, self),
Form::Lettings::Questions::Incfreq.new(nil, nil, self),
Form::Lettings::Questions::Earnings.new(nil, nil, self),
]
end
end

4
app/models/form/lettings/questions/address_line1.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::AddressLine1 < ::Form::Question
@plain_label = true
@check_answer_label = "Address lines 1 and 2"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
@question_number = 12
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@hide_question_number_on_page = true
end
@ -18,4 +18,6 @@ class Form::Lettings::Questions::AddressLine1 < ::Form::Question
log.address_line2,
].select(&:present?).join("\n")
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 12, 2024 => 13 }.freeze
end

14
app/models/form/lettings/questions/age.rb

@ -12,6 +12,18 @@ class Form::Lettings::Questions::Age < ::Form::Question
@min = 1
@step = 1
@hint_text = "For a child under 1, enter 1" if person_type == "child"
@question_number = 31 + (4 * person_index)
@person_index = person_index
@question_number = question_number
end
def question_number
base_question_number = case form.start_date.year
when 2023
31
else
30
end
base_question_number + (4 * @person_index)
end
end

4
app/models/form/lettings/questions/age1.rb

@ -11,6 +11,8 @@ class Form::Lettings::Questions::Age1 < ::Form::Question
@max = 120
@min = 16
@step = 1
@question_number = 32
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 32, 2024 => 31 }.freeze
end

4
app/models/form/lettings/questions/age1_known.rb

@ -9,7 +9,7 @@ class Form::Lettings::Questions::Age1Known < ::Form::Question
@answer_options = ANSWER_OPTIONS
@conditional_for = { "age1" => [0] }
@hidden_in_check_answers = { "depends_on" => [{ "age1_known" => 0 }, { "age1_known" => 1 }] }
@question_number = 32
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze
@ -21,4 +21,6 @@ class Form::Lettings::Questions::Age1Known < ::Form::Question
"The ’lead’ or ’main’ tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
end
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 32, 2024 => 31 }.freeze
end

14
app/models/form/lettings/questions/age_known.rb

@ -15,8 +15,20 @@ class Form::Lettings::Questions::AgeKnown < ::Form::Question
{ "age#{person_index}_known" => 1 },
],
}
@question_number = 31 + (4 * person_index)
@person_index = person_index
@question_number = question_number
end
ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze
def question_number
base_question_number = case form.start_date.year
when 2023
31
else
30
end
base_question_number + (4 * @person_index)
end
end

4
app/models/form/lettings/questions/armedforces.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::Armedforces < ::Form::Question
@check_answers_card_number = 0
@hint_text = "This excludes national service.<br><br>If there are several people in the household with links to the UK armed forces, you should answer for the regular. If there’s no regular, answer for the reserve. If there’s no reserve, answer for the spouse or civil partner."
@answer_options = ANSWER_OPTIONS
@question_number = 66
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -20,4 +20,6 @@ class Form::Lettings::Questions::Armedforces < ::Form::Question
"3" => { "value" => "Person prefers not to say" },
"6" => { "value" => "Don’t know" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 66, 2024 => 65 }.freeze
end

4
app/models/form/lettings/questions/beds.rb

@ -10,10 +10,12 @@ class Form::Lettings::Questions::Beds < ::Form::Question
@max = 12
@min = 1
@step = 1
@question_number = 22
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def hint_text
form.start_year_after_2024? ? "If shared accommodation, enter the number of bedrooms occupied by this household." : "If shared accommodation, enter the number of bedrooms occupied by this household. A bedsit has 1 bedroom."
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 22 }.freeze
end

4
app/models/form/lettings/questions/benefits.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::Benefits < ::Form::Question
@check_answers_card_number = 0
@hint_text = "This excludes child and housing benefit, council tax support and tax credits."
@answer_options = ANSWER_OPTIONS
@question_number = 90
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -18,4 +18,6 @@ class Form::Lettings::Questions::Benefits < ::Form::Question
"divider" => { "value" => true },
"4" => { "value" => "Don’t know" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 90, 2024 => 89 }.freeze
end

4
app/models/form/lettings/questions/brent_4_weekly.rb

@ -14,6 +14,8 @@ class Form::Lettings::Questions::Brent4Weekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every 4 weeks"
@question_number = 95
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 95, 2024 => 94 }.freeze
end

4
app/models/form/lettings/questions/brent_bi_weekly.rb

@ -14,6 +14,8 @@ class Form::Lettings::Questions::BrentBiWeekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every 2 weeks"
@question_number = 95
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 95, 2024 => 94 }.freeze
end

4
app/models/form/lettings/questions/brent_monthly.rb

@ -14,6 +14,8 @@ class Form::Lettings::Questions::BrentMonthly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every month"
@question_number = 95
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 95, 2024 => 94 }.freeze
end

4
app/models/form/lettings/questions/brent_weekly.rb

@ -14,6 +14,8 @@ class Form::Lettings::Questions::BrentWeekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every week"
@question_number = 95
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 95, 2024 => 94 }.freeze
end

4
app/models/form/lettings/questions/builtype.rb

@ -8,11 +8,13 @@ class Form::Lettings::Questions::Builtype < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 20
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
"2" => { "value" => "Converted from previous residential or non-residential property" },
"1" => { "value" => "Purpose built" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 20 }.freeze
end

4
app/models/form/lettings/questions/chcharge_4_weekly.rb

@ -11,6 +11,8 @@ class Form::Lettings::Questions::Chcharge4Weekly < ::Form::Question
@step = 0.01
@prefix = "£"
@suffix = " every 4 weeks"
@question_number = 94
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 94, 2024 => 93 }.freeze
end

4
app/models/form/lettings/questions/chcharge_bi_weekly.rb

@ -11,6 +11,8 @@ class Form::Lettings::Questions::ChchargeBiWeekly < ::Form::Question
@step = 0.01
@prefix = "£"
@suffix = " every 2 weeks"
@question_number = 94
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 94, 2024 => 93 }.freeze
end

4
app/models/form/lettings/questions/chcharge_monthly.rb

@ -11,6 +11,8 @@ class Form::Lettings::Questions::ChchargeMonthly < ::Form::Question
@step = 0.01
@prefix = "£"
@suffix = " every month"
@question_number = 94
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 94, 2024 => 93 }.freeze
end

4
app/models/form/lettings/questions/chcharge_weekly.rb

@ -11,6 +11,8 @@ class Form::Lettings::Questions::ChchargeWeekly < ::Form::Question
@step = 0.01
@prefix = "£"
@suffix = " every week"
@question_number = 94
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 94, 2024 => 93 }.freeze
end

4
app/models/form/lettings/questions/condition_effects.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::ConditionEffects < ::Form::Question
@check_answers_card_number = 0
@hint_text = "Select all that apply."
@answer_options = ANSWER_OPTIONS
@question_number = 74
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -29,4 +29,6 @@ class Form::Lettings::Questions::ConditionEffects < ::Form::Question
"illness_type_1" => { "value" => "Vision", "hint" => "For example, blindness or partial sight." },
"illness_type_10" => { "value" => "Other" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 74, 2024 => 73 }.freeze
end

4
app/models/form/lettings/questions/county.rb

@ -7,7 +7,9 @@ class Form::Lettings::Questions::County < ::Form::Question
@plain_label = true
@check_answer_label = "County"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
@question_number = 12
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@hide_question_number_on_page = true
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 12, 2024 => 13 }.freeze
end

4
app/models/form/lettings/questions/declaration.rb

@ -7,7 +7,7 @@ class Form::Lettings::Questions::Declaration < ::Form::Question
@type = "checkbox"
@check_answers_card_number = 0 unless form.start_year_after_2024?
@top_guidance_partial = form.start_year_after_2024? ? "privacy_notice_tenant_2024" : "privacy_notice_tenant"
@question_number = 30
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@ -19,4 +19,6 @@ class Form::Lettings::Questions::Declaration < ::Form::Question
{ "declaration" => { "value" => declaration_text } }.freeze
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 30, 2024 => 11 }.freeze
end

4
app/models/form/lettings/questions/earnings.rb

@ -17,6 +17,8 @@ class Form::Lettings::Questions::Earnings < ::Form::Question
{ "label" => " every month", "depends_on" => { "incfreq" => 2 } },
{ "label" => " every year", "depends_on" => { "incfreq" => 3 } },
]
@question_number = 88
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 88, 2024 => 87 }.freeze
end

4
app/models/form/lettings/questions/ethnic_arab.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::EthnicArab < ::Form::Question
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
@question_number = 35
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -19,4 +19,6 @@ class Form::Lettings::Questions::EthnicArab < ::Form::Question
"value" => "Other ethnic group",
},
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 35, 2024 => 34 }.freeze
end

4
app/models/form/lettings/questions/ethnic_asian.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::EthnicAsian < ::Form::Question
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
@question_number = 35
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -28,4 +28,6 @@ class Form::Lettings::Questions::EthnicAsian < ::Form::Question
"value" => "Any other Asian or Asian British background",
},
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 35, 2024 => 34 }.freeze
end

4
app/models/form/lettings/questions/ethnic_black.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::EthnicBlack < ::Form::Question
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
@question_number = 35
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -22,4 +22,6 @@ class Form::Lettings::Questions::EthnicBlack < ::Form::Question
"value" => "Any other Black, African, Caribbean or Black British background",
},
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 35, 2024 => 34 }.freeze
end

4
app/models/form/lettings/questions/ethnic_group.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::EthnicGroup < ::Form::Question
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
@question_number = 34
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -20,4 +20,6 @@ class Form::Lettings::Questions::EthnicGroup < ::Form::Question
"divider" => { "value" => true },
"17" => { "value" => "Tenant prefers not to say" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 34, 2024 => 33 }.freeze
end

4
app/models/form/lettings/questions/ethnic_mixed.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::EthnicMixed < ::Form::Question
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
@question_number = 35
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -25,4 +25,6 @@ class Form::Lettings::Questions::EthnicMixed < ::Form::Question
"value" => "Any other Mixed or Multiple ethnic background",
},
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 35, 2024 => 34 }.freeze
end

4
app/models/form/lettings/questions/ethnic_white.rb

@ -7,7 +7,7 @@ class Form::Lettings::Questions::EthnicWhite < ::Form::Question
@type = "radio"
@check_answers_card_number = 1
@hint_text = form.start_year_after_2024? ? "" : "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@question_number = 35
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@ -28,4 +28,6 @@ class Form::Lettings::Questions::EthnicWhite < ::Form::Question
}.freeze
end
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 35, 2024 => 34 }.freeze
end

4
app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb

@ -7,7 +7,7 @@ class Form::Lettings::Questions::FirstTimePropertyLetAsSocialHousing < ::Form::Q
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
@question_number = 14
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@ -24,4 +24,6 @@ class Form::Lettings::Questions::FirstTimePropertyLetAsSocialHousing < ::Form::Q
def no_hint
form.start_year_after_2024? ? "This is a re-let of existing social housing stock." : "This is a re-let of existing social housing."
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 14, 2024 => 15 }.freeze
end

4
app/models/form/lettings/questions/gender_identity1.rb

@ -7,7 +7,7 @@ class Form::Lettings::Questions::GenderIdentity1 < ::Form::Question
@type = "radio"
@check_answers_card_number = 1
@answer_options = ANSWER_OPTIONS
@question_number = 33
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -25,4 +25,6 @@ class Form::Lettings::Questions::GenderIdentity1 < ::Form::Question
"The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
end
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 33, 2024 => 32 }.freeze
end

4
app/models/form/lettings/questions/hb.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::Hb < ::Form::Question
@check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "This is about when the tenant is in their new let. If they are unsure about the situation for their new let and their financial and working situation hasn’t changed significantly, answer based on what housing-related benefits they currently receive." : ""
@answer_options = ANSWER_OPTIONS
@question_number = 89
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -19,4 +19,6 @@ class Form::Lettings::Questions::Hb < ::Form::Question
"3" => { "value" => "Don’t know" },
"10" => { "value" => "Tenant prefers not to say" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 89, 2024 => 88 }.freeze
end

4
app/models/form/lettings/questions/hbrentshortfall.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::Hbrentshortfall < ::Form::Question
@check_answers_card_number = 0
@hint_text = "Also known as the ‘outstanding amount’."
@answer_options = ANSWER_OPTIONS
@question_number = 99
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -16,4 +16,6 @@ class Form::Lettings::Questions::Hbrentshortfall < ::Form::Question
"2" => { "value" => "No" },
"3" => { "value" => "Don’t know" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 99, 2024 => 98 }.freeze
end

4
app/models/form/lettings/questions/hhmemb.rb

@ -11,6 +11,8 @@ class Form::Lettings::Questions::Hhmemb < ::Form::Question
@min = 1
@hint_text = "You can provide details for a maximum of 8 people."
@step = 1
@question_number = 31
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 31, 2024 => 30 }.freeze
end

4
app/models/form/lettings/questions/homeless.rb

@ -8,11 +8,13 @@ class Form::Lettings::Questions::Homeless < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 79
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
"11" => { "value" => "Yes - assessed by a local authority as homeless" },
"1" => { "value" => "No" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 79, 2024 => 78 }.freeze
end

4
app/models/form/lettings/questions/household_charge.rb

@ -8,8 +8,10 @@ class Form::Lettings::Questions::HouseholdCharge < ::Form::Question
@check_answers_card_number = 0
@hint_text = "If rent is charged on the property then answer Yes to this question, even if the tenants do not pay it themselves."
@answer_options = ANSWER_OPTIONS
@question_number = 91
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 91, 2024 => 90 }.freeze
end

4
app/models/form/lettings/questions/housingneeds.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::Housingneeds < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 70
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -17,4 +17,6 @@ class Form::Lettings::Questions::Housingneeds < ::Form::Question
"divider" => { "value" => true },
"3" => { "value" => "Don’t know" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 70, 2024 => 69 }.freeze
end

4
app/models/form/lettings/questions/housingneeds_other.rb

@ -7,7 +7,7 @@ class Form::Lettings::Questions::HousingneedsOther < ::Form::Question
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
@question_number = 72
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@ -24,4 +24,6 @@ class Form::Lettings::Questions::HousingneedsOther < ::Form::Question
}.freeze
end
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 72, 2024 => 71 }.freeze
end

4
app/models/form/lettings/questions/housingneeds_type.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::HousingneedsType < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 71
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -18,4 +18,6 @@ class Form::Lettings::Questions::HousingneedsType < ::Form::Question
"divider" => { "value" => true },
"3" => { "value" => "None of the listed options" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 71, 2024 => 70 }.freeze
end

4
app/models/form/lettings/questions/illness.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::Illness < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 73
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -17,4 +17,6 @@ class Form::Lettings::Questions::Illness < ::Form::Question
"divider" => { "value" => true },
"3" => { "value" => "Tenant prefers not to say" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 73, 2024 => 72 }.freeze
end

4
app/models/form/lettings/questions/incfreq.rb

@ -9,7 +9,7 @@ class Form::Lettings::Questions::Incfreq < ::Form::Question
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@hidden_in_check_answers = true
@question_number = 87
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -17,4 +17,6 @@ class Form::Lettings::Questions::Incfreq < ::Form::Question
"2" => { "value" => "Monthly" },
"3" => { "value" => "Yearly" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 87, 2024 => 86 }.freeze
end

4
app/models/form/lettings/questions/irproduct_other.rb

@ -5,6 +5,8 @@ class Form::Lettings::Questions::IrproductOther < ::Form::Question
@check_answer_label = "Product name"
@header = "Name of rent product"
@type = "text"
@question_number = 6
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 6 }.freeze
end

4
app/models/form/lettings/questions/is_carehome.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::IsCarehome < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@conditional_for = { "chcharge" => [1] }
@question_number = 93
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@ -24,4 +24,6 @@ class Form::Lettings::Questions::IsCarehome < ::Form::Question
}.freeze
end
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 93, 2024 => 92 }.freeze
end

4
app/models/form/lettings/questions/joint.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::Joint < ::Form::Question
@check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "This is where two or more people are named on the tenancy agreement" : ""
@answer_options = ANSWER_OPTIONS
@question_number = 25
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -17,4 +17,6 @@ class Form::Lettings::Questions::Joint < ::Form::Question
"divider" => { "value" => "true" },
"3" => { "value" => "Don’t know" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 25 }.freeze
end

4
app/models/form/lettings/questions/la.rb

@ -7,11 +7,13 @@ class Form::Lettings::Questions::La < ::Form::Question
@type = "select"
@check_answers_card_number = nil
@hint_text = ""
@question_number = 13
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
end
def answer_options
{ "" => "Select an option" }.merge(LocalAuthority.active(form.start_date).england.map { |la| [la.code, la.name] }.to_h)
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 13, 2024 => 14 }.freeze
end

4
app/models/form/lettings/questions/layear.rb

@ -7,7 +7,7 @@ class Form::Lettings::Questions::Layear < ::Form::Question
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
@question_number = 75
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@ -38,4 +38,6 @@ class Form::Lettings::Questions::Layear < ::Form::Question
}
end
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 75, 2024 => 74 }.freeze
end

4
app/models/form/lettings/questions/leftreg.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::Leftreg < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 67
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -18,4 +18,6 @@ class Form::Lettings::Questions::Leftreg < ::Form::Question
"divider" => { "value" => true },
"3" => { "value" => "Person prefers not to say" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 67, 2024 => 66 }.freeze
end

4
app/models/form/lettings/questions/letting_allocation.rb

@ -7,7 +7,7 @@ class Form::Lettings::Questions::LettingAllocation < ::Form::Question
@type = "checkbox"
@check_answers_card_number = 0
@hint_text = "Select all that apply."
@question_number = 84
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@ -30,4 +30,6 @@ class Form::Lettings::Questions::LettingAllocation < ::Form::Question
}.freeze
end
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 84, 2024 => 83 }.freeze
end

4
app/models/form/lettings/questions/location_id.rb

@ -11,7 +11,7 @@ class Form::Lettings::Questions::LocationId < ::Form::Question
"needstype": 2,
},
}
@question_number = 10
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
@top_guidance_partial = "finding_location"
end
@ -58,4 +58,6 @@ private
"Which location is this log for?"
end
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 10, 2024 => 5 }.freeze
end

4
app/models/form/lettings/questions/majorrepairs.rb

@ -9,8 +9,10 @@ class Form::Lettings::Questions::Majorrepairs < ::Form::Question
@hint_text = "Major repairs are works that could not be reasonably carried out with a tenant living at the property. For example, structural repairs."
@answer_options = ANSWER_OPTIONS
@conditional_for = { "mrcdate" => [1] }
@question_number = 24
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = { "1" => { "value" => "Yes" }, "0" => { "value" => "No" } }.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 24 }.freeze
end

4
app/models/form/lettings/questions/managing_organisation.rb

@ -5,7 +5,7 @@ class Form::Lettings::Questions::ManagingOrganisation < ::Form::Question
@check_answer_label = "Managing agent"
@header = "Which organisation manages this letting?"
@type = "select"
@question_number = 2
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
end
def answer_options(log = nil, user = nil)
@ -83,4 +83,6 @@ private
def selected_answer_option_is_derived?(_log)
true
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 2 }.freeze
end

4
app/models/form/lettings/questions/mrcdate.rb

@ -6,6 +6,8 @@ class Form::Lettings::Questions::Mrcdate < ::Form::Question
@header = "When were the repairs completed?"
@type = "date"
@check_answers_card_number = 0
@question_number = 24
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 24 }.freeze
end

4
app/models/form/lettings/questions/nationality.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::Nationality < ::Form::Question
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
@question_number = 36
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -21,4 +21,6 @@ class Form::Lettings::Questions::Nationality < ::Form::Question
"divider" => true,
"13" => { "value" => "Tenant prefers not to say" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 36, 2024 => 35 }.freeze
end

4
app/models/form/lettings/questions/nationality_all.rb

@ -7,10 +7,12 @@ class Form::Lettings::Questions::NationalityAll < ::Form::Question
@type = "select"
@check_answers_card_number = 1
@answer_options = GlobalConstants::COUNTRIES_ANSWER_OPTIONS
@question_number = 36
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_label(log, _current_user = nil)
answer_options[log.nationality_all.to_s]["name"]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 36, 2024 => 35 }.freeze
end

4
app/models/form/lettings/questions/nationality_all_group.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::NationalityAllGroup < ::Form::Question
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest. If the lead tenant is a dual national of the United Kingdom and another country, enter United Kingdom. If they are a dual national of two other countries, the tenant should decide which country to enter."
@answer_options = ANSWER_OPTIONS
@question_number = 36
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@conditional_for = { "nationality_all" => [12] }
@hidden_in_check_answers = { "depends_on" => [{ "nationality_all_group" => 12 }] }
end
@ -18,4 +18,6 @@ class Form::Lettings::Questions::NationalityAllGroup < ::Form::Question
"12" => { "value" => "Other" },
"0" => { "value" => "Tenant prefers not to say" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 36, 2024 => 35 }.freeze
end

4
app/models/form/lettings/questions/needs_type.rb

@ -7,11 +7,13 @@ class Form::Lettings::Questions::NeedsType < ::Form::Question
@hint_text = "General needs housing includes both self-contained and shared housing without support or specific adaptations. Supported housing can include direct access hostels, group homes, residential care and nursing homes."
@type = "radio"
@answer_options = ANSWER_OPTIONS
@question_number = 3
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
end
ANSWER_OPTIONS = {
"1" => { "value" => "General needs" },
"2" => { "value" => "Supported housing" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 3 }.freeze
end

4
app/models/form/lettings/questions/net_income_known.rb

@ -9,7 +9,7 @@ class Form::Lettings::Questions::NetIncomeKnown < ::Form::Question
@top_guidance_partial = "what_counts_as_income"
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 86
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -18,4 +18,6 @@ class Form::Lettings::Questions::NetIncomeKnown < ::Form::Question
"divider_a" => { "value" => true },
"2" => { "value" => "Tenant prefers not to say" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 86, 2024 => 85 }.freeze
end

4
app/models/form/lettings/questions/offered.rb

@ -11,6 +11,8 @@ class Form::Lettings::Questions::Offered < ::Form::Question
@min = 0
@hint_text = I18n.t("hints.offered")
@step = 1
@question_number = 18
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 18 }.freeze
end

4
app/models/form/lettings/questions/period.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::Period < ::Form::Question
@check_answers_card_number = 0
@hint_text = "Select how often the household is charged. This may be different to how often they pay."
@answer_options = ANSWER_OPTIONS
@question_number = 92
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -23,4 +23,6 @@ class Form::Lettings::Questions::Period < ::Form::Question
"1" => { "value" => "Weekly for 52 weeks" },
"10" => { "value" => "Weekly for 53 weeks" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 92, 2024 => 91 }.freeze
end

14
app/models/form/lettings/questions/person_gender_identity.rb

@ -7,7 +7,8 @@ class Form::Lettings::Questions::PersonGenderIdentity < ::Form::Question
@type = "radio"
@check_answers_card_number = person_index
@answer_options = ANSWER_OPTIONS
@question_number = 32 + (4 * person_index)
@person_index = person_index
@question_number = question_number
end
ANSWER_OPTIONS = {
@ -25,4 +26,15 @@ class Form::Lettings::Questions::PersonGenderIdentity < ::Form::Question
""
end
end
def question_number
base_question_number = case form.start_date.year
when 2023
32
else
31
end
base_question_number + (4 * @person_index)
end
end

14
app/models/form/lettings/questions/person_relationship.rb

@ -8,7 +8,8 @@ class Form::Lettings::Questions::PersonRelationship < ::Form::Question
@check_answers_card_number = person_index
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 30 + (4 * person_index)
@person_index = person_index
@question_number = question_number
end
ANSWER_OPTIONS = {
@ -21,4 +22,15 @@ class Form::Lettings::Questions::PersonRelationship < ::Form::Question
"divider" => { "value" => true },
"R" => { "value" => "Person prefers not to say" },
}.freeze
def question_number
base_question_number = case form.start_date.year
when 2023
30
else
29
end
base_question_number + (4 * @person_index)
end
end

14
app/models/form/lettings/questions/person_working_situation.rb

@ -8,7 +8,8 @@ class Form::Lettings::Questions::PersonWorkingSituation < ::Form::Question
@check_answers_card_number = person_index
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 33 + (4 * person_index)
@person_index = person_index
@question_number = question_number
end
ANSWER_OPTIONS = {
@ -31,4 +32,15 @@ class Form::Lettings::Questions::PersonWorkingSituation < ::Form::Question
"divider" => { "value" => true },
"10" => { "value" => "Person prefers not to say" },
}.freeze
def question_number
base_question_number = case form.start_date.year
when 2023
33
else
32
end
base_question_number + (4 * @person_index)
end
end

4
app/models/form/lettings/questions/postcode_for_full_address.rb

@ -19,7 +19,9 @@ class Form::Lettings::Questions::PostcodeForFullAddress < ::Form::Question
@plain_label = true
@check_answer_label = "Postcode"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
@question_number = 12
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@hide_question_number_on_page = true
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 12, 2024 => 13 }.freeze
end

4
app/models/form/lettings/questions/ppcodenk.rb

@ -10,7 +10,7 @@ class Form::Lettings::Questions::Ppcodenk < ::Form::Question
@answer_options = ANSWER_OPTIONS
@conditional_for = { "ppostcode_full" => [0] }
@hidden_in_check_answers = { "depends_on" => [{ "ppcodenk" => 0 }, { "ppcodenk" => 1 }] }
@question_number = 80
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
end
@ -18,4 +18,6 @@ class Form::Lettings::Questions::Ppcodenk < ::Form::Question
"0" => { "value" => "Yes" },
"1" => { "value" => "No" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 80, 2024 => 79 }.freeze
end

4
app/models/form/lettings/questions/ppostcode_full.rb

@ -15,7 +15,9 @@ class Form::Lettings::Questions::PpostcodeFull < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@inferred_answers = { "prevloc" => { "is_previous_la_inferred" => true } }
@question_number = 80
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 80, 2024 => 79 }.freeze
end

4
app/models/form/lettings/questions/preg_occ.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::PregOcc < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 69
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -17,4 +17,6 @@ class Form::Lettings::Questions::PregOcc < ::Form::Question
"divider" => { "value" => true },
"3" => { "value" => "Tenant prefers not to say" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 69, 2024 => 68 }.freeze
end

4
app/models/form/lettings/questions/previous_la_known.rb

@ -10,9 +10,11 @@ class Form::Lettings::Questions::PreviousLaKnown < ::Form::Question
@answer_options = ANSWER_OPTIONS
@conditional_for = { "prevloc" => [1] }
@hidden_in_check_answers = { "depends_on" => [{ "previous_la_known" => 0 }, { "previous_la_known" => 1 }] }
@question_number = 81
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
end
ANSWER_OPTIONS = { "1" => { "value" => "Yes" }, "0" => { "value" => "No" } }.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 81, 2024 => 80 }.freeze
end

4
app/models/form/lettings/questions/previous_let_type.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::PreviousLetType < ::Form::Question
@check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "This is the rent type of the previous tenancy in this property." : ""
@answer_options = form.start_year_after_2024? ? ANSWER_OPTIONS_AFTER_2024 : ANSWER_OPTIONS
@question_number = 16
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -32,4 +32,6 @@ class Form::Lettings::Questions::PreviousLetType < ::Form::Question
"divider" => { "value" => true },
"3" => { "value" => "Don’t know" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 16, 2024 => 17 }.freeze
end

4
app/models/form/lettings/questions/previous_tenure.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::PreviousTenure < ::Form::Question
@check_answers_card_number = 0
@hint_text = "This is where the household was the night before they moved."
@answer_options = ANSWER_OPTIONS
@question_number = 78
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -39,4 +39,6 @@ class Form::Lettings::Questions::PreviousTenure < ::Form::Question
"4" => { "value" => "Tied housing or rented with job" },
"25" => { "value" => "Any other accommodation" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 78, 2024 => 77 }.freeze
end

4
app/models/form/lettings/questions/previous_tenure_renewal.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::PreviousTenureRenewal < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 78
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -17,4 +17,6 @@ class Form::Lettings::Questions::PreviousTenureRenewal < ::Form::Question
"35" => { "value" => "Extra care housing" },
"6" => { "value" => "Other supported housing" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 78, 2024 => 77 }.freeze
end

4
app/models/form/lettings/questions/prevloc.rb

@ -8,11 +8,13 @@ class Form::Lettings::Questions::Prevloc < ::Form::Question
@inferred_check_answers_value = [{ "condition" => { "previous_la_known" => 0 }, "value" => "Not known" }]
@check_answers_card_number = 0
@hint_text = "Select ‘Northern Ireland’, ‘Scotland’, ‘Wales’ or ‘Outside the UK’ if the household’s last settled home was outside England."
@question_number = 81
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
end
def answer_options
{ "" => "Select an option" }.merge(LocalAuthority.active(form.start_date).map { |la| [la.code, la.name] }.to_h)
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 81, 2024 => 80 }.freeze
end

4
app/models/form/lettings/questions/property_reference.rb

@ -7,6 +7,8 @@ class Form::Lettings::Questions::PropertyReference < ::Form::Question
@hint_text = "This is how you usually refer to this property on your own systems."
@type = "text"
@width = 10
@question_number = 8
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 8, 2024 => 10 }.freeze
end

4
app/models/form/lettings/questions/pscharge_4_weekly.rb

@ -14,6 +14,8 @@ class Form::Lettings::Questions::Pscharge4Weekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every 4 weeks"
@question_number = 97
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 97, 2024 => 96 }.freeze
end

4
app/models/form/lettings/questions/pscharge_bi_weekly.rb

@ -14,6 +14,8 @@ class Form::Lettings::Questions::PschargeBiWeekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every 2 weeks"
@question_number = 97
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 97, 2024 => 96 }.freeze
end

4
app/models/form/lettings/questions/pscharge_monthly.rb

@ -14,6 +14,8 @@ class Form::Lettings::Questions::PschargeMonthly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every month"
@question_number = 97
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 97, 2024 => 96 }.freeze
end

4
app/models/form/lettings/questions/pscharge_weekly.rb

@ -14,6 +14,8 @@ class Form::Lettings::Questions::PschargeWeekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every week"
@question_number = 97
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 97, 2024 => 96 }.freeze
end

4
app/models/form/lettings/questions/reason.rb

@ -12,7 +12,7 @@ class Form::Lettings::Questions::Reason < ::Form::Question
20,
],
}
@question_number = 77
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@ -92,4 +92,6 @@ class Form::Lettings::Questions::Reason < ::Form::Question
}.freeze
end
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 77, 2024 => 76 }.freeze
end

4
app/models/form/lettings/questions/reason_renewal.rb

@ -7,7 +7,7 @@ class Form::Lettings::Questions::ReasonRenewal < ::Form::Question
@type = "radio"
@check_answers_card_number = 0
@hint_text = "You told us this letting is a renewal. We have removed some options because of this."
@question_number = 77
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@conditional_for = {
"reasonother" => [
20,
@ -38,4 +38,6 @@ class Form::Lettings::Questions::ReasonRenewal < ::Form::Question
}.freeze
end
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 77, 2024 => 76 }.freeze
end

4
app/models/form/lettings/questions/reasonable_preference_reason.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::ReasonablePreferenceReason < ::Form::Question
@check_answers_card_number = 0
@hint_text = "Select all that apply."
@answer_options = ANSWER_OPTIONS
@question_number = 83
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -19,4 +19,6 @@ class Form::Lettings::Questions::ReasonablePreferenceReason < ::Form::Question
"divider" => { "value" => true },
"rp_dontknow" => { "value" => "Don’t know" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 83, 2024 => 82 }.freeze
end

4
app/models/form/lettings/questions/reasonother.rb

@ -7,6 +7,8 @@ class Form::Lettings::Questions::Reasonother < ::Form::Question
@type = "text"
@check_answers_card_number = 0
@hint_text = ""
@question_number = 77
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 77, 2024 => 76 }.freeze
end

4
app/models/form/lettings/questions/reasonpref.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::Reasonpref < ::Form::Question
@check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "Households may be given ‘reasonable preference’ for social housing under one or more specific categories by the local authority. This is also known as ‘priority need’." : "Households may be given ‘reasonable preference’ for social housing, also known as ‘priority need’, by the local authority."
@answer_options = ANSWER_OPTIONS
@question_number = 82
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -17,4 +17,6 @@ class Form::Lettings::Questions::Reasonpref < ::Form::Question
"divider" => { "value" => true },
"3" => { "value" => "Don’t know" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 82, 2024 => 81 }.freeze
end

4
app/models/form/lettings/questions/referral.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::Referral < ::Form::Question
@check_answers_card_number = 0
@hint_text = "You told us that you are a local authority and that the needs type is general needs. We have removed some options because of this."
@answer_options = ANSWER_OPTIONS
@question_number = 85
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -50,4 +50,6 @@ class Form::Lettings::Questions::Referral < ::Form::Question
"value" => "Other",
},
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84 }.freeze
end

4
app/models/form/lettings/questions/referral_prp.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::ReferralPrp < ::Form::Question
@check_answers_card_number = 0
@hint_text = "You told us that the needs type is general needs. We have removed some options because of this."
@answer_options = ANSWER_OPTIONS
@question_number = 85
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -56,4 +56,6 @@ class Form::Lettings::Questions::ReferralPrp < ::Form::Question
"value" => "Other",
},
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84 }.freeze
end

4
app/models/form/lettings/questions/referral_supported_housing.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::ReferralSupportedHousing < ::Form::Question
@check_answers_card_number = 0
@hint_text = "You told us that you are a local authority. We have removed some options because of this."
@answer_options = ANSWER_OPTIONS
@question_number = 85
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -53,4 +53,6 @@ class Form::Lettings::Questions::ReferralSupportedHousing < ::Form::Question
"value" => "Other",
},
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84 }.freeze
end

4
app/models/form/lettings/questions/referral_supported_housing_prp.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::ReferralSupportedHousingPrp < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 85
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -27,4 +27,6 @@ class Form::Lettings::Questions::ReferralSupportedHousingPrp < ::Form::Question
"17" => { "value" => "Children’s Social Care" },
"16" => { "value" => "Other" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84 }.freeze
end

4
app/models/form/lettings/questions/renewal.rb

@ -7,7 +7,7 @@ class Form::Lettings::Questions::Renewal < ::Form::Question
@type = "radio"
@answer_options = ANSWER_OPTIONS
@hint_text = hint_text
@question_number = 4
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
end
ANSWER_OPTIONS = {
@ -31,4 +31,6 @@ class Form::Lettings::Questions::Renewal < ::Form::Question
"A renewal is a letting to the same tenant in the same property. If the property was previously being used as temporary accommodation, then answer 'no'"
end
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 4, 2024 => 6 }.freeze
end

4
app/models/form/lettings/questions/rent_type.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::RentType < ::Form::Question
@top_guidance_partial = "rent_type_definitions"
@answer_options = ANSWER_OPTIONS
@conditional_for = { "irproduct_other" => [5] }
@question_number = 6
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
end
ANSWER_OPTIONS = {
@ -19,4 +19,6 @@ class Form::Lettings::Questions::RentType < ::Form::Question
"0" => { "value" => "Social Rent" },
"5" => { "value" => "Other intermediate rent product" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 6, 2024 => 8 }.freeze
end

4
app/models/form/lettings/questions/reservist.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::Reservist < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 68
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -17,4 +17,6 @@ class Form::Lettings::Questions::Reservist < ::Form::Question
"divider" => { "value" => true },
"3" => { "value" => "Person prefers not to say" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 68, 2024 => 67 }.freeze
end

4
app/models/form/lettings/questions/rsnvac.rb

@ -7,7 +7,7 @@ class Form::Lettings::Questions::Rsnvac < ::Form::Question
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
@question_number = 17
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@ -101,4 +101,6 @@ class Form::Lettings::Questions::Rsnvac < ::Form::Question
}
end
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 17, 2024 => 18 }.freeze
end

4
app/models/form/lettings/questions/rsnvac_first_let.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::RsnvacFirstLet < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 15
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@ -16,4 +16,6 @@ class Form::Lettings::Questions::RsnvacFirstLet < ::Form::Question
"17" => { "value" => "First let of leased property" },
"15" => { "value" => "First let of new-build property" },
}.freeze
QUESTION_NUMBER_FROM_YEAR = { 2023 => 15, 2024 => 16 }.freeze
end

4
app/models/form/lettings/questions/scharge_4_weekly.rb

@ -14,6 +14,8 @@ class Form::Lettings::Questions::Scharge4Weekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every 4 weeks"
@question_number = 96
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 96, 2024 => 95 }.freeze
end

4
app/models/form/lettings/questions/scharge_bi_weekly.rb

@ -14,6 +14,8 @@ class Form::Lettings::Questions::SchargeBiWeekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every 2 weeks"
@question_number = 96
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 96, 2024 => 95 }.freeze
end

4
app/models/form/lettings/questions/scharge_monthly.rb

@ -14,6 +14,8 @@ class Form::Lettings::Questions::SchargeMonthly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every month"
@question_number = 96
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 96, 2024 => 95 }.freeze
end

4
app/models/form/lettings/questions/scharge_weekly.rb

@ -14,6 +14,8 @@ class Form::Lettings::Questions::SchargeWeekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every week"
@question_number = 96
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 96, 2024 => 95 }.freeze
end

4
app/models/form/lettings/questions/scheme_id.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::SchemeId < ::Form::Question
@answer_options = answer_options
@top_guidance_partial = "finding_scheme"
@bottom_guidance_partial = "scheme_selection"
@question_number = 9
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
@inferred_answers = {
"location.name": {
"scheme_has_multiple_locations?": false,
@ -58,4 +58,6 @@ private
def selected_answer_option_is_derived?(_lettings_log)
false
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 9, 2024 => 4 }.freeze
end

4
app/models/form/lettings/questions/sheltered.rb

@ -7,7 +7,7 @@ class Form::Lettings::Questions::Sheltered < ::Form::Question
@type = "radio"
@check_answers_card_number = 0
@hint_text = "Sheltered housing and special retirement housing are for tenants with low-level care and support needs. This typically provides some limited support to enable independent living, such as alarm-based assistance or a scheme manager.</br></br>Extra care housing is for tenants with medium to high care and support needs, often with 24 hour access to support staff provided by an agency registered with the Care Quality Commission."
@question_number = 29
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@ -28,4 +28,6 @@ class Form::Lettings::Questions::Sheltered < ::Form::Question
"4" => { "value" => "Don’t know" } }
end
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 29 }.freeze
end

4
app/models/form/lettings/questions/starter_tenancy_type.rb

@ -8,7 +8,7 @@ class Form::Lettings::Questions::StarterTenancyType < ::Form::Question
@check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "" : "This is also known as an ‘introductory period’."
@conditional_for = { "tenancyother" => [3] }
@question_number = 27
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@ -66,4 +66,6 @@ class Form::Lettings::Questions::StarterTenancyType < ::Form::Question
}.freeze
end
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 27 }.freeze
end

4
app/models/form/lettings/questions/startertenancy.rb

@ -7,7 +7,7 @@ class Form::Lettings::Questions::Startertenancy < ::Form::Question
@type = "radio"
@check_answers_card_number = 0
@answer_options = ANSWER_OPTIONS
@question_number = 26
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = { "1" => { "value" => "Yes" }, "2" => { "value" => "No" } }.freeze
@ -20,4 +20,6 @@ class Form::Lettings::Questions::Startertenancy < ::Form::Question
"This is also known as an ‘introductory period’."
end
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 26 }.freeze
end

4
app/models/form/lettings/questions/stock_owner.rb

@ -5,7 +5,7 @@ class Form::Lettings::Questions::StockOwner < ::Form::Question
@check_answer_label = "Stock owner"
@header = "Which organisation owns this property?"
@type = "select"
@question_number = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
end
def answer_options(log = nil, user = nil)
@ -89,4 +89,6 @@ private
def merged_organisation_label(name, merge_date)
"#{name} (inactive as of #{merge_date.to_fs(:govuk_date)})"
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 1 }.freeze
end

4
app/models/form/lettings/questions/supcharg_4_weekly.rb

@ -14,6 +14,8 @@ class Form::Lettings::Questions::Supcharg4Weekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every 4 weeks"
@question_number = 98
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 98, 2024 => 97 }.freeze
end

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save