Browse Source

CLDC-4402: lettings questions

CLDC-4402-audit-start-year-2024-or-later-usage
samyou-softwire 1 week ago
parent
commit
81e1b1da06
  1. 2
      app/models/form/lettings/questions/age.rb
  2. 15
      app/models/form/lettings/questions/declaration.rb
  3. 9
      app/models/form/lettings/questions/ethnic_white.rb
  4. 4
      app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb
  5. 7
      app/models/form/lettings/questions/housingneeds_other.rb
  6. 7
      app/models/form/lettings/questions/is_carehome.rb
  7. 14
      app/models/form/lettings/questions/layear.rb
  8. 10
      app/models/form/lettings/questions/letting_allocation.rb
  9. 13
      app/models/form/lettings/questions/person_relationship.rb
  10. 12
      app/models/form/lettings/questions/previous_let_type.rb
  11. 11
      app/models/form/lettings/questions/reason_renewal.rb
  12. 42
      app/models/form/lettings/questions/referral_general_needs.rb
  13. 48
      app/models/form/lettings/questions/referral_general_needs_prp.rb
  14. 42
      app/models/form/lettings/questions/referral_supported_housing.rb
  15. 48
      app/models/form/lettings/questions/referral_supported_housing_prp.rb
  16. 43
      app/models/form/lettings/questions/rsnvac.rb
  17. 26
      app/models/form/lettings/questions/starter_tenancy_type.rb
  18. 26
      app/models/form/lettings/questions/tenancy_type.rb
  19. 7
      app/models/form/lettings/questions/uprn_confirmation.rb
  20. 15
      app/models/form/lettings/questions/waityear.rb
  21. 5
      app/models/form/sales/questions/mortgage_lender.rb
  22. 4
      config/locales/en.yml

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

@ -33,8 +33,6 @@ class Form::Lettings::Questions::Age < ::Form::Question
end end
def hint_text def hint_text
if form.start_year_2024_or_later?
"Answer 1 for children aged under 1 year old" "Answer 1 for children aged under 1 year old"
end end
end
end end

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

@ -3,27 +3,16 @@ class Form::Lettings::Questions::Declaration < ::Form::Question
super super
@id = "declaration" @id = "declaration"
@type = "checkbox" @type = "checkbox"
@check_answers_card_number = 0 unless form.start_year_2024_or_later?
@top_guidance_partial = "privacy_notice_tenant" @top_guidance_partial = "privacy_notice_tenant"
@question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR) @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
def answer_options def answer_options
declaration_text = if form.start_year_2024_or_later? { "declaration" => { "value" => "The tenant has seen or been given access to the MHCLG privacy notice" } }.freeze
"The tenant has seen or been given access to the MHCLG privacy notice"
else
"The tenant has seen the MHCLG privacy notice"
end
{ "declaration" => { "value" => declaration_text } }.freeze
end end
def unanswered_error_message def unanswered_error_message
if form.start_year_2024_or_later? I18n.t("validations.declaration.missing")
I18n.t("validations.declaration.missing.post_2024")
else
I18n.t("validations.declaration.missing.pre_2024")
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 30, 2024 => 11, 2025 => 11, 2026 => 11 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 30, 2024 => 11, 2025 => 11, 2026 => 11 }.freeze

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

@ -9,7 +9,6 @@ class Form::Lettings::Questions::EthnicWhite < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later?
{ {
"1" => { "value" => "English, Welsh, Northern Irish, Scottish or British" }, "1" => { "value" => "English, Welsh, Northern Irish, Scottish or British" },
"2" => { "value" => "Irish" }, "2" => { "value" => "Irish" },
@ -17,14 +16,6 @@ class Form::Lettings::Questions::EthnicWhite < ::Form::Question
"20" => { "value" => "Roma" }, "20" => { "value" => "Roma" },
"3" => { "value" => "Any other White background" }, "3" => { "value" => "Any other White background" },
}.freeze }.freeze
else
{
"1" => { "value" => "English, Welsh, Northern Irish, Scottish or British" },
"2" => { "value" => "Irish" },
"18" => { "value" => "Gypsy or Irish Traveller" },
"3" => { "value" => "Any other White background" },
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 35, 2024 => 34, 2025 => 34, 2026 => 34 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 35, 2024 => 34, 2025 => 34, 2026 => 34 }.freeze

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

