Browse Source

Merge branch 'main' into CLDC-1917-startdate-validation

# Conflicts:
#	spec/models/lettings_log_spec.rb
pull/1378/head
natdeanlewissoftwire 3 years ago
parent
commit
f920c445e8
  1. 1
      .env.example
  2. 2
      .env.test
  3. 2
      .github/workflows/production_pipeline.yml
  4. 2
      .github/workflows/review_pipeline.yml
  5. 2
      .github/workflows/staging_pipeline.yml
  6. 2
      app/components/check_answers_summary_list_card_component.html.erb
  7. 4
      app/components/check_answers_summary_list_card_component.rb
  8. 2
      app/controllers/form_controller.rb
  9. 4
      app/helpers/check_answers_helper.rb
  10. 8
      app/helpers/question_view_helper.rb
  11. 4
      app/mailers/bulk_upload_mailer.rb
  12. 9
      app/models/derived_variables/sales_log_variables.rb
  13. 2
      app/models/form.rb
  14. 1
      app/models/form/lettings/questions/age.rb
  15. 1
      app/models/form/lettings/questions/age1.rb
  16. 1
      app/models/form/lettings/questions/age1_known.rb
  17. 1
      app/models/form/lettings/questions/age_known.rb
  18. 1
      app/models/form/lettings/questions/armedforces.rb
  19. 1
      app/models/form/lettings/questions/beds.rb
  20. 1
      app/models/form/lettings/questions/benefits.rb
  21. 2
      app/models/form/lettings/questions/brent_4_weekly.rb
  22. 2
      app/models/form/lettings/questions/brent_bi_weekly.rb
  23. 2
      app/models/form/lettings/questions/brent_monthly.rb
  24. 2
      app/models/form/lettings/questions/brent_weekly.rb
  25. 1
      app/models/form/lettings/questions/builtype.rb
  26. 1
      app/models/form/lettings/questions/chcharge_4_weekly.rb
  27. 1
      app/models/form/lettings/questions/chcharge_bi_weekly.rb
  28. 1
      app/models/form/lettings/questions/chcharge_monthly.rb
  29. 1
      app/models/form/lettings/questions/chcharge_weekly.rb
  30. 1
      app/models/form/lettings/questions/condition_effects.rb
  31. 3
      app/models/form/lettings/questions/declaration.rb
  32. 1
      app/models/form/lettings/questions/earnings.rb
  33. 1
      app/models/form/lettings/questions/ethnic_arab.rb
  34. 1
      app/models/form/lettings/questions/ethnic_asian.rb
  35. 1
      app/models/form/lettings/questions/ethnic_black.rb
  36. 1
      app/models/form/lettings/questions/ethnic_group.rb
  37. 1
      app/models/form/lettings/questions/ethnic_mixed.rb
  38. 1
      app/models/form/lettings/questions/ethnic_white.rb
  39. 1
      app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb
  40. 1
      app/models/form/lettings/questions/gender_identity1.rb
  41. 1
      app/models/form/lettings/questions/hb.rb
  42. 1
      app/models/form/lettings/questions/hbrentshortfall.rb
  43. 1
      app/models/form/lettings/questions/hhmemb.rb
  44. 1
      app/models/form/lettings/questions/homeless.rb
  45. 1
      app/models/form/lettings/questions/household_charge.rb
  46. 1
      app/models/form/lettings/questions/housingneeds.rb
  47. 1
      app/models/form/lettings/questions/housingneeds_other.rb
  48. 1
      app/models/form/lettings/questions/housingneeds_type.rb
  49. 1
      app/models/form/lettings/questions/illness.rb
  50. 1
      app/models/form/lettings/questions/incfreq.rb
  51. 1
      app/models/form/lettings/questions/irproduct_other.rb
  52. 1
      app/models/form/lettings/questions/is_carehome.rb
  53. 1
      app/models/form/lettings/questions/joint.rb
  54. 1
      app/models/form/lettings/questions/la.rb
  55. 1
      app/models/form/lettings/questions/layear.rb
  56. 1
      app/models/form/lettings/questions/leftreg.rb
  57. 1
      app/models/form/lettings/questions/letting_allocation.rb
  58. 1
      app/models/form/lettings/questions/location_id.rb
  59. 1
      app/models/form/lettings/questions/majorrepairs.rb
  60. 1
      app/models/form/lettings/questions/managing_organisation.rb
  61. 1
      app/models/form/lettings/questions/mrcdate.rb
  62. 1
      app/models/form/lettings/questions/nationality.rb
  63. 1
      app/models/form/lettings/questions/needs_type.rb
  64. 1
      app/models/form/lettings/questions/net_income_known.rb
  65. 1
      app/models/form/lettings/questions/offered.rb
  66. 1
      app/models/form/lettings/questions/offered_social_let.rb
  67. 1
      app/models/form/lettings/questions/period.rb
  68. 1
      app/models/form/lettings/questions/person_gender_identity.rb
  69. 1
      app/models/form/lettings/questions/person_relationship.rb
  70. 1
      app/models/form/lettings/questions/person_working_situation.rb
  71. 1
      app/models/form/lettings/questions/ppcodenk.rb
  72. 1
      app/models/form/lettings/questions/ppostcode_full.rb
  73. 1
      app/models/form/lettings/questions/preg_occ.rb
  74. 1
      app/models/form/lettings/questions/previous_la_known.rb
  75. 1
      app/models/form/lettings/questions/previous_let_type.rb
  76. 1
      app/models/form/lettings/questions/previous_tenure.rb
  77. 1
      app/models/form/lettings/questions/previous_tenure_renewal.rb
  78. 1
      app/models/form/lettings/questions/prevloc.rb
  79. 1
      app/models/form/lettings/questions/property_reference.rb
  80. 2
      app/models/form/lettings/questions/pscharge_4_weekly.rb
  81. 2
      app/models/form/lettings/questions/pscharge_bi_weekly.rb
  82. 2
      app/models/form/lettings/questions/pscharge_monthly.rb
  83. 2
      app/models/form/lettings/questions/pscharge_weekly.rb
  84. 1
      app/models/form/lettings/questions/reason.rb
  85. 1
      app/models/form/lettings/questions/reason_renewal.rb
  86. 1
      app/models/form/lettings/questions/reasonable_preference_reason.rb
  87. 1
      app/models/form/lettings/questions/reasonother.rb
  88. 1
      app/models/form/lettings/questions/reasonpref.rb
  89. 1
      app/models/form/lettings/questions/referral.rb
  90. 1
      app/models/form/lettings/questions/referral_prp.rb
  91. 1
      app/models/form/lettings/questions/referral_supported_housing.rb
  92. 1
      app/models/form/lettings/questions/referral_supported_housing_prp.rb
  93. 1
      app/models/form/lettings/questions/renewal.rb
  94. 1
      app/models/form/lettings/questions/rent_type.rb
  95. 1
      app/models/form/lettings/questions/reservist.rb
  96. 1
      app/models/form/lettings/questions/rsnvac.rb
  97. 1
      app/models/form/lettings/questions/rsnvac_first_let.rb
  98. 2
      app/models/form/lettings/questions/scharge_4_weekly.rb
  99. 2
      app/models/form/lettings/questions/scharge_bi_weekly.rb
  100. 2
      app/models/form/lettings/questions/scharge_monthly.rb
  101. Some files were not shown because too many files have changed in this diff Show More

