Browse Source

Deduplicate rent period questions

pull/2732/head
Manny Dinssa 8 months ago
parent
commit
f6a259650a
  1. 2
      app/models/form/lettings/pages/rent_4_weekly.rb
  2. 2
      app/models/form/lettings/pages/rent_bi_weekly.rb
  3. 2
      app/models/form/lettings/pages/rent_monthly.rb
  4. 2
      app/models/form/lettings/pages/rent_weekly.rb
  5. 2
      app/models/form/lettings/questions/brent_4_weekly.rb
  6. 2
      app/models/form/lettings/questions/brent_bi_weekly.rb
  7. 2
      app/models/form/lettings/questions/brent_monthly.rb
  8. 2
      app/models/form/lettings/questions/brent_weekly.rb
  9. 2
      app/models/form/lettings/questions/pscharge_4_weekly.rb
  10. 2
      app/models/form/lettings/questions/pscharge_bi_weekly.rb
  11. 2
      app/models/form/lettings/questions/pscharge_monthly.rb
  12. 2
      app/models/form/lettings/questions/pscharge_weekly.rb
  13. 2
      app/models/form/lettings/questions/scharge_4_weekly.rb
  14. 2
      app/models/form/lettings/questions/scharge_bi_weekly.rb
  15. 2
      app/models/form/lettings/questions/scharge_monthly.rb
  16. 2
      app/models/form/lettings/questions/scharge_weekly.rb
  17. 2
      app/models/form/lettings/questions/supcharg_4_weekly.rb
  18. 2
      app/models/form/lettings/questions/supcharg_bi_weekly.rb
  19. 2
      app/models/form/lettings/questions/supcharg_monthly.rb
  20. 2
      app/models/form/lettings/questions/supcharg_weekly.rb
  21. 2
      app/models/form/lettings/questions/tcharge_4_weekly.rb
  22. 2
      app/models/form/lettings/questions/tcharge_bi_weekly.rb
  23. 2
      app/models/form/lettings/questions/tcharge_monthly.rb
  24. 2
      app/models/form/lettings/questions/tcharge_weekly.rb
  25. 71
      config/locales/forms/2023/lettings/income_and_benefits.en.yml
  26. 71
      config/locales/forms/2024/lettings/income_and_benefits.en.yml

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

