Browse Source

CLDC-1864 single log numbering (#1381)

* feat: add initial question number behaviour

* feat: add initial CYA behaviour

* feat: number sales setup section

* refactor: lint

* feat: property information numbering

* feat: household characteristics section and typo fix

* feat: household characteristics numbering

* feat: household situation numbering

* feat: other household info numbering

* feat: income, benefits and outgoings numbering

* feat: shared ownership scheme numbering

* feat: shared, discount and outright numbering

* feat: fix income duplication bug, add numbers to other questions

* feat: typo fix

* feat: add lettings setup numbering

* feat: add property info numbering

* feat: add household char numbering

* feat: add household needs numbering

* feat: add household situ numbering

* feat: add income numbering

* feat: update tests

* refactor: cleanup and disable on 2022 and before logs

* feat: add test for q numbers in 23/24 year only

* refactor: highlight multiplication in brackets

* feat: show rent and charge questions individually on cya

* feat: number new previous tenure q

* feat: delete old prevten file

* feat: update card numbers after merge

* feat: add q60 ands 61 sales

* refactor: delete empty files

---------

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

2
app/components/check_answers_summary_list_card_component.html.erb

@ -10,7 +10,7 @@
<%= govuk_summary_list do |summary_list| %>
<% applicable_questions.each do |question| %>
<% summary_list.row do |row| %>
<% row.key { question.check_answer_label.to_s.presence || question.header.to_s } %>
<% row.key { get_question_label(question) } %>
<% row.value do %>
<span class="govuk-!-margin-right-4"><%= get_answer_label(question) %></span>

4
app/components/check_answers_summary_list_card_component.rb

@ -17,6 +17,10 @@ class CheckAnswersSummaryListCardComponent < ViewComponent::Base
question.answer_label(log, user).presence || unanswered_value
end
def get_question_label(question)
[question.question_number_string, question.check_answer_label.to_s.presence || question.header.to_s].compact.join(" - ")
end
def check_answers_card_title(question)
return "Lead tenant" if question.form.type == "lettings" && question.check_answers_card_number == 1
return "Buyer #{question.check_answers_card_number}" if question.check_answers_card_number <= number_of_buyers

4
app/helpers/check_answers_helper.rb

@ -45,4 +45,8 @@ private
def get_answer_label(question, lettings_log)
question.answer_label(lettings_log, current_user).presence || "<span class=\"app-!-colour-muted\">You didn’t answer this question</span>".html_safe
end
def get_question_label(question)
[question.question_number_string, question.check_answer_label.to_s.presence || question.header.to_s].compact.join(" - ")
end
end

2
app/helpers/question_view_helper.rb

@ -7,7 +7,7 @@ module QuestionViewHelper
def legend(question, page_header, conditional)
{
text: question.header.html_safe,
text: [question.question_number_string(conditional:), question.header.html_safe].compact.join(" - "),
size: label_size(page_header, conditional),
tag: label_tag(page_header, conditional),
}

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

@ -12,5 +12,6 @@ class Form::Lettings::Questions::Age < ::Form::Question
@min = 1
@step = 1
@hint_text = "For a child under 1, enter 1" if person_type == "child"
@question_number = 31 + (4 * person_index)
end
end

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

@ -11,5 +11,6 @@ class Form::Lettings::Questions::Age1 < ::Form::Question
@max = 120
@min = 16
@step = 1
@question_number = 32
end
end

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

@ -10,6 +10,7 @@ class Form::Lettings::Questions::Age1Known < ::Form::Question
@answer_options = ANSWER_OPTIONS
@conditional_for = { "age1" => [0] }
@hidden_in_check_answers = { "depends_on" => [{ "age1_known" => 0 }, { "age1_known" => 1 }] }
@question_number = 32
end
ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze

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

@ -15,6 +15,7 @@ class Form::Lettings::Questions::AgeKnown < ::Form::Question
{ "age#{person_index}_known" => 1 },
],
}
@question_number = 31 + (4 * person_index)
end
ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Armedforces < ::Form::Question
@check_answers_card_number = 0
@hint_text = "This excludes national service.<br><br>If there are several people in the household with links to the UK armed forces, you should answer for the regular. If there’s no regular, answer for the reserve. If there’s no reserve, answer for the spouse or civil partner."
@answer_options = ANSWER_OPTIONS
@question_number = 66
end
ANSWER_OPTIONS = {

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

@ -11,5 +11,6 @@ class Form::Lettings::Questions::Beds < ::Form::Question
@min = 0
@hint_text = "If shared accommodation, enter the number of bedrooms occupied by this household. A bedsit has 1 bedroom."
@step = 1
@question_number = 22
end
end

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Benefits < ::Form::Question
@check_answers_card_number = 0
@hint_text = "This excludes child and housing benefit, council tax support and tax credits."
@answer_options = ANSWER_OPTIONS
@question_number = 90
end
ANSWER_OPTIONS = {

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

@ -12,8 +12,8 @@ class Form::Lettings::Questions::Brent4Weekly < ::Form::Question
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every 4 weeks"
@question_number = 95
end
end

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

@ -12,8 +12,8 @@ class Form::Lettings::Questions::BrentBiWeekly < ::Form::Question
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every 2 weeks"
@question_number = 95
end
end

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

@ -12,8 +12,8 @@ class Form::Lettings::Questions::BrentMonthly < ::Form::Question
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every month"
@question_number = 95
end
end

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

@ -12,8 +12,8 @@ class Form::Lettings::Questions::BrentWeekly < ::Form::Question
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every week"
@question_number = 95
end
end

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Builtype < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 20
end
ANSWER_OPTIONS = {

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

@ -11,5 +11,6 @@ class Form::Lettings::Questions::Chcharge4Weekly < ::Form::Question
@step = 0.01
@prefix = "£"
@suffix = " every 4 weeks"
@question_number = 94
end
end

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

@ -11,5 +11,6 @@ class Form::Lettings::Questions::ChchargeBiWeekly < ::Form::Question
@step = 0.01
@prefix = "£"
@suffix = " every 2 weeks"
@question_number = 94
end
end

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

@ -11,5 +11,6 @@ class Form::Lettings::Questions::ChchargeMonthly < ::Form::Question
@step = 0.01
@prefix = "£"
@suffix = " every month"
@question_number = 94
end
end

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

@ -11,5 +11,6 @@ class Form::Lettings::Questions::ChchargeWeekly < ::Form::Question
@step = 0.01
@prefix = "£"
@suffix = " every week"
@question_number = 94
end
end

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::ConditionEffects < ::Form::Question
@check_answers_card_number = 0
@hint_text = "Select all that apply."
@answer_options = ANSWER_OPTIONS
@question_number = 74
end
ANSWER_OPTIONS = {

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

@ -3,11 +3,12 @@ class Form::Lettings::Questions::Declaration < ::Form::Question
super
@id = "declaration"
@check_answer_label = "Tenant has seen the privacy notice"
@header = ""
@header = "Declaration"
@type = "checkbox"
@check_answers_card_number = 0
@guidance_partial = "privacy_notice_tenant"
@answer_options = ANSWER_OPTIONS
@question_number = 30
end
ANSWER_OPTIONS = { "declaration" => { "value" => "The tenant has seen the DLUHC privacy notice" } }.freeze

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

@ -17,5 +17,6 @@ class Form::Lettings::Questions::Earnings < ::Form::Question
{ "label" => " every month", "depends_on" => { "incfreq" => 2 } },
{ "label" => " every year", "depends_on" => { "incfreq" => 3 } },
]
@question_number = 88
end
end

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::EthnicArab < ::Form::Question
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
@question_number = 35
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::EthnicAsian < ::Form::Question
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
@question_number = 35
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::EthnicBlack < ::Form::Question
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
@question_number = 35
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::EthnicGroup < ::Form::Question
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
@question_number = 34
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::EthnicMixed < ::Form::Question
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
@question_number = 35
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::EthnicWhite < ::Form::Question
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
@question_number = 35
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::FirstTimePropertyLetAsSocialHousing < ::Form::Q
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 14
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::GenderIdentity1 < ::Form::Question
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
@question_number = 33
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Hb < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 89
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Hbrentshortfall < ::Form::Question
@check_answers_card_number = 0
@hint_text = "Also known as the ‘outstanding amount’."
@answer_options = ANSWER_OPTIONS
@question_number = 99
end
ANSWER_OPTIONS = {

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

@ -11,5 +11,6 @@ class Form::Lettings::Questions::Hhmemb < ::Form::Question
@min = 1
@hint_text = "You can provide details for a maximum of 8 people."
@step = 1
@question_number = 31
end
end

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Homeless < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 79
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::HouseholdCharge < ::Form::Question
@check_answers_card_number = 0
@hint_text = "If rent is charged on the property then answer Yes to this question, even if the tenants do not pay it themselves."
@answer_options = ANSWER_OPTIONS
@question_number = 91
end
ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Housingneeds < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 70
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::HousingneedsOther < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 72
end
ANSWER_OPTIONS = { "1" => { "value" => "Yes" }, "0" => { "value" => "No" } }.freeze

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::HousingneedsType < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 71
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Illness < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 73
end
ANSWER_OPTIONS = {

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

@ -9,6 +9,7 @@ class Form::Lettings::Questions::Incfreq < ::Form::Question
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@hidden_in_check_answers = true
@question_number = 87
end
ANSWER_OPTIONS = {

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

@ -5,5 +5,6 @@ class Form::Lettings::Questions::IrproductOther < ::Form::Question
@check_answer_label = "Product name"
@header = "Name of rent product"
@type = "text"
@question_number = 6
end
end

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

@ -9,6 +9,7 @@ class Form::Lettings::Questions::IsCarehome < ::Form::Question
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@conditional_for = { "chcharge" => [1] }
@question_number = 93
end
ANSWER_OPTIONS = { "0" => { "value" => "No" }, "1" => { "value" => "Yes" } }.freeze

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Joint < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 25
end
ANSWER_OPTIONS = {

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

@ -7,6 +7,7 @@ class Form::Lettings::Questions::La < ::Form::Question
@type = "select"
@check_answers_card_number = 0
@hint_text = ""
@question_number = 13
end
def answer_options

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Layear < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 75
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Leftreg < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 67
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::LettingAllocation < ::Form::Question
@check_answers_card_number = 0
@hint_text = "Select all that apply."
@answer_options = ANSWER_OPTIONS
@question_number = 84
end
ANSWER_OPTIONS = {

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

@ -10,6 +10,7 @@ class Form::Lettings::Questions::LocationId < ::Form::Question
"needstype": 2,
},
}
@question_number = 10
end
def answer_options

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

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

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

@ -5,6 +5,7 @@ class Form::Lettings::Questions::ManagingOrganisation < ::Form::Question
@check_answer_label = "Managing agent"
@header = "Which organisation manages this letting?"
@type = "select"
@question_number = 2
end
def answer_options(log = nil, user = nil)

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

@ -7,5 +7,6 @@ class Form::Lettings::Questions::Mrcdate < ::Form::Question
@type = "date"
@check_answers_card_number = 0
@hint_text = "For example, 27 3 2021."
@question_number = 24
end
end

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Nationality < ::Form::Question
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
@question_number = 36
end
ANSWER_OPTIONS = {

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

@ -7,6 +7,7 @@ class Form::Lettings::Questions::NeedsType < ::Form::Question
@hint_text = "General needs housing includes both self-contained and shared housing without support or specific adaptations. Supported housing can include direct access hostels, group homes, residential care and nursing homes."
@type = "radio"
@answer_options = ANSWER_OPTIONS
@question_number = 3
end
ANSWER_OPTIONS = {

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

@ -9,6 +9,7 @@ class Form::Lettings::Questions::NetIncomeKnown < ::Form::Question
@guidance_partial = "what_counts_as_income"
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 86
end
ANSWER_OPTIONS = {

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

@ -11,5 +11,6 @@ class Form::Lettings::Questions::Offered < ::Form::Question
@min = 0
@hint_text = I18n.t("hints.offered")
@step = 1
@question_number = 18
end
end

1
app/models/form/lettings/questions/offered_social_let.rb

@ -11,5 +11,6 @@ class Form::Lettings::Questions::OfferedSocialLet < ::Form::Question
@min = 0
@hint_text = I18n.t("hints.offered")
@step = 1
@question_number = 18
end
end

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Period < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 92
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::PersonGenderIdentity < ::Form::Question
@check_answers_card_number = person_index
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 32 + (4 * person_index)
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::PersonRelationship < ::Form::Question
@check_answers_card_number = person_index
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 30 + (4 * person_index)
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::PersonWorkingSituation < ::Form::Question
@check_answers_card_number = person_index
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 33 + (4 * person_index)
end
ANSWER_OPTIONS = {

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

@ -10,6 +10,7 @@ class Form::Lettings::Questions::Ppcodenk < ::Form::Question
@answer_options = ANSWER_OPTIONS
@conditional_for = { "ppostcode_full" => [1] }
@hidden_in_check_answers = { "depends_on" => [{ "ppcodenk" => 0 }, { "ppcodenk" => 1 }] }
@question_number = 80
end
ANSWER_OPTIONS = { "1" => { "value" => "Yes" }, "0" => { "value" => "No" } }.freeze

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

@ -10,5 +10,6 @@ class Form::Lettings::Questions::PpostcodeFull < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@inferred_answers = { "prevloc" => { "is_previous_la_inferred" => true } }
@question_number = 80
end
end

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::PregOcc < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 69
end
ANSWER_OPTIONS = {

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

@ -10,6 +10,7 @@ class Form::Lettings::Questions::PreviousLaKnown < ::Form::Question
@answer_options = ANSWER_OPTIONS
@conditional_for = { "prevloc" => [1] }
@hidden_in_check_answers = { "depends_on" => [{ "previous_la_known" => 0 }, { "previous_la_known" => 1 }] }
@question_number = 81
end
ANSWER_OPTIONS = { "1" => { "value" => "Yes" }, "0" => { "value" => "No" } }.freeze

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::PreviousLetType < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 16
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::PreviousTenure < ::Form::Question
@check_answers_card_number = 0
@hint_text = "This is where the household was the night before they moved."
@answer_options = ANSWER_OPTIONS
@question_number = 78
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::PreviousTenureRenewal < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 78
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Prevloc < ::Form::Question
@inferred_check_answers_value = [{ "condition" => { "previous_la_known" => 0 }, "value" => "Not known" }]
@check_answers_card_number = 0
@hint_text = "Select ‘Northern Ireland’, ‘Scotland’, ‘Wales’ or ‘Outside the UK’ if the household’s last settled home was outside England."
@question_number = 81
end
def answer_options

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

@ -7,5 +7,6 @@ class Form::Lettings::Questions::PropertyReference < ::Form::Question
@hint_text = "This is how you usually refer to this property on your own systems."
@type = "text"
@width = 10
@question_number = 8
end
end

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

@ -12,8 +12,8 @@ class Form::Lettings::Questions::Pscharge4Weekly < ::Form::Question
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every 4 weeks"
@question_number = 97
end
end

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

@ -12,8 +12,8 @@ class Form::Lettings::Questions::PschargeBiWeekly < ::Form::Question
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every 2 weeks"
@question_number = 97
end
end

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

@ -12,8 +12,8 @@ class Form::Lettings::Questions::PschargeMonthly < ::Form::Question
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every month"
@question_number = 97
end
end

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

@ -12,8 +12,8 @@ class Form::Lettings::Questions::PschargeWeekly < ::Form::Question
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every week"
@question_number = 97
end
end

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

@ -13,6 +13,7 @@ class Form::Lettings::Questions::Reason < ::Form::Question
20,
],
}
@question_number = 77
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::ReasonRenewal < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 77
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::ReasonablePreferenceReason < ::Form::Question
@check_answers_card_number = 0
@hint_text = "Select all that apply."
@answer_options = ANSWER_OPTIONS
@question_number = 83
end
ANSWER_OPTIONS = {

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

@ -7,5 +7,6 @@ class Form::Lettings::Questions::Reasonother < ::Form::Question
@type = "text"
@check_answers_card_number = 0
@hint_text = ""
@question_number = 77
end
end

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Reasonpref < ::Form::Question
@check_answers_card_number = 0
@hint_text = "Households may be given ‘reasonable preference’ for social housing, also known as ‘priority need’, by the local authority."
@answer_options = ANSWER_OPTIONS
@question_number = 82
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Referral < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 85
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::ReferralPrp < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 85
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::ReferralSupportedHousing < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 85
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::ReferralSupportedHousingPrp < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 85
end
ANSWER_OPTIONS = {

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

@ -7,6 +7,7 @@ class Form::Lettings::Questions::Renewal < ::Form::Question
@type = "radio"
@answer_options = ANSWER_OPTIONS
@hint_text = "A renewal is a letting to the same tenant in the same property"
@question_number = 4
end
ANSWER_OPTIONS = {

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

@ -7,6 +7,7 @@ class Form::Lettings::Questions::RentType < ::Form::Question
@type = "radio"
@answer_options = ANSWER_OPTIONS
@conditional_for = { "irproduct_other" => [5] }
@question_number = 6
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Reservist < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 68
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Rsnvac < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 17
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::RsnvacFirstLet < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 15
end
ANSWER_OPTIONS = {

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

@ -12,8 +12,8 @@ class Form::Lettings::Questions::Scharge4Weekly < ::Form::Question
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every 4 weeks"
@question_number = 96
end
end

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

@ -12,8 +12,8 @@ class Form::Lettings::Questions::SchargeBiWeekly < ::Form::Question
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every 2 weeks"
@question_number = 96
end
end

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

@ -12,8 +12,8 @@ class Form::Lettings::Questions::SchargeMonthly < ::Form::Question
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every month"
@question_number = 96
end
end

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

@ -12,8 +12,8 @@ class Form::Lettings::Questions::SchargeWeekly < ::Form::Question
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every week"
@question_number = 96
end
end

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::SchemeId < ::Form::Question
@answer_options = answer_options
@guidance_position = GuidancePosition::BOTTOM
@guidance_partial = "scheme_selection"
@question_number = 9
end
def answer_options

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Sheltered < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 29
end
ANSWER_OPTIONS = {

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

@ -9,6 +9,7 @@ class Form::Lettings::Questions::StarterTenancyType < ::Form::Question
@hint_text = "This is also known as an ‘introductory period’."
@answer_options = ANSWER_OPTIONS
@conditional_for = { "tenancyother" => [3] }
@question_number = 27
end
ANSWER_OPTIONS = {

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

@ -8,6 +8,7 @@ class Form::Lettings::Questions::Startertenancy < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 26
end
ANSWER_OPTIONS = { "1" => { "value" => "Yes" }, "2" => { "value" => "No" } }.freeze

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

@ -5,6 +5,7 @@ class Form::Lettings::Questions::StockOwner < ::Form::Question
@check_answer_label = "Stock owner"
@header = "Which organisation owns this property?"
@type = "select"
@question_number = 1
end
def answer_options(log = nil, user = nil)

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

@ -12,8 +12,8 @@ class Form::Lettings::Questions::Supcharg4Weekly < ::Form::Question
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every 4 weeks"
@question_number = 98
end
end

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

@ -12,8 +12,8 @@ class Form::Lettings::Questions::SupchargBiWeekly < ::Form::Question
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every 2 weeks"
@question_number = 98
end
end

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

@ -12,8 +12,8 @@ class Form::Lettings::Questions::SupchargMonthly < ::Form::Question
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every month"
@question_number = 98
end
end

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

Loading…
Cancel
Save