1
.env.example

@ -5,3 +5,4 @@ GOVUK_NOTIFY_API_KEY=<notify-key-here-if-testing-emails-or-admin-users>
OTP_SECRET_ENCRYPTION_KEY="<Generate this using bundle exec rake secret>" OTP_SECRET_ENCRYPTION_KEY="<Generate this using bundle exec rake secret>"
APP_HOST="http://localhost:3000" APP_HOST="http://localhost:3000"
OS_DATA_KEY=OS_DATA_KEY

2
.env.test

@ -0,0 +1,2 @@
APP_HOST="http://localhost:3000"
OS_DATA_KEY=OS_DATA_KEY

2
.github/workflows/production_pipeline.yml

@ -237,6 +237,7 @@ jobs:
GOVUK_NOTIFY_API_KEY: ${{ secrets.GOVUK_NOTIFY_API_KEY }} GOVUK_NOTIFY_API_KEY: ${{ secrets.GOVUK_NOTIFY_API_KEY }}
APP_HOST: ${{ secrets.APP_HOST }} APP_HOST: ${{ secrets.APP_HOST }}
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
OS_DATA_KEY: ${{ secrets.OS_DATA_KEY }}
IMPORT_PAAS_INSTANCE: ${{ secrets.IMPORT_PAAS_INSTANCE }} IMPORT_PAAS_INSTANCE: ${{ secrets.IMPORT_PAAS_INSTANCE }}
EXPORT_PAAS_INSTANCE: ${{ secrets.EXPORT_PAAS_INSTANCE }} EXPORT_PAAS_INSTANCE: ${{ secrets.EXPORT_PAAS_INSTANCE }}
S3_CONFIG: ${{ secrets.S3_CONFIG }} S3_CONFIG: ${{ secrets.S3_CONFIG }}
@ -249,6 +250,7 @@ jobs:
cf set-env $APP_NAME GOVUK_NOTIFY_API_KEY $GOVUK_NOTIFY_API_KEY cf set-env $APP_NAME GOVUK_NOTIFY_API_KEY $GOVUK_NOTIFY_API_KEY
cf set-env $APP_NAME APP_HOST $APP_HOST cf set-env $APP_NAME APP_HOST $APP_HOST
cf set-env $APP_NAME RAILS_MASTER_KEY $RAILS_MASTER_KEY cf set-env $APP_NAME RAILS_MASTER_KEY $RAILS_MASTER_KEY
cf set-env $APP_NAME OS_DATA_KEY $OS_DATA_KEY
cf set-env $APP_NAME IMPORT_PAAS_INSTANCE $IMPORT_PAAS_INSTANCE cf set-env $APP_NAME IMPORT_PAAS_INSTANCE $IMPORT_PAAS_INSTANCE
cf set-env $APP_NAME EXPORT_PAAS_INSTANCE $EXPORT_PAAS_INSTANCE cf set-env $APP_NAME EXPORT_PAAS_INSTANCE $EXPORT_PAAS_INSTANCE
cf set-env $APP_NAME S3_CONFIG $S3_CONFIG cf set-env $APP_NAME S3_CONFIG $S3_CONFIG

