Browse Source

make changes for 2021-2022 form

pull/216/head
MadeTech Dushan 4 years ago
parent
commit
3be2945d41
  1. 45
      config/forms/2021_2022.json
  2. 7
      db/migrate/20220112124047_add_letting_in_sheltered_accomodation_field.rb
  3. 1
      spec/factories/case_log.rb
  4. 3
      spec/fixtures/complete_case_log.json

45
config/forms/2021_2022.json

@ -1070,22 +1070,6 @@
} }
} }
}, },
"fixed_term_tenancy": {
"header": "",
"description": "",
"questions": {
"tenancylength": {
"check_answer_label": "If the main tenancy is a fixed term tenancy, please provide the length of the fixed term (to the nearest year) excluding any starter/introductory period",
"header": "If fixed-term, what is the length of the fixed-term tenancy after any starter period?",
"hint_text": "To the nearest year",
"type": "numeric",
"min": 0,
"max": 150,
"step": 1,
"width": 4
}
}
},
"tenancy_type": { "tenancy_type": {
"header": "", "header": "",
"description": "", "description": "",
@ -1113,18 +1097,35 @@
} }
} }
}, },
"letting_provider": { "fixed_term_tenancy": {
"header": "",
"description": "",
"questions": {
"tenancylength": {
"check_answer_label": "If the main tenancy is a fixed term tenancy, please provide the length of the fixed term (to the nearest year) excluding any starter/introductory period",
"header": "If fixed-term, what is the length of the fixed-term tenancy after any starter period?",
"hint_text": "To the nearest year",
"type": "numeric",
"min": 0,
"max": 150,
"step": 1
}
}
},
"letting_in_sheltered_accomodation": {
"header": "", "header": "",
"description": "", "description": "",
"questions": { "questions": {
"landlord": { "lettinginshelteredaccomodation": {
"check_answer_label": "Provider", "check_answer_label": "Is this letting in sheltered accommodation?",
"header": "Who is the letting provider?", "header": "Is this letting in sheltered accommodation?",
"hint_text": "", "hint_text": "",
"type": "radio", "type": "radio",
"answer_options": { "answer_options": {
"0": "This landlord", "0": "Yes - sheltered housing",
"1": "Another registered provider - includes housing association or local authority" "1": "Yes - extra care housing",
"2": "No",
"3": "Don't know"
} }
} }
} }

7
db/migrate/20220112124047_add_letting_in_sheltered_accomodation_field.rb

@ -0,0 +1,7 @@
class AddLettingInShelteredAccomodationField < ActiveRecord::Migration[7.0]
def change
change_table :case_logs, bulk: true do |t|
t.column :letting_in_sheltered_accomodation, :integer
end
end
end

1
spec/factories/case_log.rb

@ -152,6 +152,7 @@ FactoryBot.define do
has_benefits { "Yes" } has_benefits { "Yes" }
is_carehome { "No" } is_carehome { "No" }
chcharge { 7 } chcharge { 7 }
letting_in_sheltered_accomodation { 2 }
end end
created_at { Time.zone.now } created_at { Time.zone.now }
updated_at { Time.zone.now } updated_at { Time.zone.now }

3
spec/fixtures/complete_case_log.json vendored

@ -148,6 +148,7 @@
"has_benefits": "Yes", "has_benefits": "Yes",
"household_charge": "Yes", "household_charge": "Yes",
"is_carehome": "Yes", "is_carehome": "Yes",
"chcharge": "6" "chcharge": "6",
"letting_in_sheltered_accomodation": "No"
} }
} }

Loading…
Cancel
Save