@ -14,11 +14,11 @@ class Form::Lettings::Questions::FirstTimePropertyLetAsSocialHousing < ::Form::Q
end end
def yes_hint def yes_hint
form.start_year_2024_or_later? ? "This property was previously used for other purposes or is a new-build." : "This is a new let." "This property was previously used for other purposes or is a new-build."
end end
def no_hint def no_hint
form.start_year_2024_or_later? ? "This is a re-let of existing social housing stock." : "This is a re-let of existing social housing." "This is a re-let of existing social housing stock."
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 14, 2024 => 15, 2025 => 12, 2026 => 12 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 14, 2024 => 15, 2025 => 12, 2026 => 12 }.freeze

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

@ -9,19 +9,12 @@ class Form::Lettings::Questions::HousingneedsOther < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later?
{ {
"1" => { "value" => "Yes" }, "1" => { "value" => "Yes" },
"0" => { "value" => "No" }, "0" => { "value" => "No" },
"divider" => { "value" => true }, "divider" => { "value" => true },
"2" => { "value" => "Don’t know" }, "2" => { "value" => "Don’t know" },
}.freeze }.freeze
else
{
"1" => { "value" => "Yes" },
"0" => { "value" => "No" },
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 72, 2024 => 71, 2025 => 71, 2026 => 78 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 72, 2024 => 71, 2025 => 71, 2026 => 78 }.freeze

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

@ -10,17 +10,10 @@ class Form::Lettings::Questions::IsCarehome < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later?
{ {
"1" => { "value" => "Yes" }, "1" => { "value" => "Yes" },
"0" => { "value" => "No" }, "0" => { "value" => "No" },
}.freeze }.freeze
else
{
"0" => { "value" => "No" },
"1" => { "value" => "Yes" },
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 93, 2024 => 92, 2025 => 92, 2026 => 100 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 93, 2024 => 92, 2025 => 92, 2026 => 100 }.freeze

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

@ -21,7 +21,7 @@ class Form::Lettings::Questions::Layear < ::Form::Question
"divider" => { "value" => true }, "divider" => { "value" => true },
"6" => { "value" => "Don’t know" }, "6" => { "value" => "Don’t know" },
} }
elsif form.start_year_2024_or_later? else
{ {
"1" => { "value" => "Just moved to local authority area with this new let" }, "1" => { "value" => "Just moved to local authority area with this new let" },
"2" => { "value" => "Less than 1 year" }, "2" => { "value" => "Less than 1 year" },
@ -34,18 +34,6 @@ class Form::Lettings::Questions::Layear < ::Form::Question
"divider" => { "value" => true }, "divider" => { "value" => true },
"6" => { "value" => "Don’t know" }, "6" => { "value" => "Don’t know" },
} }
else
{
"1" => { "value" => "Just moved to local authority area" },
"2" => { "value" => "Less than 1 year" },
"7" => { "value" => "1 year but under 2 years" },
"8" => { "value" => "2 years but under 3 years" },
"9" => { "value" => "3 years but under 4 years" },
"10" => { "value" => "4 years but under 5 years" },
"5" => { "value" => "5 years or more" },
"divider" => { "value" => true },
"6" => { "value" => "Don’t know" },
}
end end
end end

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

@ -8,7 +8,6 @@ class Form::Lettings::Questions::LettingAllocation < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later?
{ {
"cbl" => { "value" => "Choice-based lettings (CBL)", "hint" => "Where available vacant properties are advertised and applicants are able to bid for specific properties." }, "cbl" => { "value" => "Choice-based lettings (CBL)", "hint" => "Where available vacant properties are advertised and applicants are able to bid for specific properties." },
"cap" => { "value" => "Common Allocation Policy (CAP)", "hint" => "Where a common system agreed between a group of housing providers is used to determine applicant’s priority for housing." }, "cap" => { "value" => "Common Allocation Policy (CAP)", "hint" => "Where a common system agreed between a group of housing providers is used to determine applicant’s priority for housing." },
@ -17,15 +16,6 @@ class Form::Lettings::Questions::LettingAllocation < ::Form::Question
"divider" => { "value" => true }, "divider" => { "value" => true },
"letting_allocation_unknown" => { "value" => "None of these allocation systems" }, "letting_allocation_unknown" => { "value" => "None of these allocation systems" },
}.freeze }.freeze
else
{
"cbl" => { "value" => "Choice-based lettings (CBL)" },
"cap" => { "value" => "Common Allocation Policy (CAP)" },
"chr" => { "value" => "Common housing register (CHR)" },
"divider" => { "value" => true },
"letting_allocation_unknown" => { "value" => "None of these allocation systems" },
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 84, 2024 => 83, 2025 => 83, 2026 => 90 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 84, 2024 => 83, 2025 => 83, 2026 => 90 }.freeze

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