2
.github/workflows/review_pipeline.yml

@ -110,6 +110,7 @@ jobs:
API_KEY: ${{ secrets.API_KEY }} API_KEY: ${{ secrets.API_KEY }}
GOVUK_NOTIFY_API_KEY: ${{ secrets.GOVUK_NOTIFY_API_KEY }} GOVUK_NOTIFY_API_KEY: ${{ secrets.GOVUK_NOTIFY_API_KEY }}
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
OS_DATA_KEY: ${{ secrets.OS_DATA_KEY }}
IMPORT_PAAS_INSTANCE: ${{ secrets.IMPORT_PAAS_INSTANCE }} IMPORT_PAAS_INSTANCE: ${{ secrets.IMPORT_PAAS_INSTANCE }}
EXPORT_PAAS_INSTANCE: ${{ secrets.EXPORT_PAAS_INSTANCE }} EXPORT_PAAS_INSTANCE: ${{ secrets.EXPORT_PAAS_INSTANCE }}
S3_CONFIG: ${{ secrets.S3_CONFIG }} S3_CONFIG: ${{ secrets.S3_CONFIG }}
@ -120,6 +121,7 @@ jobs:
cf set-env $APP_NAME API_KEY $API_KEY cf set-env $APP_NAME API_KEY $API_KEY
cf set-env $APP_NAME GOVUK_NOTIFY_API_KEY $GOVUK_NOTIFY_API_KEY cf set-env $APP_NAME GOVUK_NOTIFY_API_KEY $GOVUK_NOTIFY_API_KEY
cf set-env $APP_NAME RAILS_MASTER_KEY $RAILS_MASTER_KEY cf set-env $APP_NAME RAILS_MASTER_KEY $RAILS_MASTER_KEY
cf set-env $APP_NAME OS_DATA_KEY $OS_DATA_KEY
cf set-env $APP_NAME IMPORT_PAAS_INSTANCE $IMPORT_PAAS_INSTANCE cf set-env $APP_NAME IMPORT_PAAS_INSTANCE $IMPORT_PAAS_INSTANCE
cf set-env $APP_NAME EXPORT_PAAS_INSTANCE "dluhc-core-review-export-bucket" cf set-env $APP_NAME EXPORT_PAAS_INSTANCE "dluhc-core-review-export-bucket"
cf set-env $APP_NAME S3_CONFIG $S3_CONFIG cf set-env $APP_NAME S3_CONFIG $S3_CONFIG