@ -2,7 +2,7 @@ class Form::Lettings::Pages::Rent4Weekly < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "rent_4_weekly"
@copy_key = "lettings.income_and_benefits.rent_4_weekly"
@copy_key = "lettings.income_and_benefits.rent"
@depends_on = [
{ "household_charge" => 0, "rent_and_charges_paid_every_4_weeks?" => true, "is_carehome?" => false },
{ "household_charge" => nil, "rent_and_charges_paid_every_4_weeks?" => true, "is_carehome?" => false },

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

@ -2,7 +2,7 @@ class Form::Lettings::Pages::RentBiWeekly < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "rent_bi_weekly"
@copy_key = "lettings.income_and_benefits.rent_bi_weekly"
@copy_key = "lettings.income_and_benefits.rent"
@depends_on = [
{ "household_charge" => nil, "rent_and_charges_paid_every_2_weeks?" => true, "is_carehome?" => false },
{ "household_charge" => 0, "rent_and_charges_paid_every_2_weeks?" => true, "is_carehome?" => false },

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

@ -2,7 +2,7 @@ class Form::Lettings::Pages::RentMonthly < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "rent_monthly"
@copy_key = "lettings.income_and_benefits.rent_monthly"
@copy_key = "lettings.income_and_benefits.rent"
@depends_on = [
{ "household_charge" => nil, "rent_and_charges_paid_monthly?" => true, "is_carehome?" => false },
{ "household_charge" => 0, "rent_and_charges_paid_monthly?" => true, "is_carehome?" => false },

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

@ -2,7 +2,7 @@ class Form::Lettings::Pages::RentWeekly < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "rent_weekly"
@copy_key = "lettings.income_and_benefits.rent_weekly"
@copy_key = "lettings.income_and_benefits.rent"
@depends_on = [
{ "rent_and_charges_paid_weekly?" => true, "household_charge" => 0, "is_carehome?" => false },
{ "rent_and_charges_paid_weekly?" => true, "household_charge" => nil, "is_carehome?" => false },

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::Brent4Weekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "brent"
@copy_key = "lettings.income_and_benefits.rent_4_weekly.brent"
@copy_key = "lettings.income_and_benefits.rent.brent"
@type = "numeric"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::BrentBiWeekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "brent"
@copy_key = "lettings.income_and_benefits.rent_bi_weekly.brent"
@copy_key = "lettings.income_and_benefits.rent.brent"
@type = "numeric"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::BrentMonthly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "brent"
@copy_key = "lettings.income_and_benefits.rent_monthly.brent"
@copy_key = "lettings.income_and_benefits.rent.brent"
@type = "numeric"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::BrentWeekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "brent"
@copy_key = "lettings.income_and_benefits.rent_weekly.brent"
@copy_key = "lettings.income_and_benefits.rent.brent"
@type = "numeric"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::Pscharge4Weekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "pscharge"
@copy_key = "lettings.income_and_benefits.rent_4_weekly.pscharge"
@copy_key = "lettings.income_and_benefits.rent.pscharge"
@type = "numeric"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::PschargeBiWeekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "pscharge"
@copy_key = "lettings.income_and_benefits.rent_bi_weekly.pscharge"
@copy_key = "lettings.income_and_benefits.rent.pscharge"
@type = "numeric"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::PschargeMonthly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "pscharge"
@copy_key = "lettings.income_and_benefits.rent_monthly.pscharge"
@copy_key = "lettings.income_and_benefits.rent.pscharge"
@type = "numeric"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::PschargeWeekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "pscharge"
@copy_key = "lettings.income_and_benefits.rent_weekly.pscharge"
@copy_key = "lettings.income_and_benefits.rent.pscharge"
@type = "numeric"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::Scharge4Weekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "scharge"
@copy_key = "lettings.income_and_benefits.rent_4_weekly.scharge"
@copy_key = "lettings.income_and_benefits.rent.scharge"
@type = "numeric"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::SchargeBiWeekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "scharge"
@copy_key = "lettings.income_and_benefits.rent_bi_weekly.scharge"
@copy_key = "lettings.income_and_benefits.rent.scharge"
@type = "numeric"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::SchargeMonthly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "scharge"
@copy_key = "lettings.income_and_benefits.rent_monthly.scharge"
@copy_key = "lettings.income_and_benefits.rent.scharge"
@type = "numeric"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::SchargeWeekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "scharge"
@copy_key = "lettings.income_and_benefits.rent_weekly.scharge"
@copy_key = "lettings.income_and_benefits.rent.scharge"
@type = "numeric"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::Supcharg4Weekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "supcharg"
@copy_key = "lettings.income_and_benefits.rent_4_weekly.supcharg"
@copy_key = "lettings.income_and_benefits.rent.supcharg"
@type = "numeric"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::SupchargBiWeekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "supcharg"
@copy_key = "lettings.income_and_benefits.rent_bi_weekly.supcharg"
@copy_key = "lettings.income_and_benefits.rent.supcharg"
@type = "numeric"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::SupchargMonthly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "supcharg"
@copy_key = "lettings.income_and_benefits.rent_monthly.supcharg"
@copy_key = "lettings.income_and_benefits.rent.supcharg"
@type = "numeric"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::SupchargWeekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "supcharg"
@copy_key = "lettings.income_and_benefits.rent_weekly.supcharg"
@copy_key = "lettings.income_and_benefits.rent.supcharg"
@type = "numeric"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::Tcharge4Weekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "tcharge"
@copy_key = "lettings.income_and_benefits.rent_4_weekly.tcharge"
@copy_key = "lettings.income_and_benefits.rent.tcharge"
@type = "numeric_output"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::TchargeBiWeekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "tcharge"
@copy_key = "lettings.income_and_benefits.rent_bi_weekly.tcharge"
@copy_key = "lettings.income_and_benefits.rent.tcharge"
@type = "numeric_output"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::TchargeMonthly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "tcharge"
@copy_key = "lettings.income_and_benefits.rent_monthly.tcharge"
@copy_key = "lettings.income_and_benefits.rent.tcharge"
@type = "numeric_output"
@width = 5
@check_answers_card_number = 0

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

@ -2,7 +2,7 @@ class Form::Lettings::Questions::TchargeWeekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "tcharge"
@copy_key = "lettings.income_and_benefits.rent_weekly.tcharge"
@copy_key = "lettings.income_and_benefits.rent.tcharge"
@type = "numeric_output"
@width = 5
@check_answers_card_number = 0

71
config/locales/forms/2023/lettings/income_and_benefits.en.yml

@ -67,76 +67,7 @@ en:
hint_text: ""
question_text: "How much does the household pay every month?"
rent_weekly:
page_header: "Household rent and charges"
brent:
check_answer_label: "Basic rent"
hint_text: "This is the amount paid before any charges are added for services (for example, hot water or cleaning). Households may receive housing benefit or Universal Credit towards basic rent."
question_text: "What is the basic rent?"
scharge:
check_answer_label: "Service charge"
hint_text: "For example, for cleaning. Households may receive housing benefit or Universal Credit towards the service charge."
question_text: "What is the service charge?"
pscharge:
check_answer_label: "Personal service charge"
hint_text: "For example, for heating or hot water. This doesn’t include housing benefit or Universal Credit."
question_text: "What is the personal service charge?"
supcharg:
check_answer_label: "Support charge"
hint_text: "Any charges made to fund support services included in tenancy agreement."
question_text: "What is the support charge?"
tcharge:
check_answer_label: "Household rent and charges"
hint_text: "This is the total for rent and all charges."
question_text: "Total charge"
rent_bi_weekly:
page_header: "Household rent and charges"
brent:
check_answer_label: "Basic rent"
hint_text: "This is the amount paid before any charges are added for services (for example, hot water or cleaning). Households may receive housing benefit or Universal Credit towards basic rent."
question_text: "What is the basic rent?"
scharge:
check_answer_label: "Service charge"
hint_text: "For example, for cleaning. Households may receive housing benefit or Universal Credit towards the service charge."
question_text: "What is the service charge?"
pscharge:
check_answer_label: "Personal service charge"
hint_text: "For example, for heating or hot water. This doesn’t include housing benefit or Universal Credit."
question_text: "What is the personal service charge?"
supcharg:
check_answer_label: "Support charge"
hint_text: "Any charges made to fund support services included in tenancy agreement."
question_text: "What is the support charge?"
tcharge:
check_answer_label: "Household rent and charges"
hint_text: "This is the total for rent and all charges."
question_text: "Total charge"
rent_4_weekly:
page_header: "Household rent and charges"
brent:
check_answer_label: "Basic rent"
hint_text: "This is the amount paid before any charges are added for services (for example, hot water or cleaning). Households may receive housing benefit or Universal Credit towards basic rent."
question_text: "What is the basic rent?"
scharge:
check_answer_label: "Service charge"
hint_text: "For example, for cleaning. Households may receive housing benefit or Universal Credit towards the service charge."
question_text: "What is the service charge?"
pscharge:
check_answer_label: "Personal service charge"
hint_text: "For example, for heating or hot water. This doesn’t include housing benefit or Universal Credit."
question_text: "What is the personal service charge?"
supcharg:
check_answer_label: "Support charge"
hint_text: "Any charges made to fund support services included in tenancy agreement."
question_text: "What is the support charge?"
tcharge:
check_answer_label: "Household rent and charges"
hint_text: "This is the total for rent and all charges."
question_text: "Total charge"
rent_monthly:
rent:
page_header: "Household rent and charges"
brent:
check_answer_label: "Basic rent"

71
config/locales/forms/2024/lettings/income_and_benefits.en.yml

@ -67,76 +67,7 @@ en:
hint_text: ""
question_text: "How much does the household pay every month?"
rent_weekly:
page_header: "Household rent and charges"
brent:
check_answer_label: "Basic rent"
hint_text: "This is the amount paid before any charges are added for services (for example, hot water or cleaning). Households may receive housing benefit or Universal Credit towards basic rent."
question_text: "What is the basic rent?"
scharge:
check_answer_label: "Service charge"
hint_text: "For example, for cleaning. Households may receive housing benefit or Universal Credit towards the service charge."
question_text: "What is the service charge?"
pscharge:
check_answer_label: "Personal service charge"
hint_text: "For example, for heating or hot water. This doesn’t include housing benefit or Universal Credit."
question_text: "What is the personal service charge?"
supcharg:
check_answer_label: "Support charge"
hint_text: "Any charges made to fund support services included in tenancy agreement."
question_text: "What is the support charge?"
tcharge:
check_answer_label: "Household rent and charges"
hint_text: "This is the total for rent and all charges."
question_text: "Total charge"
rent_bi_weekly:
page_header: "Household rent and charges"
brent:
check_answer_label: "Basic rent"
hint_text: "This is the amount paid before any charges are added for services (for example, hot water or cleaning). Households may receive housing benefit or Universal Credit towards basic rent."
question_text: "What is the basic rent?"
scharge:
check_answer_label: "Service charge"
hint_text: "For example, for cleaning. Households may receive housing benefit or Universal Credit towards the service charge."
question_text: "What is the service charge?"
pscharge:
check_answer_label: "Personal service charge"
hint_text: "For example, for heating or hot water. This doesn’t include housing benefit or Universal Credit."
question_text: "What is the personal service charge?"
supcharg:
check_answer_label: "Support charge"
hint_text: "Any charges made to fund support services included in tenancy agreement."
question_text: "What is the support charge?"
tcharge:
check_answer_label: "Household rent and charges"
hint_text: "This is the total for rent and all charges."
question_text: "Total charge"
rent_4_weekly:
page_header: "Household rent and charges"
brent:
check_answer_label: "Basic rent"
hint_text: "This is the amount paid before any charges are added for services (for example, hot water or cleaning). Households may receive housing benefit or Universal Credit towards basic rent."
question_text: "What is the basic rent?"
scharge:
check_answer_label: "Service charge"
hint_text: "For example, for cleaning. Households may receive housing benefit or Universal Credit towards the service charge."
question_text: "What is the service charge?"
pscharge:
check_answer_label: "Personal service charge"
hint_text: "For example, for heating or hot water. This doesn’t include housing benefit or Universal Credit."
question_text: "What is the personal service charge?"
supcharg:
check_answer_label: "Support charge"
hint_text: "Any charges made to fund support services included in tenancy agreement."
question_text: "What is the support charge?"
tcharge:
check_answer_label: "Household rent and charges"
hint_text: "This is the total for rent and all charges."
question_text: "Total charge"
rent_monthly:
rent:
page_header: "Household rent and charges"
brent:
check_answer_label: "Basic rent"

Loading…
Cancel
Save