@ -10,7 +10,6 @@ class Form::Lettings::Questions::PersonRelationship < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later?
{ {
"P" => { "value" => "Partner" }, "P" => { "value" => "Partner" },
"C" => { "value" => "Child" }, "C" => { "value" => "Child" },
@ -18,18 +17,6 @@ class Form::Lettings::Questions::PersonRelationship < ::Form::Question
"divider" => { "value" => true }, "divider" => { "value" => true },
"R" => { "value" => "Person prefers not to say" }, "R" => { "value" => "Person prefers not to say" },
} }
else
{
"P" => { "value" => "Partner" },
"C" => {
"value" => "Child",
"hint" => "Must be eligible for child benefit: under age 16 or under 20 if still in full-time education.",
},
"X" => { "value" => "Other" },
"divider" => { "value" => true },
"R" => { "value" => "Person prefers not to say" },
}
end
end end
def question_number def question_number

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

@ -8,17 +8,6 @@ class Form::Lettings::Questions::PreviousLetType < ::Form::Question
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {
"1" => { "value" => "Social rent basis" },
"2" => { "value" => "Affordable rent basis" },
"5" => { "value" => "A London Affordable Rent basis" },
"6" => { "value" => "A Rent to Buy basis" },
"7" => { "value" => "A London Living Rent basis" },
"8" => { "value" => "Another Intermediate Rent basis" },
"divider" => { "value" => true },
"3" => { "value" => "Don’t know" },
}.freeze
ANSWER_OPTIONS_AFTER_2024 = {
"1" => { "value" => "Social rent basis" }, "1" => { "value" => "Social rent basis" },
"2" => { "value" => "Affordable rent basis" }, "2" => { "value" => "Affordable rent basis" },
"5" => { "value" => "London Affordable Rent basis" }, "5" => { "value" => "London Affordable Rent basis" },
@ -45,7 +34,6 @@ class Form::Lettings::Questions::PreviousLetType < ::Form::Question
def answer_options def answer_options
return ANSWER_OPTIONS_AFTER_2025 if form.start_year_2025_or_later? return ANSWER_OPTIONS_AFTER_2025 if form.start_year_2025_or_later?
return ANSWER_OPTIONS_AFTER_2024 if form.start_year_2024_or_later?
ANSWER_OPTIONS ANSWER_OPTIONS
end end

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

@ -14,7 +14,6 @@ class Form::Lettings::Questions::ReasonRenewal < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later?
{ {
"50" => { "value" => "End of social or private sector tenancy - no fault" }, "50" => { "value" => "End of social or private sector tenancy - no fault" },
"51" => { "value" => "End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)" }, "51" => { "value" => "End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)" },
@ -25,16 +24,6 @@ class Form::Lettings::Questions::ReasonRenewal < ::Form::Question
"divider" => { "value" => true }, "divider" => { "value" => true },
"28" => { "value" => "Don’t know" }, "28" => { "value" => "Don’t know" },
}.freeze }.freeze
else
{
"40" => { "value" => "End of assured shorthold tenancy (no fault)" },
"42" => { "value" => "End of fixed term tenancy (no fault)" },
"20" => { "value" => "Other" },
"47" => { "value" => "Tenant prefers not to say" },
"divider" => { "value" => true },
"28" => { "value" => "Don’t know" },
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 77, 2024 => 76, 2025 => 76, 2026 => 83 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 77, 2024 => 76, 2025 => 76, 2026 => 83 }.freeze

42
app/models/form/lettings/questions/referral_general_needs.rb

@ -10,7 +10,6 @@ class Form::Lettings::Questions::ReferralGeneralNeeds < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later?
{ {
"1" => { "1" => {
"value" => "Internal transfer", "value" => "Internal transfer",
@ -50,47 +49,6 @@ class Form::Lettings::Questions::ReferralGeneralNeeds < ::Form::Question
"value" => "Other", "value" => "Other",
}, },
}.freeze }.freeze
else
{
"1" => {
"value" => "Internal transfer",
"hint" => "Where the tenant has moved to another social property owned by the same landlord.",
},
"2" => {
"value" => "Tenant applied directly (no referral or nomination)",
},
"8" => {
"value" => "Re-located through official housing mobility scheme",
},
"10" => {
"value" => "Other social landlord",
},
"9" => {
"value" => "Community learning disability team",
},
"14" => {
"value" => "Community mental health team",
},
"15" => {
"value" => "Health service",
},
"12" => {
"value" => "Police, probation or prison",
},
"7" => {
"value" => "Voluntary agency",
},
"13" => {
"value" => "Youth offending team",
},
"17" => {
"value" => "Children’s Social Care",
},
"16" => {
"value" => "Other",
},
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze

48
app/models/form/lettings/questions/referral_general_needs_prp.rb

@ -10,7 +10,6 @@ class Form::Lettings::Questions::ReferralGeneralNeedsPrp < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later?
{ {
"1" => { "1" => {
"value" => "Internal transfer", "value" => "Internal transfer",
@ -53,53 +52,6 @@ class Form::Lettings::Questions::ReferralGeneralNeedsPrp < ::Form::Question
"value" => "Other", "value" => "Other",
}, },
}.freeze }.freeze
else
{
"1" => {
"value" => "Internal transfer",
"hint" => "Where the tenant has moved to another social property owned by the same landlord.",
},
"2" => {
"value" => "Tenant applied directly (no referral or nomination)",
},
"3" => {
"value" => "Nominated by a local housing authority",
},
"4" => {
"value" => "Referred by local authority housing department",
},
"8" => {
"value" => "Re-located through official housing mobility scheme",
},
"10" => {
"value" => "Other social landlord",
},
"9" => {
"value" => "Community learning disability team",
},
"14" => {
"value" => "Community mental health team",
},
"15" => {
"value" => "Health service",
},
"12" => {
"value" => "Police, probation or prison",
},
"7" => {
"value" => "Voluntary agency",
},
"13" => {
"value" => "Youth offending team",
},
"17" => {
"value" => "Children’s Social Care",
},
"16" => {
"value" => "Other",
},
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze

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

@ -10,7 +10,6 @@ class Form::Lettings::Questions::ReferralSupportedHousing < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later?
{ {
"1" => { "1" => {
"value" => "Internal transfer", "value" => "Internal transfer",
@ -50,47 +49,6 @@ class Form::Lettings::Questions::ReferralSupportedHousing < ::Form::Question
"value" => "Other", "value" => "Other",
}, },
}.freeze }.freeze
else
{
"1" => {
"value" => "Internal transfer",
"hint" => "Where the tenant has moved to another social property owned by the same landlord.",
},
"2" => {
"value" => "Tenant applied directly (no referral or nomination)",
},
"8" => {
"value" => "Re-located through official housing mobility scheme",
},
"10" => {
"value" => "Other social landlord",
},
"9" => {
"value" => "Community learning disability team",
},
"14" => {
"value" => "Community mental health team",
},
"15" => {
"value" => "Health service",
},
"12" => {
"value" => "Police, probation or prison",
},
"7" => {
"value" => "Voluntary agency",
},
"13" => {
"value" => "Youth offending team",
},
"17" => {
"value" => "Children’s Social Care",
},
"16" => {
"value" => "Other",
},
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze

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

@ -10,7 +10,6 @@ class Form::Lettings::Questions::ReferralSupportedHousingPrp < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later?
{ {
"1" => { "1" => {
"value" => "Internal transfer", "value" => "Internal transfer",
@ -56,53 +55,6 @@ class Form::Lettings::Questions::ReferralSupportedHousingPrp < ::Form::Question
"value" => "Other", "value" => "Other",
}, },
}.freeze }.freeze
else
{
"1" => {
"value" => "Internal transfer",
"hint" => "Where the tenant has moved to another social property owned by the same landlord.",
},
"2" => {
"value" => "Tenant applied directly (no referral or nomination)",
},
"3" => {
"value" => "Nominated by a local housing authority",
},
"4" => {
"value" => "Referred by local authority housing department",
},
"8" => {
"value" => "Re-located through official housing mobility scheme",
},
"10" => {
"value" => "Other social landlord",
},
"9" => {
"value" => "Community learning disability team",
},
"14" => {
"value" => "Community mental health team",
},
"15" => {
"value" => "Health service",
},
"12" => {
"value" => "Police, probation or prison",
},
"7" => {
"value" => "Voluntary agency",
},
"13" => {
"value" => "Youth offending team",
},
"17" => {
"value" => "Children’s Social Care",
},
"16" => {
"value" => "Other",
},
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze

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

@ -7,7 +7,6 @@ class Form::Lettings::Questions::Rsnvac < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later?
{ {
"14" => { "14" => {
"value" => "Renewal of fixed-term tenancy", "value" => "Renewal of fixed-term tenancy",
@ -54,48 +53,6 @@ class Form::Lettings::Questions::Rsnvac < ::Form::Question
"value" => "Any other reason", "value" => "Any other reason",
}, },
} }
else
{
"13" => {
"value" => "Internal transfer",
"hint" => "Where a tenant moved from one social housing property to another property. Their landlord may be the same or may have changed.",
},
"5" => {
"value" => "Previous tenant died with no succession",
},
"9" => {
"value" => "Re-let to tenant who occupied same property as temporary accommodation",
},
"14" => {
"value" => "Renewal of fixed-term tenancy",
"hint" => "To the same tenant in the same property, except if was previously used as temporary accommodation.",
},
"19" => {
"value" => "Tenant involved in a succession downsize",
},
"8" => {
"value" => "Tenant moved to private sector or other accommodation",
},
"12" => {
"value" => "Tenant moved to other social housing provider",
},
"18" => {
"value" => "Tenant moved to care home",
},
"20" => {
"value" => "Tenant moved to long-stay hospital or similar institution",
},
"6" => {
"value" => "Tenant abandoned property",
},
"10" => {
"value" => "Tenant was evicted due to rent arrears",
},
"11" => {
"value" => "Tenant was evicted due to anti-social behaviour",
},
}
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 17, 2024 => 18, 2025 => 15, 2026 => 15 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 17, 2024 => 18, 2025 => 15, 2026 => 15 }.freeze

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

@ -10,7 +10,6 @@ class Form::Lettings::Questions::StarterTenancyType < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later?
{ {
"4" => { "4" => {
"value" => "Assured Shorthold Tenancy (AST) – Fixed term", "value" => "Assured Shorthold Tenancy (AST) – Fixed term",
@ -38,31 +37,6 @@ class Form::Lettings::Questions::StarterTenancyType < ::Form::Question
"value" => "Other", "value" => "Other",
}, },
}.freeze }.freeze
else
{
"4" => {
"value" => "Assured Shorthold Tenancy (AST) – Fixed term",
"hint" => "Mostly housing associations provide these. Fixed term tenancies are intended to be for a set amount of time up to 20 years.",
},
"6" => {
"value" => "Secure – fixed term",
"hint" => "Mostly local authorities provide these. Fixed term tenancies are intended to be for a set amount of time up to 20 years.",
},
"2" => {
"value" => "Assured – lifetime",
},
"7" => {
"value" => "Secure – lifetime",
},
"5" => {
"value" => "Licence agreement",
"hint" => "Licence agreements are mostly used for Supported Housing and work on a rolling basis.",
},
"3" => {
"value" => "Other",
},
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 27, 2024 => 27, 2025 => 28, 2026 => 27 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 27, 2024 => 27, 2025 => 28, 2026 => 27 }.freeze

26
app/models/form/lettings/questions/tenancy_type.rb

@ -10,7 +10,6 @@ class Form::Lettings::Questions::TenancyType < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later?
{ {
"4" => { "4" => {
"value" => "Assured Shorthold Tenancy (AST) – Fixed term", "value" => "Assured Shorthold Tenancy (AST) – Fixed term",
@ -38,31 +37,6 @@ class Form::Lettings::Questions::TenancyType < ::Form::Question
"value" => "Other", "value" => "Other",
}, },
}.freeze }.freeze
else
{
"4" => {
"value" => "Assured Shorthold Tenancy (AST) – Fixed term",
"hint" => "Mostly housing associations provide these. Fixed term tenancies are intended to be for a set amount of time up to 20 years.",
},
"6" => {
"value" => "Secure – fixed term",
"hint" => "Mostly local authorities provide these. Fixed term tenancies are intended to be for a set amount of time up to 20 years.",
},
"2" => {
"value" => "Assured – lifetime",
},
"7" => {
"value" => "Secure – lifetime",
},
"5" => {
"value" => "Licence agreement",
"hint" => "Licence agreements are mostly used for Supported Housing and work on a rolling basis.",
},
"3" => {
"value" => "Other",
},
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 27, 2024 => 27, 2025 => 28, 2026 => 27 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 27, 2024 => 27, 2025 => 28, 2026 => 27 }.freeze

7
app/models/form/lettings/questions/uprn_confirmation.rb

@ -8,17 +8,10 @@ class Form::Lettings::Questions::UprnConfirmation < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later?
{ {
"1" => { "value" => "Yes" }, "1" => { "value" => "Yes" },
"0" => { "value" => "No, I want to search for the address instead" }, "0" => { "value" => "No, I want to search for the address instead" },
}.freeze }.freeze
else
{
"1" => { "value" => "Yes" },
"0" => { "value" => "No, I want to enter the address manually" },
}.freeze
end
end end
def notification_banner(log = nil) def notification_banner(log = nil)

15
app/models/form/lettings/questions/waityear.rb

@ -23,8 +23,7 @@ class Form::Lettings::Questions::Waityear < ::Form::Question
}.freeze }.freeze
end end
if form.start_year_2024_or_later? {
return {
"2" => { "value" => "Less than 1 year" }, "2" => { "value" => "Less than 1 year" },
"7" => { "value" => "1 year but under 2 years" }, "7" => { "value" => "1 year but under 2 years" },
"8" => { "value" => "2 years but under 3 years" }, "8" => { "value" => "2 years but under 3 years" },
@ -37,17 +36,5 @@ class Form::Lettings::Questions::Waityear < ::Form::Question
}.freeze }.freeze
end end
{
"2" => { "value" => "Less than 1 year" },
"7" => { "value" => "1 year but under 2 years" },
"8" => { "value" => "2 years but under 3 years" },
"9" => { "value" => "3 years but under 4 years" },
"10" => { "value" => "4 years but under 5 years" },
"5" => { "value" => "5 years or more" },
"divider" => { "value" => true },
"6" => { "value" => "Don’t know" },
}.freeze
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 76, 2024 => 75, 2025 => 75, 2026 => 82 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 76, 2024 => 75, 2025 => 75, 2026 => 82 }.freeze
end end

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

@ -55,15 +55,10 @@ class Form::Sales::Questions::MortgageLender < ::Form::Question
"0" => "Don’t know", "0" => "Don’t know",
}.freeze }.freeze
OPTIONS_INTRODUCED_2024 = %w[41].freeze
OPTIONS_NOT_DISPLAYED = %w[0].freeze OPTIONS_NOT_DISPLAYED = %w[0].freeze
def answer_options def answer_options
if form.start_year_2024_or_later?
ANSWER_OPTIONS ANSWER_OPTIONS
else
ANSWER_OPTIONS.dup.reject { |k, _v| OPTIONS_INTRODUCED_2024.include?(k) }
end
end end
def displayed_answer_options(_log, _user = nil) def displayed_answer_options(_log, _user = nil)

4
config/locales/en.yml

@ -336,9 +336,7 @@ en:
cannot_be_internal_transfer: "Answer cannot be internal transfer as this is not a secure tenancy." cannot_be_internal_transfer: "Answer cannot be internal transfer as this is not a secure tenancy."
declaration: declaration:
missing: missing: "You must show or give the tenant access to the MHCLG privacy notice before you can submit this log."
pre_2024: "You must show the MHCLG privacy notice to the tenant before you can submit this log."
post_2024: "You must show or give the tenant access to the MHCLG privacy notice before you can submit this log."
privacynotice: privacynotice:
missing: missing:

Loading…
Cancel
Save