2
.github/workflows/staging_pipeline.yml

@ -208,6 +208,7 @@ jobs:
GOVUK_NOTIFY_API_KEY: ${{ secrets.GOVUK_NOTIFY_API_KEY }} GOVUK_NOTIFY_API_KEY: ${{ secrets.GOVUK_NOTIFY_API_KEY }}
APP_HOST: ${{ secrets.APP_HOST }} APP_HOST: ${{ secrets.APP_HOST }}
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
OS_DATA_KEY: ${{ secrets.OS_DATA_KEY }}
IMPORT_PAAS_INSTANCE: ${{ secrets.IMPORT_PAAS_INSTANCE }} IMPORT_PAAS_INSTANCE: ${{ secrets.IMPORT_PAAS_INSTANCE }}
EXPORT_PAAS_INSTANCE: ${{ secrets.EXPORT_PAAS_INSTANCE }} EXPORT_PAAS_INSTANCE: ${{ secrets.EXPORT_PAAS_INSTANCE }}
S3_CONFIG: ${{ secrets.S3_CONFIG }} S3_CONFIG: ${{ secrets.S3_CONFIG }}
@ -222,6 +223,7 @@ jobs:
cf set-env $APP_NAME GOVUK_NOTIFY_API_KEY $GOVUK_NOTIFY_API_KEY cf set-env $APP_NAME GOVUK_NOTIFY_API_KEY $GOVUK_NOTIFY_API_KEY
cf set-env $APP_NAME APP_HOST $APP_HOST cf set-env $APP_NAME APP_HOST $APP_HOST
cf set-env $APP_NAME RAILS_MASTER_KEY $RAILS_MASTER_KEY cf set-env $APP_NAME RAILS_MASTER_KEY $RAILS_MASTER_KEY
cf set-env $APP_NAME OS_DATA_KEY $OS_DATA_KEY
cf set-env $APP_NAME IMPORT_PAAS_INSTANCE $IMPORT_PAAS_INSTANCE cf set-env $APP_NAME IMPORT_PAAS_INSTANCE $IMPORT_PAAS_INSTANCE
cf set-env $APP_NAME EXPORT_PAAS_INSTANCE $EXPORT_PAAS_INSTANCE cf set-env $APP_NAME EXPORT_PAAS_INSTANCE $EXPORT_PAAS_INSTANCE
cf set-env $APP_NAME S3_CONFIG $S3_CONFIG cf set-env $APP_NAME S3_CONFIG $S3_CONFIG

2
app/components/check_answers_summary_list_card_component.html.erb

@ -10,7 +10,7 @@
<%= govuk_summary_list do |summary_list| %> <%= govuk_summary_list do |summary_list| %>
<% applicable_questions.each do |question| %> <% applicable_questions.each do |question| %>
<% summary_list.row do |row| %> <% 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 %> <% row.value do %>
<span class="govuk-!-margin-right-4"><%= get_answer_label(question) %></span> <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 question.answer_label(log, user).presence || unanswered_value
end 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) def check_answers_card_title(question)
return "Lead tenant" if question.form.type == "lettings" && question.check_answers_card_number == 1 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 return "Buyer #{question.check_answers_card_number}" if question.check_answers_card_number <= number_of_buyers

