From 81e1b1da06b3478139524b54c0aa9731b6c0322f Mon Sep 17 00:00:00 2001 From: samyou-softwire Date: Fri, 24 Apr 2026 09:48:50 +0100 Subject: [PATCH] CLDC-4402: lettings questions --- app/models/form/lettings/questions/age.rb | 4 +- .../form/lettings/questions/declaration.rb | 15 +- .../form/lettings/questions/ethnic_white.rb | 23 +-- ...rst_time_property_let_as_social_housing.rb | 4 +- .../lettings/questions/housingneeds_other.rb | 19 +-- .../form/lettings/questions/is_carehome.rb | 15 +- app/models/form/lettings/questions/layear.rb | 14 +- .../lettings/questions/letting_allocation.rb | 26 +--- .../lettings/questions/person_relationship.rb | 27 +--- .../lettings/questions/previous_let_type.rb | 12 -- .../form/lettings/questions/reason_renewal.rb | 31 ++-- .../questions/referral_general_needs.rb | 120 +++++---------- .../questions/referral_general_needs_prp.rb | 132 ++++++----------- .../questions/referral_supported_housing.rb | 120 +++++---------- .../referral_supported_housing_prp.rb | 138 ++++++------------ app/models/form/lettings/questions/rsnvac.rb | 135 ++++++----------- .../questions/starter_tenancy_type.rb | 80 ++++------ .../form/lettings/questions/tenancy_type.rb | 80 ++++------ .../lettings/questions/uprn_confirmation.rb | 15 +- .../form/lettings/questions/waityear.rb | 17 +-- .../form/sales/questions/mortgage_lender.rb | 7 +- config/locales/en.yml | 4 +- 22 files changed, 321 insertions(+), 717 deletions(-) diff --git a/app/models/form/lettings/questions/age.rb b/app/models/form/lettings/questions/age.rb index 61e70fe05..010dd0e42 100644 --- a/app/models/form/lettings/questions/age.rb +++ b/app/models/form/lettings/questions/age.rb @@ -33,8 +33,6 @@ class Form::Lettings::Questions::Age < ::Form::Question end def hint_text - if form.start_year_2024_or_later? - "Answer 1 for children aged under 1 year old" - end + "Answer 1 for children aged under 1 year old" end end diff --git a/app/models/form/lettings/questions/declaration.rb b/app/models/form/lettings/questions/declaration.rb index 6a2572487..67465cfcb 100644 --- a/app/models/form/lettings/questions/declaration.rb +++ b/app/models/form/lettings/questions/declaration.rb @@ -3,27 +3,16 @@ class Form::Lettings::Questions::Declaration < ::Form::Question super @id = "declaration" @type = "checkbox" - @check_answers_card_number = 0 unless form.start_year_2024_or_later? @top_guidance_partial = "privacy_notice_tenant" @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR) end def answer_options - declaration_text = if form.start_year_2024_or_later? - "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 + { "declaration" => { "value" => "The tenant has seen or been given access to the MHCLG privacy notice" } }.freeze end def unanswered_error_message - if form.start_year_2024_or_later? - I18n.t("validations.declaration.missing.post_2024") - else - I18n.t("validations.declaration.missing.pre_2024") - end + I18n.t("validations.declaration.missing") end QUESTION_NUMBER_FROM_YEAR = { 2023 => 30, 2024 => 11, 2025 => 11, 2026 => 11 }.freeze diff --git a/app/models/form/lettings/questions/ethnic_white.rb b/app/models/form/lettings/questions/ethnic_white.rb index 98ebe78f3..4efaee83c 100644 --- a/app/models/form/lettings/questions/ethnic_white.rb +++ b/app/models/form/lettings/questions/ethnic_white.rb @@ -9,22 +9,13 @@ class Form::Lettings::Questions::EthnicWhite < ::Form::Question end def answer_options - if form.start_year_2024_or_later? - { - "1" => { "value" => "English, Welsh, Northern Irish, Scottish or British" }, - "2" => { "value" => "Irish" }, - "18" => { "value" => "Gypsy or Irish Traveller" }, - "20" => { "value" => "Roma" }, - "3" => { "value" => "Any other White background" }, - }.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 + { + "1" => { "value" => "English, Welsh, Northern Irish, Scottish or British" }, + "2" => { "value" => "Irish" }, + "18" => { "value" => "Gypsy or Irish Traveller" }, + "20" => { "value" => "Roma" }, + "3" => { "value" => "Any other White background" }, + }.freeze end QUESTION_NUMBER_FROM_YEAR = { 2023 => 35, 2024 => 34, 2025 => 34, 2026 => 34 }.freeze diff --git a/app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb b/app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb index c9fb77abf..c120fbc24 100644 --- a/app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb +++ b/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 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 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 QUESTION_NUMBER_FROM_YEAR = { 2023 => 14, 2024 => 15, 2025 => 12, 2026 => 12 }.freeze diff --git a/app/models/form/lettings/questions/housingneeds_other.rb b/app/models/form/lettings/questions/housingneeds_other.rb index d8915e936..4be1ba6e0 100644 --- a/app/models/form/lettings/questions/housingneeds_other.rb +++ b/app/models/form/lettings/questions/housingneeds_other.rb @@ -9,19 +9,12 @@ class Form::Lettings::Questions::HousingneedsOther < ::Form::Question end def answer_options - if form.start_year_2024_or_later? - { - "1" => { "value" => "Yes" }, - "0" => { "value" => "No" }, - "divider" => { "value" => true }, - "2" => { "value" => "Don’t know" }, - }.freeze - else - { - "1" => { "value" => "Yes" }, - "0" => { "value" => "No" }, - }.freeze - end + { + "1" => { "value" => "Yes" }, + "0" => { "value" => "No" }, + "divider" => { "value" => true }, + "2" => { "value" => "Don’t know" }, + }.freeze end QUESTION_NUMBER_FROM_YEAR = { 2023 => 72, 2024 => 71, 2025 => 71, 2026 => 78 }.freeze diff --git a/app/models/form/lettings/questions/is_carehome.rb b/app/models/form/lettings/questions/is_carehome.rb index ea2df6eac..f66e1d939 100644 --- a/app/models/form/lettings/questions/is_carehome.rb +++ b/app/models/form/lettings/questions/is_carehome.rb @@ -10,17 +10,10 @@ class Form::Lettings::Questions::IsCarehome < ::Form::Question end def answer_options - if form.start_year_2024_or_later? - { - "1" => { "value" => "Yes" }, - "0" => { "value" => "No" }, - }.freeze - else - { - "0" => { "value" => "No" }, - "1" => { "value" => "Yes" }, - }.freeze - end + { + "1" => { "value" => "Yes" }, + "0" => { "value" => "No" }, + }.freeze end QUESTION_NUMBER_FROM_YEAR = { 2023 => 93, 2024 => 92, 2025 => 92, 2026 => 100 }.freeze diff --git a/app/models/form/lettings/questions/layear.rb b/app/models/form/lettings/questions/layear.rb index 2ae03212d..3b3493f69 100644 --- a/app/models/form/lettings/questions/layear.rb +++ b/app/models/form/lettings/questions/layear.rb @@ -21,7 +21,7 @@ class Form::Lettings::Questions::Layear < ::Form::Question "divider" => { "value" => true }, "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" }, "2" => { "value" => "Less than 1 year" }, @@ -34,18 +34,6 @@ class Form::Lettings::Questions::Layear < ::Form::Question "divider" => { "value" => true }, "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 diff --git a/app/models/form/lettings/questions/letting_allocation.rb b/app/models/form/lettings/questions/letting_allocation.rb index 2029335c4..ced1fb39b 100644 --- a/app/models/form/lettings/questions/letting_allocation.rb +++ b/app/models/form/lettings/questions/letting_allocation.rb @@ -8,24 +8,14 @@ class Form::Lettings::Questions::LettingAllocation < ::Form::Question end 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." }, - "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." }, - "chr" => { "value" => "Common housing register (CHR)", "hint" => "Where a single waiting list is used by a group of housing providers to receive and process housing applications. Providers may use different approaches to determine priority." }, - "accessible_register" => { "value" => "Accessible housing register", "hint" => "Where the ‘access category’ or another descriptor of whether an available vacant property meets a range of access needs is displayed to applicants during the allocations process." }, - "divider" => { "value" => true }, - "letting_allocation_unknown" => { "value" => "None of these allocation systems" }, - }.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 + { + "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." }, + "chr" => { "value" => "Common housing register (CHR)", "hint" => "Where a single waiting list is used by a group of housing providers to receive and process housing applications. Providers may use different approaches to determine priority." }, + "accessible_register" => { "value" => "Accessible housing register", "hint" => "Where the ‘access category’ or another descriptor of whether an available vacant property meets a range of access needs is displayed to applicants during the allocations process." }, + "divider" => { "value" => true }, + "letting_allocation_unknown" => { "value" => "None of these allocation systems" }, + }.freeze end QUESTION_NUMBER_FROM_YEAR = { 2023 => 84, 2024 => 83, 2025 => 83, 2026 => 90 }.freeze diff --git a/app/models/form/lettings/questions/person_relationship.rb b/app/models/form/lettings/questions/person_relationship.rb index d39cb49ff..8da3e4f5a 100644 --- a/app/models/form/lettings/questions/person_relationship.rb +++ b/app/models/form/lettings/questions/person_relationship.rb @@ -10,26 +10,13 @@ class Form::Lettings::Questions::PersonRelationship < ::Form::Question end def answer_options - if form.start_year_2024_or_later? - { - "P" => { "value" => "Partner" }, - "C" => { "value" => "Child" }, - "X" => { "value" => "Other" }, - "divider" => { "value" => true }, - "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 + { + "P" => { "value" => "Partner" }, + "C" => { "value" => "Child" }, + "X" => { "value" => "Other" }, + "divider" => { "value" => true }, + "R" => { "value" => "Person prefers not to say" }, + } end def question_number diff --git a/app/models/form/lettings/questions/previous_let_type.rb b/app/models/form/lettings/questions/previous_let_type.rb index 660e42869..6058b9a17 100644 --- a/app/models/form/lettings/questions/previous_let_type.rb +++ b/app/models/form/lettings/questions/previous_let_type.rb @@ -8,17 +8,6 @@ class Form::Lettings::Questions::PreviousLetType < ::Form::Question end 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" }, "2" => { "value" => "Affordable rent basis" }, "5" => { "value" => "London Affordable Rent basis" }, @@ -45,7 +34,6 @@ class Form::Lettings::Questions::PreviousLetType < ::Form::Question def answer_options 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 end diff --git a/app/models/form/lettings/questions/reason_renewal.rb b/app/models/form/lettings/questions/reason_renewal.rb index d5fccca67..ee33e6401 100644 --- a/app/models/form/lettings/questions/reason_renewal.rb +++ b/app/models/form/lettings/questions/reason_renewal.rb @@ -14,27 +14,16 @@ class Form::Lettings::Questions::ReasonRenewal < ::Form::Question end def answer_options - if form.start_year_2024_or_later? - { - "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)" }, - "52" => { "value" => "End of social or private sector tenancy - evicted due to rent arrears" }, - "53" => { "value" => "End of social or private sector tenancy - evicted for any other reason" }, - "20" => { "value" => "Other" }, - "47" => { "value" => "Tenant prefers not to say" }, - "divider" => { "value" => true }, - "28" => { "value" => "Don’t know" }, - }.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 + { + "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)" }, + "52" => { "value" => "End of social or private sector tenancy - evicted due to rent arrears" }, + "53" => { "value" => "End of social or private sector tenancy - evicted for any other reason" }, + "20" => { "value" => "Other" }, + "47" => { "value" => "Tenant prefers not to say" }, + "divider" => { "value" => true }, + "28" => { "value" => "Don’t know" }, + }.freeze end QUESTION_NUMBER_FROM_YEAR = { 2023 => 77, 2024 => 76, 2025 => 76, 2026 => 83 }.freeze diff --git a/app/models/form/lettings/questions/referral_general_needs.rb b/app/models/form/lettings/questions/referral_general_needs.rb index f2b2167a3..4b10c6637 100644 --- a/app/models/form/lettings/questions/referral_general_needs.rb +++ b/app/models/form/lettings/questions/referral_general_needs.rb @@ -10,87 +10,45 @@ class Form::Lettings::Questions::ReferralGeneralNeeds < ::Form::Question end def answer_options - if form.start_year_2024_or_later? - { - "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", - }, - "18" => { - "value" => "Police, probation, prison or youth offending team – tenant had custodial sentence", - }, - "19" => { - "value" => "Police, probation, prison or youth offending team – no custodial sentence", - }, - "7" => { - "value" => "Voluntary agency", - }, - "17" => { - "value" => "Children’s Social Care", - }, - "16" => { - "value" => "Other", - }, - }.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 + { + "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", + }, + "18" => { + "value" => "Police, probation, prison or youth offending team – tenant had custodial sentence", + }, + "19" => { + "value" => "Police, probation, prison or youth offending team – no custodial sentence", + }, + "7" => { + "value" => "Voluntary agency", + }, + "17" => { + "value" => "Children’s Social Care", + }, + "16" => { + "value" => "Other", + }, + }.freeze end QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze diff --git a/app/models/form/lettings/questions/referral_general_needs_prp.rb b/app/models/form/lettings/questions/referral_general_needs_prp.rb index 37d222961..091d842e9 100644 --- a/app/models/form/lettings/questions/referral_general_needs_prp.rb +++ b/app/models/form/lettings/questions/referral_general_needs_prp.rb @@ -10,96 +10,48 @@ class Form::Lettings::Questions::ReferralGeneralNeedsPrp < ::Form::Question end def answer_options - if form.start_year_2024_or_later? - { - "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", - }, - "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", - }, - "18" => { - "value" => "Police, probation, prison or youth offending team – tenant had custodial sentence", - }, - "19" => { - "value" => "Police, probation, prison or youth offending team – no custodial sentence", - }, - "7" => { - "value" => "Voluntary agency", - }, - "17" => { - "value" => "Children’s Social Care", - }, - "16" => { - "value" => "Other", - }, - }.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 + { + "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", + }, + "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", + }, + "18" => { + "value" => "Police, probation, prison or youth offending team – tenant had custodial sentence", + }, + "19" => { + "value" => "Police, probation, prison or youth offending team – no custodial sentence", + }, + "7" => { + "value" => "Voluntary agency", + }, + "17" => { + "value" => "Children’s Social Care", + }, + "16" => { + "value" => "Other", + }, + }.freeze end QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze diff --git a/app/models/form/lettings/questions/referral_supported_housing.rb b/app/models/form/lettings/questions/referral_supported_housing.rb index 2caddc8e2..e813056d8 100644 --- a/app/models/form/lettings/questions/referral_supported_housing.rb +++ b/app/models/form/lettings/questions/referral_supported_housing.rb @@ -10,87 +10,45 @@ class Form::Lettings::Questions::ReferralSupportedHousing < ::Form::Question end def answer_options - if form.start_year_2024_or_later? - { - "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", - }, - "18" => { - "value" => "Police, probation, prison or youth offending team – tenant had custodial sentence", - }, - "19" => { - "value" => "Police, probation, prison or youth offending team – no custodial sentence", - }, - "7" => { - "value" => "Voluntary agency", - }, - "17" => { - "value" => "Children’s Social Care", - }, - "16" => { - "value" => "Other", - }, - }.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 + { + "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", + }, + "18" => { + "value" => "Police, probation, prison or youth offending team – tenant had custodial sentence", + }, + "19" => { + "value" => "Police, probation, prison or youth offending team – no custodial sentence", + }, + "7" => { + "value" => "Voluntary agency", + }, + "17" => { + "value" => "Children’s Social Care", + }, + "16" => { + "value" => "Other", + }, + }.freeze end QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze diff --git a/app/models/form/lettings/questions/referral_supported_housing_prp.rb b/app/models/form/lettings/questions/referral_supported_housing_prp.rb index 89f02a723..bb07d11e0 100644 --- a/app/models/form/lettings/questions/referral_supported_housing_prp.rb +++ b/app/models/form/lettings/questions/referral_supported_housing_prp.rb @@ -10,99 +10,51 @@ class Form::Lettings::Questions::ReferralSupportedHousingPrp < ::Form::Question end def answer_options - if form.start_year_2024_or_later? - { - "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", - }, - "18" => { - "value" => "Police, probation, prison or youth offending team – tenant had custodial sentence", - }, - "19" => { - "value" => "Police, probation, prison or youth offending team – no custodial sentence", - }, - "7" => { - "value" => "Voluntary agency", - }, - "17" => { - "value" => "Children’s Social Care", - }, - "16" => { - "value" => "Other", - }, - }.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 + { + "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", + }, + "18" => { + "value" => "Police, probation, prison or youth offending team – tenant had custodial sentence", + }, + "19" => { + "value" => "Police, probation, prison or youth offending team – no custodial sentence", + }, + "7" => { + "value" => "Voluntary agency", + }, + "17" => { + "value" => "Children’s Social Care", + }, + "16" => { + "value" => "Other", + }, + }.freeze end QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze diff --git a/app/models/form/lettings/questions/rsnvac.rb b/app/models/form/lettings/questions/rsnvac.rb index 48523b284..736c31610 100644 --- a/app/models/form/lettings/questions/rsnvac.rb +++ b/app/models/form/lettings/questions/rsnvac.rb @@ -7,95 +7,52 @@ class Form::Lettings::Questions::Rsnvac < ::Form::Question end def answer_options - if form.start_year_2024_or_later? - { - "14" => { - "value" => "Renewal of fixed-term tenancy", - "hint" => "To the same tenant in the same property, except if was previously used as temporary accommodation.", - }, - "9" => { - "value" => "Re-let to tenant who occupied same property as temporary accommodation", - }, - "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.", - }, - "12" => { - "value" => "Tenant moved to other social housing provider", - }, - "8" => { - "value" => "Tenant moved to private sector or other accommodation", - }, - "18" => { - "value" => "Tenant moved to care home", - }, - "20" => { - "value" => "Tenant moved to long-stay hospital or similar institution", - }, - "5" => { - "value" => "Tenant died with no succession", - }, - "19" => { - "value" => "Tenant involved in a succession downsize", - }, - "6" => { - "value" => "Tenant abandoned property", - }, - "10" => { - "value" => "Tenant was evicted due to rent arrears", - }, - "11" => { - "value" => "Tenant was evicted due to anti-social behaviour", - }, - "21" => { - "value" => "Tenant was evicted due to both rent arrears and anti-social behaviour", - }, - "22" => { - "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 + { + "14" => { + "value" => "Renewal of fixed-term tenancy", + "hint" => "To the same tenant in the same property, except if was previously used as temporary accommodation.", + }, + "9" => { + "value" => "Re-let to tenant who occupied same property as temporary accommodation", + }, + "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.", + }, + "12" => { + "value" => "Tenant moved to other social housing provider", + }, + "8" => { + "value" => "Tenant moved to private sector or other accommodation", + }, + "18" => { + "value" => "Tenant moved to care home", + }, + "20" => { + "value" => "Tenant moved to long-stay hospital or similar institution", + }, + "5" => { + "value" => "Tenant died with no succession", + }, + "19" => { + "value" => "Tenant involved in a succession downsize", + }, + "6" => { + "value" => "Tenant abandoned property", + }, + "10" => { + "value" => "Tenant was evicted due to rent arrears", + }, + "11" => { + "value" => "Tenant was evicted due to anti-social behaviour", + }, + "21" => { + "value" => "Tenant was evicted due to both rent arrears and anti-social behaviour", + }, + "22" => { + "value" => "Any other reason", + }, + } end QUESTION_NUMBER_FROM_YEAR = { 2023 => 17, 2024 => 18, 2025 => 15, 2026 => 15 }.freeze diff --git a/app/models/form/lettings/questions/starter_tenancy_type.rb b/app/models/form/lettings/questions/starter_tenancy_type.rb index 4224781bd..fabd7db2b 100644 --- a/app/models/form/lettings/questions/starter_tenancy_type.rb +++ b/app/models/form/lettings/questions/starter_tenancy_type.rb @@ -10,59 +10,33 @@ class Form::Lettings::Questions::StarterTenancyType < ::Form::Question end def answer_options - if form.start_year_2024_or_later? - { - "4" => { - "value" => "Assured Shorthold Tenancy (AST) – Fixed term", - "hint" => "These are mostly provided by housing associations. Fixed term tenancies are intended to be for a set amount of time up to 20 years.", - }, - "6" => { - "value" => "Secure – fixed term", - "hint" => "These are mostly provided by local authorities. 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", - }, - "8" => { - "value" => "Periodic", - "hint" => "These are rolling tenancies with no fixed end date. They may have an initial fixed term and then become rolling.", - }, - "5" => { - "value" => "Licence agreement", - "hint" => "These are mostly used for Supported Housing and work on a rolling basis.", - }, - "3" => { - "value" => "Other", - }, - }.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 + { + "4" => { + "value" => "Assured Shorthold Tenancy (AST) – Fixed term", + "hint" => "These are mostly provided by housing associations. Fixed term tenancies are intended to be for a set amount of time up to 20 years.", + }, + "6" => { + "value" => "Secure – fixed term", + "hint" => "These are mostly provided by local authorities. 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", + }, + "8" => { + "value" => "Periodic", + "hint" => "These are rolling tenancies with no fixed end date. They may have an initial fixed term and then become rolling.", + }, + "5" => { + "value" => "Licence agreement", + "hint" => "These are mostly used for Supported Housing and work on a rolling basis.", + }, + "3" => { + "value" => "Other", + }, + }.freeze end QUESTION_NUMBER_FROM_YEAR = { 2023 => 27, 2024 => 27, 2025 => 28, 2026 => 27 }.freeze diff --git a/app/models/form/lettings/questions/tenancy_type.rb b/app/models/form/lettings/questions/tenancy_type.rb index d2b9a5925..3324c0281 100644 --- a/app/models/form/lettings/questions/tenancy_type.rb +++ b/app/models/form/lettings/questions/tenancy_type.rb @@ -10,59 +10,33 @@ class Form::Lettings::Questions::TenancyType < ::Form::Question end def answer_options - if form.start_year_2024_or_later? - { - "4" => { - "value" => "Assured Shorthold Tenancy (AST) – Fixed term", - "hint" => "These are mostly provided by housing associations. Fixed term tenancies are intended to be for a set amount of time up to 20 years.", - }, - "6" => { - "value" => "Secure – fixed term", - "hint" => "These are mostly provided by local authorities. 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", - }, - "8" => { - "value" => "Periodic", - "hint" => "These are rolling tenancies with no fixed end date. They may have an initial fixed term and then become rolling.", - }, - "5" => { - "value" => "Licence agreement", - "hint" => "These are mostly used for Supported Housing and work on a rolling basis.", - }, - "3" => { - "value" => "Other", - }, - }.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 + { + "4" => { + "value" => "Assured Shorthold Tenancy (AST) – Fixed term", + "hint" => "These are mostly provided by housing associations. Fixed term tenancies are intended to be for a set amount of time up to 20 years.", + }, + "6" => { + "value" => "Secure – fixed term", + "hint" => "These are mostly provided by local authorities. 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", + }, + "8" => { + "value" => "Periodic", + "hint" => "These are rolling tenancies with no fixed end date. They may have an initial fixed term and then become rolling.", + }, + "5" => { + "value" => "Licence agreement", + "hint" => "These are mostly used for Supported Housing and work on a rolling basis.", + }, + "3" => { + "value" => "Other", + }, + }.freeze end QUESTION_NUMBER_FROM_YEAR = { 2023 => 27, 2024 => 27, 2025 => 28, 2026 => 27 }.freeze diff --git a/app/models/form/lettings/questions/uprn_confirmation.rb b/app/models/form/lettings/questions/uprn_confirmation.rb index 2f03cb357..160933cc1 100644 --- a/app/models/form/lettings/questions/uprn_confirmation.rb +++ b/app/models/form/lettings/questions/uprn_confirmation.rb @@ -8,17 +8,10 @@ class Form::Lettings::Questions::UprnConfirmation < ::Form::Question end def answer_options - if form.start_year_2024_or_later? - { - "1" => { "value" => "Yes" }, - "0" => { "value" => "No, I want to search for the address instead" }, - }.freeze - else - { - "1" => { "value" => "Yes" }, - "0" => { "value" => "No, I want to enter the address manually" }, - }.freeze - end + { + "1" => { "value" => "Yes" }, + "0" => { "value" => "No, I want to search for the address instead" }, + }.freeze end def notification_banner(log = nil) diff --git a/app/models/form/lettings/questions/waityear.rb b/app/models/form/lettings/questions/waityear.rb index 8745bf227..43a63dd0d 100644 --- a/app/models/form/lettings/questions/waityear.rb +++ b/app/models/form/lettings/questions/waityear.rb @@ -23,27 +23,14 @@ class Form::Lettings::Questions::Waityear < ::Form::Question }.freeze end - if form.start_year_2024_or_later? - return { - "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" }, - "11" => { "value" => "5 years but under 10 years" }, - "12" => { "value" => "10 years or more" }, - "divider" => { "value" => true }, - "6" => { "value" => "Don’t know" }, - }.freeze - 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" }, + "11" => { "value" => "5 years but under 10 years" }, + "12" => { "value" => "10 years or more" }, "divider" => { "value" => true }, "6" => { "value" => "Don’t know" }, }.freeze diff --git a/app/models/form/sales/questions/mortgage_lender.rb b/app/models/form/sales/questions/mortgage_lender.rb index 96bf9e5b3..35de67d2f 100644 --- a/app/models/form/sales/questions/mortgage_lender.rb +++ b/app/models/form/sales/questions/mortgage_lender.rb @@ -55,15 +55,10 @@ class Form::Sales::Questions::MortgageLender < ::Form::Question "0" => "Don’t know", }.freeze - OPTIONS_INTRODUCED_2024 = %w[41].freeze OPTIONS_NOT_DISPLAYED = %w[0].freeze def answer_options - if form.start_year_2024_or_later? - ANSWER_OPTIONS - else - ANSWER_OPTIONS.dup.reject { |k, _v| OPTIONS_INTRODUCED_2024.include?(k) } - end + ANSWER_OPTIONS end def displayed_answer_options(_log, _user = nil) diff --git a/config/locales/en.yml b/config/locales/en.yml index 26a834e5d..9e4f09b0f 100644 --- a/config/locales/en.yml +++ b/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." declaration: - missing: - 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." + missing: "You must show or give the tenant access to the MHCLG privacy notice before you can submit this log." privacynotice: missing: