Browse Source

CLDC-3680: Copy changes lettings property information questions (#2726)

pull/2739/head^2
Manny Dinssa 3 months ago committed by GitHub
parent
commit
47928f3842
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      app/models/form/lettings/pages/address.rb
  2. 2
      app/models/form/lettings/pages/address_fallback.rb
  3. 2
      app/models/form/lettings/pages/address_matcher.rb
  4. 1
      app/models/form/lettings/pages/property_major_repairs.rb
  5. 1
      app/models/form/lettings/pages/uprn.rb
  6. 1
      app/models/form/lettings/pages/uprn_selection.rb
  7. 1
      app/models/form/lettings/pages/void_date.rb
  8. 3
      app/models/form/lettings/questions/address_line1.rb
  9. 3
      app/models/form/lettings/questions/address_line1_for_address_matcher.rb
  10. 2
      app/models/form/lettings/questions/address_line2.rb
  11. 6
      app/models/form/lettings/questions/beds.rb
  12. 3
      app/models/form/lettings/questions/builtype.rb
  13. 3
      app/models/form/lettings/questions/county.rb
  14. 3
      app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb
  15. 2
      app/models/form/lettings/questions/la.rb
  16. 4
      app/models/form/lettings/questions/majorrepairs.rb
  17. 3
      app/models/form/lettings/questions/mrcdate.rb
  18. 2
      app/models/form/lettings/questions/offered.rb
  19. 2
      app/models/form/lettings/questions/postcode_for_address_matcher.rb
  20. 3
      app/models/form/lettings/questions/postcode_for_full_address.rb
  21. 3
      app/models/form/lettings/questions/previous_let_type.rb
  22. 3
      app/models/form/lettings/questions/rsnvac.rb
  23. 3
      app/models/form/lettings/questions/rsnvac_first_let.rb
  24. 3
      app/models/form/lettings/questions/town_or_city.rb
  25. 3
      app/models/form/lettings/questions/unittype_gn.rb
  26. 3
      app/models/form/lettings/questions/uprn.rb
  27. 6
      app/models/form/lettings/questions/uprn_known.rb
  28. 2
      app/models/form/lettings/questions/uprn_selection.rb
  29. 2
      app/models/form/lettings/questions/voiddate.rb
  30. 3
      app/models/form/lettings/questions/wheelchair.rb
  31. 2
      app/models/form/lettings/subsections/property_information.rb
  32. 3
      config/locales/en.yml
  33. 104
      config/locales/forms/2023/lettings/property_information.en.yml
  34. 7
      config/locales/forms/2023/sales/soft_validations.en.yml
  35. 127
      config/locales/forms/2024/lettings/property_information.en.yml
  36. 7
      spec/requests/duplicate_logs_controller_spec.rb

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

@ -2,7 +2,7 @@ class Form::Lettings::Pages::Address < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "address" @id = "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?" @copy_key = "lettings.property_information.address"
@depends_on = [ @depends_on = [
{ "is_supported_housing?" => false, "uprn_known" => nil }, { "is_supported_housing?" => false, "uprn_known" => nil },
{ "is_supported_housing?" => false, "uprn_known" => 0 }, { "is_supported_housing?" => false, "uprn_known" => 0 },

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

@ -2,7 +2,7 @@ class Form::Lettings::Pages::AddressFallback < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "address" @id = "address"
@header = "Q12 - What is the property's address?" @copy_key = "lettings.property_information.address"
@depends_on = [ @depends_on = [
{ "is_supported_housing?" => false, "uprn_known" => nil, "uprn_selection" => "uprn_not_listed" }, { "is_supported_housing?" => false, "uprn_known" => nil, "uprn_selection" => "uprn_not_listed" },
{ "is_supported_housing?" => false, "uprn_known" => 0, "uprn_selection" => "uprn_not_listed" }, { "is_supported_housing?" => false, "uprn_known" => 0, "uprn_selection" => "uprn_not_listed" },

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

@ -2,7 +2,7 @@ class Form::Lettings::Pages::AddressMatcher < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "address_matcher" @id = "address_matcher"
@header = "Find an address" @copy_key = "lettings.property_information.address_matcher"
@depends_on = [ @depends_on = [
{ "is_supported_housing?" => false, "uprn_known" => nil }, { "is_supported_housing?" => false, "uprn_known" => nil },
{ "is_supported_housing?" => false, "uprn_known" => 0 }, { "is_supported_housing?" => false, "uprn_known" => 0 },

1
app/models/form/lettings/pages/property_major_repairs.rb

@ -2,6 +2,7 @@ class Form::Lettings::Pages::PropertyMajorRepairs < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "property_major_repairs" @id = "property_major_repairs"
@copy_key = "lettings.property_information.property_major_repairs"
@depends_on = [{ "is_renewal?" => false, "vacancy_reason_not_renewal_or_first_let?" => true }] @depends_on = [{ "is_renewal?" => false, "vacancy_reason_not_renewal_or_first_let?" => true }]
end end

1
app/models/form/lettings/pages/uprn.rb

@ -2,6 +2,7 @@ class Form::Lettings::Pages::Uprn < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "uprn" @id = "uprn"
@copy_key = "lettings.property_information.uprn"
@depends_on = [{ "is_supported_housing?" => false }] @depends_on = [{ "is_supported_housing?" => false }]
end end

1
app/models/form/lettings/pages/uprn_selection.rb

@ -2,7 +2,6 @@ class Form::Lettings::Pages::UprnSelection < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "uprn_selection" @id = "uprn_selection"
@header = "We found some addresses that might be this property"
@depends_on = [ @depends_on = [
{ "is_supported_housing?" => false, "uprn_known" => nil, "address_options_present?" => true }, { "is_supported_housing?" => false, "uprn_known" => nil, "address_options_present?" => true },
{ "is_supported_housing?" => false, "uprn_known" => 0, "address_options_present?" => true }, { "is_supported_housing?" => false, "uprn_known" => 0, "address_options_present?" => true },

1
app/models/form/lettings/pages/void_date.rb

@ -2,7 +2,6 @@ class Form::Lettings::Pages::VoidDate < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "void_date" @id = "void_date"
@header = "Void date"
@depends_on = [{ "is_renewal?" => false }] @depends_on = [{ "is_renewal?" => false }]
end end

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

@ -2,11 +2,10 @@ class Form::Lettings::Questions::AddressLine1 < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "address_line1" @id = "address_line1"
@header = "Address line 1" @copy_key = "lettings.property_information.address.address_line1"
@error_label = "Address line 1" @error_label = "Address line 1"
@type = "text" @type = "text"
@plain_label = true @plain_label = true
@check_answer_label = "Address lines 1 and 2"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@hide_question_number_on_page = true @hide_question_number_on_page = true

3
app/models/form/lettings/questions/address_line1_for_address_matcher.rb

@ -2,11 +2,10 @@ class Form::Lettings::Questions::AddressLine1ForAddressMatcher < ::Form::Questio
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "address_line1_input" @id = "address_line1_input"
@header = "Address line 1" @copy_key = "lettings.property_information.address_matcher.address_line1_input"
@error_label = "Address line 1" @error_label = "Address line 1"
@type = "text" @type = "text"
@plain_label = true @plain_label = true
@check_answer_label = "Find address"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
@hide_question_number_on_page = true @hide_question_number_on_page = true
end end

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::AddressLine2 < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "address_line2" @id = "address_line2"
@header = "Address line 2 (optional)" @copy_key = "lettings.property_information.address.address_line2"
@type = "text" @type = "text"
@plain_label = true @plain_label = true
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true

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

@ -2,8 +2,6 @@ class Form::Lettings::Questions::Beds < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "beds" @id = "beds"
@check_answer_label = "Number of bedrooms"
@header = "How many bedrooms does the property have?"
@type = "numeric" @type = "numeric"
@width = 2 @width = 2
@check_answers_card_number = 0 @check_answers_card_number = 0
@ -17,9 +15,5 @@ class Form::Lettings::Questions::Beds < ::Form::Question
log.is_bedsit? log.is_bedsit?
end 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 QUESTION_NUMBER_FROM_YEAR = { 2023 => 22 }.freeze
end end

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

@ -2,11 +2,8 @@ class Form::Lettings::Questions::Builtype < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "builtype" @id = "builtype"
@check_answer_label = "Type of building"
@header = "What type of building is the property?"
@type = "radio" @type = "radio"
@check_answers_card_number = 0 @check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end end

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

@ -2,10 +2,9 @@ class Form::Lettings::Questions::County < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "county" @id = "county"
@header = "County (optional)" @copy_key = "lettings.property_information.address.county"
@type = "text" @type = "text"
@plain_label = true @plain_label = true
@check_answer_label = "County"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@hide_question_number_on_page = true @hide_question_number_on_page = true

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

@ -2,11 +2,8 @@ class Form::Lettings::Questions::FirstTimePropertyLetAsSocialHousing < ::Form::Q
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "first_time_property_let_as_social_housing" @id = "first_time_property_let_as_social_housing"
@check_answer_label = "First time being let as social-housing?"
@header = "Is this the first time the property has been let as social housing?"
@type = "radio" @type = "radio"
@check_answers_card_number = 0 @check_answers_card_number = 0
@hint_text = ""
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end end

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

@ -2,8 +2,6 @@ class Form::Lettings::Questions::La < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "la" @id = "la"
@check_answer_label = "Local Authority"
@header = "What is the property’s local authority?"
@type = "select" @type = "select"
@check_answers_card_number = nil @check_answers_card_number = nil
@hint_text = "" @hint_text = ""

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

@ -2,11 +2,9 @@ class Form::Lettings::Questions::Majorrepairs < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "majorrepairs" @id = "majorrepairs"
@check_answer_label = "Major repairs carried out during void period" @copy_key = "lettings.property_information.property_major_repairs.majorrepairs"
@header = "Were any major repairs carried out during the void period?"
@type = "radio" @type = "radio"
@check_answers_card_number = 0 @check_answers_card_number = 0
@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 @answer_options = ANSWER_OPTIONS
@conditional_for = { "mrcdate" => [1] } @conditional_for = { "mrcdate" => [1] }
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]

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

@ -2,8 +2,7 @@ class Form::Lettings::Questions::Mrcdate < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "mrcdate" @id = "mrcdate"
@check_answer_label = "Completion date of repairs" @copy_key = "lettings.property_information.property_major_repairs.mrcdate"
@header = "When were the repairs completed?"
@type = "date" @type = "date"
@check_answers_card_number = 0 @check_answers_card_number = 0
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]

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

@ -2,8 +2,6 @@ class Form::Lettings::Questions::Offered < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "offered" @id = "offered"
@check_answer_label = I18n.t("check_answer_labels.offered")
@header = I18n.t("questions.offered")
@type = "numeric" @type = "numeric"
@width = 2 @width = 2
@check_answers_card_number = 0 @check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::PostcodeForAddressMatcher < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "postcode_full_input" @id = "postcode_full_input"
@header = "Postcode" @copy_key = "lettings.property_information.address_matcher.postcode_full_input"
@type = "text" @type = "text"
@width = 5 @width = 5
@plain_label = true @plain_label = true

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::PostcodeForFullAddress < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "postcode_full" @id = "postcode_full"
@header = "Postcode" @copy_key = "lettings.property_information.address.postcode_full"
@type = "text" @type = "text"
@width = 5 @width = 5
@inferred_check_answers_value = [{ @inferred_check_answers_value = [{
@ -17,7 +17,6 @@ class Form::Lettings::Questions::PostcodeForFullAddress < ::Form::Question
}, },
} }
@plain_label = true @plain_label = true
@check_answer_label = "Postcode"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@hide_question_number_on_page = true @hide_question_number_on_page = true

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

@ -2,11 +2,8 @@ class Form::Lettings::Questions::PreviousLetType < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "unitletas" @id = "unitletas"
@check_answer_label = "Most recent let type"
@header = "What type was the property most recently let as?"
@type = "radio" @type = "radio"
@check_answers_card_number = 0 @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 @answer_options = form.start_year_after_2024? ? ANSWER_OPTIONS_AFTER_2024 : ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end end

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

@ -2,11 +2,8 @@ class Form::Lettings::Questions::Rsnvac < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "rsnvac" @id = "rsnvac"
@check_answer_label = "Vacancy reason"
@header = "What is the reason for the property being vacant?"
@type = "radio" @type = "radio"
@check_answers_card_number = 0 @check_answers_card_number = 0
@hint_text = ""
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end end

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

@ -2,11 +2,8 @@ class Form::Lettings::Questions::RsnvacFirstLet < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "rsnvac" @id = "rsnvac"
@check_answer_label = "Vacancy reason"
@header = "What is the reason for the property being vacant?"
@type = "radio" @type = "radio"
@check_answers_card_number = 0 @check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end end

3
app/models/form/lettings/questions/town_or_city.rb

@ -2,10 +2,9 @@ class Form::Lettings::Questions::TownOrCity < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "town_or_city" @id = "town_or_city"
@header = "Town or city" @copy_key = "lettings.property_information.address.town_or_city"
@type = "text" @type = "text"
@plain_label = true @plain_label = true
@check_answer_label = "Town or city"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@hide_question_number_on_page = true @hide_question_number_on_page = true

3
app/models/form/lettings/questions/unittype_gn.rb

@ -2,11 +2,8 @@ class Form::Lettings::Questions::UnittypeGn < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "unittype_gn" @id = "unittype_gn"
@check_answer_label = "Type of unit"
@header = "What type of unit is the property?"
@type = "radio" @type = "radio"
@check_answers_card_number = 0 @check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end end

3
app/models/form/lettings/questions/uprn.rb

@ -2,8 +2,7 @@ class Form::Lettings::Questions::Uprn < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "uprn" @id = "uprn"
@check_answer_label = "UPRN" @copy_key = "lettings.property_information.uprn.uprn"
@header = "What is the property's UPRN?"
@type = "text" @type = "text"
@width = 10 @width = 10
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]

6
app/models/form/lettings/questions/uprn_known.rb

@ -2,13 +2,9 @@ class Form::Lettings::Questions::UprnKnown < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "uprn_known" @id = "uprn_known"
@check_answer_label = "UPRN known?" @copy_key = "lettings.property_information.uprn.uprn_known"
@header = "Do you know the property's UPRN?"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@hint_text = "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.<br><br>
The UPRN may not be the same as the property reference assigned by your organisation.<br><br>
If you dont know the UPRN you can enter the address of the property instead on the next screen."
@conditional_for = { "uprn" => [1] } @conditional_for = { "uprn" => [1] }
@inferred_check_answers_value = [ @inferred_check_answers_value = [
{ {

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

@ -2,9 +2,7 @@ class Form::Lettings::Questions::UprnSelection < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "uprn_selection" @id = "uprn_selection"
@header = "Select the correct address"
@type = "radio" @type = "radio"
@check_answer_label = "Select the correct address"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
end end

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

@ -2,8 +2,6 @@ class Form::Lettings::Questions::Voiddate < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "voiddate" @id = "voiddate"
@check_answer_label = "Void date"
@header = "What is the void date?"
@type = "date" @type = "date"
@check_answers_card_number = 0 @check_answers_card_number = 0
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]

3
app/models/form/lettings/questions/wheelchair.rb

@ -2,11 +2,8 @@ class Form::Lettings::Questions::Wheelchair < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "wchair" @id = "wchair"
@check_answer_label = "Property built or adapted to wheelchair-user standards"
@header = "Is the property built or adapted to wheelchair-user standards?"
@type = "radio" @type = "radio"
@check_answers_card_number = 0 @check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "This is whether someone who uses a wheelchair is able to make full use of all of the property’s rooms and facilities, including use of both inside and outside space, and entering and exiting the property." : ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end end

2
app/models/form/lettings/subsections/property_information.rb

@ -34,7 +34,7 @@ class Form::Lettings::Subsections::PropertyInformation < ::Form::Subsection
Form::Lettings::Pages::Uprn.new(nil, nil, self), Form::Lettings::Pages::Uprn.new(nil, nil, self),
Form::Lettings::Pages::UprnConfirmation.new(nil, nil, self), Form::Lettings::Pages::UprnConfirmation.new(nil, nil, self),
Form::Lettings::Pages::AddressMatcher.new(nil, nil, self), Form::Lettings::Pages::AddressMatcher.new(nil, nil, self),
Form::Lettings::Pages::NoAddressFound.new(nil, nil, self), Form::Lettings::Pages::NoAddressFound.new(nil, nil, self), # soft validation
Form::Lettings::Pages::UprnSelection.new(nil, nil, self), Form::Lettings::Pages::UprnSelection.new(nil, nil, self),
Form::Lettings::Pages::AddressFallback.new(nil, nil, self), Form::Lettings::Pages::AddressFallback.new(nil, nil, self),
] ]

3
config/locales/en.yml

@ -741,7 +741,6 @@ Make sure these answers are correct."
stairowned: stairowned:
one: "What percentage of the property does the buyer now own in total?" one: "What percentage of the property does the buyer now own in total?"
other: "What percentage of the property do the buyers now own in total?" other: "What percentage of the property do the buyers now own in total?"
offered: "How many times was the property offered between becoming vacant and this letting?"
hints: hints:
location: location:
@ -754,7 +753,6 @@ Make sure these answers are correct."
toggle_active: "If the date is before %{date}, select ‘From the start of the open collection period’ because the previous period has now closed." toggle_active: "If the date is before %{date}, select ‘From the start of the open collection period’ because the previous period has now closed."
bulk_upload: bulk_upload:
needstype: "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." needstype: "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."
offered: "Do not include the offer that led to this letting. This is after the last tenancy ended. If the property is being offered for let for the first time, enter 0."
check_answer_labels: check_answer_labels:
soctenant: soctenant:
@ -763,7 +761,6 @@ Make sure these answers are correct."
stairowned: stairowned:
one: "Percentage the buyer now owns in total." one: "Percentage the buyer now owns in total."
other: "Percentage the buyers now own in total." other: "Percentage the buyers now own in total."
offered: "Times previously offered since becoming available."
warnings: warnings:
organisation: organisation:

104
config/locales/forms/2023/lettings/property_information.en.yml

@ -0,0 +1,104 @@
en:
forms:
2023:
lettings:
property_information:
uprn:
page_header: ""
uprn_known:
check_answer_label: "UPRN known?"
hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.<br><br>The UPRN may not be the same as the property reference assigned by your organisation.<br><br>If you don’t know the UPRN you can enter the address of the property instead on the next screen."
question_text: "Do you know the property's UPRN?"
uprn:
check_answer_label: "UPRN"
hint_text: ""
question_text: "What is the property's UPRN?"
uprn_confirmed:
page_header: "We found an address that might be this property"
check_answer_label: "Is this the right address?"
hint_text: ""
question_text: "Is this the property address?"
address:
page_header: "Q12 - What is the property's address?"
address_line1:
check_answer_label: "Address lines 1 and 2"
hint_text: ""
question_text: "Address line 1"
address_line2:
check_answer_label: ""
hint_text: ""
question_text: "Address line 2 (optional)"
town_or_city:
check_answer_label: "Town or city"
hint_text: ""
question_text: "Town or city"
county:
check_answer_label: "County"
hint_text: ""
question_text: "County (optional)"
postcode_full:
check_answer_label: "Postcode"
hint_text: ""
question_text: "Postcode"
la:
page_header: ""
check_answer_label: "Local authority"
hint_text: ""
question_text: "What is the property’s local authority?"
first_time_property_let_as_social_housing:
page_header: ""
check_answer_label: "First time being let as social-housing?"
hint_text: ""
question_text: "Is this the first time the property has been let as social housing?"
unitletas:
page_header: ""
check_answer_label: "Most recent let type"
hint_text: ""
question_text: "What type was the property most recently let as?"
rsnvac:
page_header: ""
check_answer_label: "Vacancy reason"
hint_text: ""
question_text: "What is the reason for the property being vacant?"
offered:
page_header: ""
check_answer_label: "Times previously offered since becoming available."
hint_text: "Do not include the offer that led to this letting. This is after the last tenancy ended. If the property is being offered for let for the first time, enter 0."
question_text: "How many times was the property offered between becoming vacant and this letting?"
unittype_gn:
page_header: ""
check_answer_label: "Type of unit"
hint_text: ""
question_text: "What type of unit is the property?"
builtype:
page_header: ""
check_answer_label: "Type of building"
hint_text: ""
question_text: "What type of building is the property?"
wchair:
page_header: ""
check_answer_label: "Property built or adapted to wheelchair-user standards"
hint_text: ""
question_text: "Is the property built or adapted to wheelchair-user standards?"
beds:
page_header: ""
check_answer_label: "Number of bedrooms"
hint_text: "If shared accommodation, enter the number of bedrooms occupied by this household. A bedsit has 1 bedroom."
question_text: "How many bedrooms does the property have?"
voiddate:
page_header: "Void date"
check_answer_label: "Void date"
hint_text: ""
question_text: "What is the void date?"

7
config/locales/forms/2023/sales/soft_validations.en.yml

@ -18,6 +18,7 @@ en:
question_text: "Are you sure this person is retired?" question_text: "Are you sure this person is retired?"
title_text: "You told us this person is aged %{age} years and retired." title_text: "You told us this person is aged %{age} years and retired."
informative_text: "The minimum expected retirement age in England is 66." informative_text: "The minimum expected retirement age in England is 66."
old_persons_shared_ownership_value_check: old_persons_shared_ownership_value_check:
page_header: "" page_header: ""
check_answer_label: "Shared ownership confirmation" check_answer_label: "Shared ownership confirmation"
@ -27,6 +28,7 @@ en:
joint_purchase: "You told us the buyers are using the Older Persons Shared Ownership scheme." joint_purchase: "You told us the buyers are using the Older Persons Shared Ownership scheme."
not_joint_purchase: "You told us the buyer is using the Older Persons Shared Ownership scheme." not_joint_purchase: "You told us the buyer is using the Older Persons Shared Ownership scheme."
informative_text: "At least one buyer must be aged 65 years and over to use this scheme." informative_text: "At least one buyer must be aged 65 years and over to use this scheme."
income1_value_check: income1_value_check:
check_answer_label: "Buyer 1 income confirmation" check_answer_label: "Buyer 1 income confirmation"
hint_text: "" hint_text: ""
@ -113,12 +115,14 @@ en:
not_joint_purchase: not_joint_purchase:
title_text: "You told us the buyer’s deposit was %{deposit} and their savings were %{savings}." title_text: "You told us the buyer’s deposit was %{deposit} and their savings were %{savings}."
informative_text: "The deposit amount is higher than we would expect for the amount of savings they have." informative_text: "The deposit amount is higher than we would expect for the amount of savings they have."
wheel_value_check: wheel_value_check:
page_header: "" page_header: ""
check_answer_label: "Does anyone in the household use a wheelchair?" check_answer_label: "Does anyone in the household use a wheelchair?"
hint_text: "" hint_text: ""
question_text: "You told us that someone in the household uses a wheelchair." question_text: "You told us that someone in the household uses a wheelchair."
title_text: "You told us that someone in the household uses a wheelchair." title_text: "You told us that someone in the household uses a wheelchair."
buyer_livein_value_check: buyer_livein_value_check:
buyer1: buyer1:
page_header: "" page_header: ""
@ -134,6 +138,7 @@ en:
question_text: "Are you sure this is correct?" question_text: "Are you sure this is correct?"
title_text: "You told us that buyer 2 will not live in the property." title_text: "You told us that buyer 2 will not live in the property."
informative_text: "For %{ownership_scheme} types, the buyer usually lives in the property." informative_text: "For %{ownership_scheme} types, the buyer usually lives in the property."
student_not_child_value_check: student_not_child_value_check:
page_header: "" page_header: ""
check_answer_label: "Student not a child confirmation" check_answer_label: "Student not a child confirmation"
@ -141,6 +146,7 @@ en:
question_text: "Are you sure this person is not a child?" question_text: "Are you sure this person is not a child?"
title_text: "You told us this person is a student aged between 16 and 19." title_text: "You told us this person is a student aged between 16 and 19."
informative_text: "Are you sure this person is not a child?" informative_text: "Are you sure this person is not a child?"
partner_under_16_value_check: partner_under_16_value_check:
page_header: "" page_header: ""
check_answer_label: "Partner under 16 confirmation" check_answer_label: "Partner under 16 confirmation"
@ -148,6 +154,7 @@ en:
question_text: "Are you sure this is correct?" question_text: "Are you sure this is correct?"
title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to buyer 1." title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to buyer 1."
informative_text: "Are you sure this is correct?" informative_text: "Are you sure this is correct?"
multiple_partners_value_check: multiple_partners_value_check:
page_header: "" page_header: ""
check_answer_label: "Multiple partners confirmation" check_answer_label: "Multiple partners confirmation"

127
config/locales/forms/2024/lettings/property_information.en.yml

@ -0,0 +1,127 @@
en:
forms:
2024:
lettings:
property_information:
first_time_property_let_as_social_housing:
page_header: ""
check_answer_label: "First time being let as social-housing?"
hint_text: ""
question_text: "Is this the first time the property has been let as social housing?"
uprn:
page_header: ""
uprn_known:
check_answer_label: "UPRN known?"
hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.<br><br>The UPRN may not be the same as the property reference assigned by your organisation.<br><br>If you don’t know the UPRN you can enter the address of the property instead on the next screen."
question_text: "Do you know the property's UPRN?"
uprn:
check_answer_label: "UPRN"
hint_text: ""
question_text: "What is the property's UPRN?"
uprn_confirmed:
page_header: "We found an address that might be this property"
check_answer_label: "Is this the right address?"
hint_text: ""
question_text: "Is this the property address?"
address_matcher:
page_header: "Find an address"
address_line1_input:
check_answer_label: "Find address"
hint_text: ""
question_text: "Address line 1"
postcode_full_input:
check_answer_label: ""
hint_text: ""
question_text: "Postcode"
uprn_selection:
page_header: "We found an address that might be this property"
check_answer_label: "Select the correct address"
hint_text: ""
question_text: "Select the correct address"
address:
page_header: "Q12 - What is the property's address?"
address_line1:
check_answer_label: "Address lines 1 and 2"
hint_text: ""
question_text: "Address line 1"
address_line2:
check_answer_label: ""
hint_text: ""
question_text: "Address line 2 (optional)"
town_or_city:
check_answer_label: "Town or city"
hint_text: ""
question_text: "Town or city"
county:
check_answer_label: "County"
hint_text: ""
question_text: "County (optional)"
postcode_full:
check_answer_label: "Postcode"
hint_text: ""
question_text: "Postcode"
la:
page_header: ""
check_answer_label: "Local authority"
hint_text: ""
question_text: "What is the property’s local authority?"
unitletas:
page_header: ""
check_answer_label: "Most recent let type"
hint_text: "This is the rent type of the previous tenancy in this property."
question_text: "What type was the property most recently let as?"
rsnvac:
page_header: ""
check_answer_label: "Vacancy reason"
hint_text: ""
question_text: "What is the reason for the property being vacant?"
unittype_gn:
page_header: ""
check_answer_label: "Type of unit"
hint_text: ""
question_text: "What type of unit is the property?"
builtype:
page_header: ""
check_answer_label: "Type of building"
hint_text: ""
question_text: "What type of building is the property?"
wchair:
page_header: ""
check_answer_label: "Property built or adapted to wheelchair-user standards"
hint_text: "This is whether someone who uses a wheelchair is able to make full use of all of the property’s rooms and facilities, including use of both inside and outside space, and entering and exiting the property."
question_text: "Is the property built or adapted to wheelchair-user standards?"
beds:
page_header: ""
check_answer_label: "Number of bedrooms"
hint_text: "If shared accommodation, enter the number of bedrooms occupied by this household."
question_text: "How many bedrooms does the property have?"
voiddate:
page_header: "Void date"
check_answer_label: "Void date"
hint_text: ""
question_text: "What is the void date?"
property_major_repairs:
page_header: ""
majorrepairs:
check_answer_label: "Major repairs carried out during void period"
hint_text: "Major repairs are works that could not be reasonably carried out with a tenant living at the property. For example, structural repairs."
question_text: "Were any major repairs carried out during the void period?"
mrcdate:
check_answer_label: "Completion date of repairs"
hint_text: ""
question_text: "When were the repairs completed?"

7
spec/requests/duplicate_logs_controller_spec.rb

@ -66,7 +66,6 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q5 - Tenancy start date", count: 3) expect(page).to have_content("Q5 - Tenancy start date", count: 3)
expect(page).to have_content("Q7 - Tenant code", count: 3) expect(page).to have_content("Q7 - Tenant code", count: 3)
expect(page).to have_content("Q12 - Postcode", count: 3)
expect(page).to have_content("Q32 - Lead tenant’s age", count: 3) expect(page).to have_content("Q32 - Lead tenant’s age", count: 3)
expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 3) expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 3)
expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 3) expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 3)
@ -84,7 +83,6 @@ RSpec.describe DuplicateLogsController, type: :request do
expect(page).to have_content("Q5 - Tenancy start date", count: 3) expect(page).to have_content("Q5 - Tenancy start date", count: 3)
expect(page).to have_content("Q7 - Tenant code", count: 3) expect(page).to have_content("Q7 - Tenant code", count: 3)
expect(page).to have_content("Q12 - Postcode", count: 1)
expect(page).to have_content("Postcode (from UPRN)", count: 2) expect(page).to have_content("Postcode (from UPRN)", count: 2)
expect(page).to have_content("Q32 - Lead tenant’s age", count: 3) expect(page).to have_content("Q32 - Lead tenant’s age", count: 3)
expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 3) expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 3)
@ -114,7 +112,6 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q5 - Tenancy start date", count: 1) expect(page).to have_content("Q5 - Tenancy start date", count: 1)
expect(page).to have_content("Q7 - Tenant code", count: 1) expect(page).to have_content("Q7 - Tenant code", count: 1)
expect(page).to have_content("Q12 - Postcode", count: 1)
expect(page).to have_content("Q32 - Lead tenant’s age", count: 1) expect(page).to have_content("Q32 - Lead tenant’s age", count: 1)
expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 1) expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 1)
expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 1) expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 1)
@ -141,7 +138,6 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q5 - Tenancy start date", count: 1) expect(page).to have_content("Q5 - Tenancy start date", count: 1)
expect(page).to have_content("Q7 - Tenant code", count: 1) expect(page).to have_content("Q7 - Tenant code", count: 1)
expect(page).to have_content("Q12 - Postcode", count: 1)
expect(page).to have_content("Q32 - Lead tenant’s age", count: 1) expect(page).to have_content("Q32 - Lead tenant’s age", count: 1)
expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 1) expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 1)
expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 1) expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 1)
@ -295,7 +291,6 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q5 - Tenancy start date", count: 3) expect(page).to have_content("Q5 - Tenancy start date", count: 3)
expect(page).to have_content("Q7 - Tenant code", count: 3) expect(page).to have_content("Q7 - Tenant code", count: 3)
expect(page).to have_content("Q12 - Postcode", count: 3)
expect(page).to have_content("Q32 - Lead tenant’s age", count: 3) expect(page).to have_content("Q32 - Lead tenant’s age", count: 3)
expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 3) expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 3)
expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 3) expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 3)
@ -324,7 +319,6 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q5 - Tenancy start date", count: 1) expect(page).to have_content("Q5 - Tenancy start date", count: 1)
expect(page).to have_content("Q7 - Tenant code", count: 1) expect(page).to have_content("Q7 - Tenant code", count: 1)
expect(page).to have_content("Q12 - Postcode", count: 1)
expect(page).to have_content("Q32 - Lead tenant’s age", count: 1) expect(page).to have_content("Q32 - Lead tenant’s age", count: 1)
expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 1) expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 1)
expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 1) expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 1)
@ -351,7 +345,6 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q5 - Tenancy start date", count: 1) expect(page).to have_content("Q5 - Tenancy start date", count: 1)
expect(page).to have_content("Q7 - Tenant code", count: 1) expect(page).to have_content("Q7 - Tenant code", count: 1)
expect(page).to have_content("Q12 - Postcode", count: 1)
expect(page).to have_content("Q32 - Lead tenant’s age", count: 1) expect(page).to have_content("Q32 - Lead tenant’s age", count: 1)
expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 1) expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 1)
expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 1) expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 1)

Loading…
Cancel
Save