2
app/controllers/form_controller.rb

@ -160,7 +160,7 @@ private
end end
def question_is_required?(question) def question_is_required?(question)
@log.class::OPTIONAL_FIELDS.exclude?(question.id) && required_questions.include?(question.id) @log.optional_fields.exclude?(question.id) && required_questions.include?(question.id)
end end
def required_questions def required_questions

4
app/helpers/check_answers_helper.rb

@ -45,4 +45,8 @@ private
def get_answer_label(question, lettings_log) 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 question.answer_label(lettings_log, current_user).presence || "<span class=\"app-!-colour-muted\">You didn’t answer this question</span>".html_safe
end 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 end

8
app/helpers/question_view_helper.rb

@ -7,15 +7,17 @@ module QuestionViewHelper
def legend(question, page_header, conditional) 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), size: label_size(page_header, conditional, question),
tag: label_tag(page_header, conditional), tag: label_tag(page_header, conditional),
} }
end end
private private
def label_size(page_header, conditional) def label_size(page_header, conditional, question)
return if question.plain_label.present?
page_header.blank? && !conditional ? "l" : "m" page_header.blank? && !conditional ? "l" : "m"
end end

4
app/mailers/bulk_upload_mailer.rb

@ -26,7 +26,7 @@ class BulkUploadMailer < NotifyMailer
{ {
title:, title:,
filename: bulk_upload.filename, filename: bulk_upload.filename,
upload_timestamp: bulk_upload.created_at, upload_timestamp: bulk_upload.created_at.to_fs(:govuk_date_and_time),
success_description:, success_description:,
logs_link: url, logs_link: url,
}, },
@ -112,7 +112,7 @@ class BulkUploadMailer < NotifyMailer
BULK_UPLOAD_FAILED_SERVICE_ERROR_TEMPLATE_ID, BULK_UPLOAD_FAILED_SERVICE_ERROR_TEMPLATE_ID,
{ {
filename: bulk_upload.filename, filename: bulk_upload.filename,
upload_timestamp: bulk_upload.created_at, upload_timestamp: bulk_upload.created_at.to_fs(:govuk_date_and_time),
lettings_or_sales: bulk_upload.log_type, lettings_or_sales: bulk_upload.log_type,
year_combo: bulk_upload.year_combo, year_combo: bulk_upload.year_combo,
errors: errors.map { |e| "- #{e}" }.join("\n"), errors: errors.map { |e| "- #{e}" }.join("\n"),

9
app/models/derived_variables/sales_log_variables.rb

@ -23,6 +23,15 @@ module DerivedVariables::SalesLogVariables
self.totadult = total_adult + total_elder self.totadult = total_adult + total_elder
self.hhmemb = number_of_household_members self.hhmemb = number_of_household_members
self.hhtype = household_type self.hhtype = household_type
if uprn_known&.zero?
self.uprn = nil
end
if uprn_confirmed&.zero?
self.uprn = nil
self.uprn_known = 0
end
end end
private private

2
app/models/form.rb

@ -160,7 +160,7 @@ class Form
def invalidated_page_questions(log, current_user = nil) def invalidated_page_questions(log, current_user = nil)
# we're already treating these fields as a special case and reset their values upon saving a log # we're already treating these fields as a special case and reset their values upon saving a log
callback_questions = %w[postcode_known la ppcodenk previous_la_known prevloc postcode_full ppostcode_full location_id] callback_questions = %w[postcode_known la ppcodenk previous_la_known prevloc postcode_full ppostcode_full location_id address_line1 address_line2 town_or_city county]
questions.reject { |q| q.page.routed_to?(log, current_user) || q.derived? || callback_questions.include?(q.id) } || [] questions.reject { |q| q.page.routed_to?(log, current_user) || q.derived? || callback_questions.include?(q.id) } || []
end end

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

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

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

@ -11,5 +11,6 @@ class Form::Lettings::Questions::Age1 < ::Form::Question
@max = 120 @max = 120
@min = 16 @min = 16
@step = 1 @step = 1
@question_number = 32
end end
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 @answer_options = ANSWER_OPTIONS
@conditional_for = { "age1" => [0] } @conditional_for = { "age1" => [0] }
@hidden_in_check_answers = { "depends_on" => [{ "age1_known" => 0 }, { "age1_known" => 1 }] } @hidden_in_check_answers = { "depends_on" => [{ "age1_known" => 0 }, { "age1_known" => 1 }] }
@question_number = 32
end end
ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze 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 }, { "age#{person_index}_known" => 1 },
], ],
} }
@question_number = 31 + (4 * person_index)
end end
ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze 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 @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." @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 @answer_options = ANSWER_OPTIONS
@question_number = 66
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

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

@ -11,5 +11,6 @@ class Form::Lettings::Questions::Beds < ::Form::Question
@min = 0 @min = 0
@hint_text = "If shared accommodation, enter the number of bedrooms occupied by this household. A bedsit has 1 bedroom." @hint_text = "If shared accommodation, enter the number of bedrooms occupied by this household. A bedsit has 1 bedroom."
@step = 1 @step = 1
@question_number = 22
end end
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 @check_answers_card_number = 0
@hint_text = "This excludes child and housing benefit, council tax support and tax credits." @hint_text = "This excludes child and housing benefit, council tax support and tax credits."
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 90
end end
ANSWER_OPTIONS = { 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 @step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg] @fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge" @result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£" @prefix = "£"
@suffix = " every 4 weeks" @suffix = " every 4 weeks"
@question_number = 95
end end
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 @step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg] @fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge" @result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£" @prefix = "£"
@suffix = " every 2 weeks" @suffix = " every 2 weeks"
@question_number = 95
end end
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 @step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg] @fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge" @result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£" @prefix = "£"
@suffix = " every month" @suffix = " every month"
@question_number = 95
end end
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 @step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg] @fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge" @result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£" @prefix = "£"
@suffix = " every week" @suffix = " every week"
@question_number = 95
end end
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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 20
end end
ANSWER_OPTIONS = { 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 @step = 0.01
@prefix = "£" @prefix = "£"
@suffix = " every 4 weeks" @suffix = " every 4 weeks"
@question_number = 94
end end
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 @step = 0.01
@prefix = "£" @prefix = "£"
@suffix = " every 2 weeks" @suffix = " every 2 weeks"
@question_number = 94
end end
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 @step = 0.01
@prefix = "£" @prefix = "£"
@suffix = " every month" @suffix = " every month"
@question_number = 94
end end
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 @step = 0.01
@prefix = "£" @prefix = "£"
@suffix = " every week" @suffix = " every week"
@question_number = 94
end end
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 @check_answers_card_number = 0
@hint_text = "Select all that apply." @hint_text = "Select all that apply."
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 74
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

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

@ -3,11 +3,12 @@ class Form::Lettings::Questions::Declaration < ::Form::Question
super super
@id = "declaration" @id = "declaration"
@check_answer_label = "Tenant has seen the privacy notice" @check_answer_label = "Tenant has seen the privacy notice"
@header = "" @header = "Declaration"
@type = "checkbox" @type = "checkbox"
@check_answers_card_number = 0 @check_answers_card_number = 0
@guidance_partial = "privacy_notice_tenant" @guidance_partial = "privacy_notice_tenant"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 30
end end
ANSWER_OPTIONS = { "declaration" => { "value" => "The tenant has seen the DLUHC privacy notice" } }.freeze 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 month", "depends_on" => { "incfreq" => 2 } },
{ "label" => " every year", "depends_on" => { "incfreq" => 3 } }, { "label" => " every year", "depends_on" => { "incfreq" => 3 } },
] ]
@question_number = 88
end end
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 @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." @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 @answer_options = ANSWER_OPTIONS
@question_number = 35
end end
ANSWER_OPTIONS = { 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 @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." @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 @answer_options = ANSWER_OPTIONS
@question_number = 35
end end
ANSWER_OPTIONS = { 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 @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." @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 @answer_options = ANSWER_OPTIONS
@question_number = 35
end end
ANSWER_OPTIONS = { 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 @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." @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 @answer_options = ANSWER_OPTIONS
@question_number = 34
end end
ANSWER_OPTIONS = { 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 @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." @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 @answer_options = ANSWER_OPTIONS
@question_number = 35
end end
ANSWER_OPTIONS = { 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 @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." @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 @answer_options = ANSWER_OPTIONS
@question_number = 35
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 14
end end
ANSWER_OPTIONS = { 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 @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." @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 @answer_options = ANSWER_OPTIONS
@question_number = 33
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 89
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "Also known as the ‘outstanding amount’." @hint_text = "Also known as the ‘outstanding amount’."
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 99
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

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

@ -11,5 +11,6 @@ class Form::Lettings::Questions::Hhmemb < ::Form::Question
@min = 1 @min = 1
@hint_text = "You can provide details for a maximum of 8 people." @hint_text = "You can provide details for a maximum of 8 people."
@step = 1 @step = 1
@question_number = 31
end end
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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 79
end end
ANSWER_OPTIONS = { 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 @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." @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 @answer_options = ANSWER_OPTIONS
@question_number = 91
end end
ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 70
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 72
end end
ANSWER_OPTIONS = { "1" => { "value" => "Yes" }, "0" => { "value" => "No" } }.freeze 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 71
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 73
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

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

@ -9,6 +9,7 @@ class Form::Lettings::Questions::Incfreq < ::Form::Question
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@hidden_in_check_answers = true @hidden_in_check_answers = true
@question_number = 87
end end
ANSWER_OPTIONS = { 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" @check_answer_label = "Product name"
@header = "Name of rent product" @header = "Name of rent product"
@type = "text" @type = "text"
@question_number = 6
end end
end end

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

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

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

@ -7,6 +7,7 @@ class Form::Lettings::Questions::La < ::Form::Question
@type = "select" @type = "select"
@check_answers_card_number = 0 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@question_number = 13
end end
def answer_options 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 75
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 67
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "Select all that apply." @hint_text = "Select all that apply."
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 84
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

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

@ -10,6 +10,7 @@ class Form::Lettings::Questions::LocationId < ::Form::Question
"needstype": 2, "needstype": 2,
}, },
} }
@question_number = 10
end end
def answer_options 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." @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 = 24
end end
ANSWER_OPTIONS = { "1" => { "value" => "Yes" }, "0" => { "value" => "No" } }.freeze 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" @check_answer_label = "Managing agent"
@header = "Which organisation manages this letting?" @header = "Which organisation manages this letting?"
@type = "select" @type = "select"
@question_number = 2
end end
def answer_options(log = nil, user = nil) 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" @type = "date"
@check_answers_card_number = 0 @check_answers_card_number = 0
@hint_text = "For example, 27 3 2021." @hint_text = "For example, 27 3 2021."
@question_number = 24
end end
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 @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." @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 @answer_options = ANSWER_OPTIONS
@question_number = 36
end end
ANSWER_OPTIONS = { 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." @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" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 3
end end
ANSWER_OPTIONS = { 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" @guidance_partial = "what_counts_as_income"
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 86
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

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

@ -11,5 +11,6 @@ class Form::Lettings::Questions::Offered < ::Form::Question
@min = 0 @min = 0
@hint_text = I18n.t("hints.offered") @hint_text = I18n.t("hints.offered")
@step = 1 @step = 1
@question_number = 18
end end
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 @min = 0
@hint_text = I18n.t("hints.offered") @hint_text = I18n.t("hints.offered")
@step = 1 @step = 1
@question_number = 18
end end
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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 92
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = person_index
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 32 + (4 * person_index)
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = person_index
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 30 + (4 * person_index)
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = person_index
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 33 + (4 * person_index)
end end
ANSWER_OPTIONS = { 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 @answer_options = ANSWER_OPTIONS
@conditional_for = { "ppostcode_full" => [1] } @conditional_for = { "ppostcode_full" => [1] }
@hidden_in_check_answers = { "depends_on" => [{ "ppcodenk" => 0 }, { "ppcodenk" => 1 }] } @hidden_in_check_answers = { "depends_on" => [{ "ppcodenk" => 0 }, { "ppcodenk" => 1 }] }
@question_number = 80
end end
ANSWER_OPTIONS = { "1" => { "value" => "Yes" }, "0" => { "value" => "No" } }.freeze 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@inferred_answers = { "prevloc" => { "is_previous_la_inferred" => true } } @inferred_answers = { "prevloc" => { "is_previous_la_inferred" => true } }
@question_number = 80
end end
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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 69
end end
ANSWER_OPTIONS = { 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 @answer_options = ANSWER_OPTIONS
@conditional_for = { "prevloc" => [1] } @conditional_for = { "prevloc" => [1] }
@hidden_in_check_answers = { "depends_on" => [{ "previous_la_known" => 0 }, { "previous_la_known" => 1 }] } @hidden_in_check_answers = { "depends_on" => [{ "previous_la_known" => 0 }, { "previous_la_known" => 1 }] }
@question_number = 81
end end
ANSWER_OPTIONS = { "1" => { "value" => "Yes" }, "0" => { "value" => "No" } }.freeze 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 16
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "This is where the household was the night before they moved." @hint_text = "This is where the household was the night before they moved."
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 78
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 78
end end
ANSWER_OPTIONS = { 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" }] @inferred_check_answers_value = [{ "condition" => { "previous_la_known" => 0 }, "value" => "Not known" }]
@check_answers_card_number = 0 @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." @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 end
def answer_options 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." @hint_text = "This is how you usually refer to this property on your own systems."
@type = "text" @type = "text"
@width = 10 @width = 10
@question_number = 8
end end
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 @step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg] @fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge" @result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£" @prefix = "£"
@suffix = " every 4 weeks" @suffix = " every 4 weeks"
@question_number = 97
end end
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 @step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg] @fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge" @result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£" @prefix = "£"
@suffix = " every 2 weeks" @suffix = " every 2 weeks"
@question_number = 97
end end
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 @step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg] @fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge" @result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£" @prefix = "£"
@suffix = " every month" @suffix = " every month"
@question_number = 97
end end
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 @step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg] @fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge" @result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£" @prefix = "£"
@suffix = " every week" @suffix = " every week"
@question_number = 97
end end
end end

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

@ -13,6 +13,7 @@ class Form::Lettings::Questions::Reason < ::Form::Question
20, 20,
], ],
} }
@question_number = 77
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 77
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "Select all that apply." @hint_text = "Select all that apply."
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 83
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

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

@ -7,5 +7,6 @@ class Form::Lettings::Questions::Reasonother < ::Form::Question
@type = "text" @type = "text"
@check_answers_card_number = 0 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@question_number = 77
end end
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 @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." @hint_text = "Households may be given ‘reasonable preference’ for social housing, also known as ‘priority need’, by the local authority."
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 82
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 85
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 85
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 85
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 85
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

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

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

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

@ -7,6 +7,7 @@ class Form::Lettings::Questions::RentType < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@conditional_for = { "irproduct_other" => [5] } @conditional_for = { "irproduct_other" => [5] }
@question_number = 6
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 68
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 17
end end
ANSWER_OPTIONS = { 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 @check_answers_card_number = 0
@hint_text = "" @hint_text = ""
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 15
end end
ANSWER_OPTIONS = { 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 @step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg] @fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge" @result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£" @prefix = "£"
@suffix = " every 4 weeks" @suffix = " every 4 weeks"
@question_number = 96
end end
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 @step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg] @fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge" @result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£" @prefix = "£"
@suffix = " every 2 weeks" @suffix = " every 2 weeks"
@question_number = 96
end end
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 @step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg] @fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge" @result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£" @prefix = "£"
@suffix = " every month" @suffix = " every month"
@question_number = 96
end end
end end

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

Loading…
Cancel
Save