Browse Source

Rename renewal to match what's been sent to softwire (#262)

pull/264/head
baarkerlounger 3 years ago committed by GitHub
parent
commit
c47a505f99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 22
      config/forms/2021_2022.json
  2. 5
      db/migrate/20220131123638_rename_case_log_fields.rb
  3. 6
      db/schema.rb
  4. 4
      spec/factories/case_log.rb
  5. 2
      spec/fixtures/complete_case_log.json
  6. 4
      spec/fixtures/forms/2022_2023.json

22
config/forms/2021_2022.json

@ -60,11 +60,11 @@
}, },
"depends_on": [{ "gdpr_acceptance": "Yes" }] "depends_on": [{ "gdpr_acceptance": "Yes" }]
}, },
"tenant_same_property_renewal": { "renewal": {
"header": "", "header": "",
"description": "", "description": "",
"questions": { "questions": {
"tenant_same_property_renewal": { "renewal": {
"check_answer_label": "Property renewal", "check_answer_label": "Property renewal",
"header": "Is this letting a renewal?", "header": "Is this letting a renewal?",
"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.",
@ -2076,7 +2076,7 @@
} }
} }
}, },
"depends_on": [{ "tenant_same_property_renewal": "No" }] "depends_on": [{ "renewal": "No" }]
}, },
"unitletas": { "unitletas": {
"header": "", "header": "",
@ -2098,7 +2098,7 @@
}, },
"depends_on": [{ "depends_on": [{
"first_time_property_let_as_social_housing": "No", "first_time_property_let_as_social_housing": "No",
"tenant_same_property_renewal": "No" "renewal": "No"
}] }]
}, },
"property_vacancy_reason_not_first_let": { "property_vacancy_reason_not_first_let": {
@ -2127,7 +2127,7 @@
}, },
"depends_on": [{ "depends_on": [{
"first_time_property_let_as_social_housing": "No", "first_time_property_let_as_social_housing": "No",
"tenant_same_property_renewal": "No" "renewal": "No"
}] }]
}, },
"property_vacancy_reason_first_let": { "property_vacancy_reason_first_let": {
@ -2148,7 +2148,7 @@
}, },
"depends_on": [{ "depends_on": [{
"first_time_property_let_as_social_housing": "Yes", "first_time_property_let_as_social_housing": "Yes",
"tenant_same_property_renewal": "No" "renewal": "No"
}] }]
}, },
"property_number_of_times_relet_not_social_let": { "property_number_of_times_relet_not_social_let": {
@ -2168,7 +2168,7 @@
}, },
"depends_on": [{ "depends_on": [{
"first_time_property_let_as_social_housing": "No", "first_time_property_let_as_social_housing": "No",
"tenant_same_property_renewal": "No" "renewal": "No"
}] }]
}, },
"property_number_of_times_relet_social_let": { "property_number_of_times_relet_social_let": {
@ -2188,7 +2188,7 @@
}, },
"depends_on": [{ "depends_on": [{
"first_time_property_let_as_social_housing": "Yes", "first_time_property_let_as_social_housing": "Yes",
"tenant_same_property_renewal": "No" "renewal": "No"
}] }]
}, },
"property_unit_type": { "property_unit_type": {
@ -2275,7 +2275,7 @@
}, },
"depends_on": [{ "depends_on": [{
"rsnvac": "First let of new-build property", "rsnvac": "First let of new-build property",
"tenant_same_property_renewal": "No" "renewal": "No"
}] }]
}, },
"new_build_handover_date": { "new_build_handover_date": {
@ -2290,7 +2290,7 @@
} }
}, },
"depends_on": [{ "depends_on": [{
"tenant_same_property_renewal": "No", "renewal": "No",
"rsnvac": [ "rsnvac": [
"First let of conversion, rehabilitation or acquired property?", "First let of conversion, rehabilitation or acquired property?",
"First let of leased property" "First let of leased property"
@ -2323,7 +2323,7 @@
}, },
"depends_on": [{ "depends_on": [{
"rsnvac": "First let of new-build property", "rsnvac": "First let of new-build property",
"tenant_same_property_renewal": "No" "renewal": "No"
}] }]
} }
} }

5
db/migrate/20220131123638_rename_case_log_fields.rb

@ -0,0 +1,5 @@
class RenameCaseLogFields < ActiveRecord::Migration[7.0]
def change
rename_column :case_logs, :tenant_same_property_renewal, :renewal
end
end

6
db/schema.rb

@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2022_01_26_101743) do ActiveRecord::Schema.define(version: 2022_01_31_123638) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
@ -84,6 +84,7 @@ ActiveRecord::Schema.define(version: 2022_01_26_101743) do
t.integer "beds" t.integer "beds"
t.integer "offered" t.integer "offered"
t.integer "wchair" t.integer "wchair"
t.integer "earnings"
t.integer "incfreq" t.integer "incfreq"
t.integer "benefits" t.integer "benefits"
t.integer "period" t.integer "period"
@ -126,7 +127,7 @@ ActiveRecord::Schema.define(version: 2022_01_26_101743) do
t.string "property_owner_organisation" t.string "property_owner_organisation"
t.string "property_manager_organisation" t.string "property_manager_organisation"
t.string "sale_or_letting" t.string "sale_or_letting"
t.string "tenant_same_property_renewal" t.string "renewal"
t.string "rent_type" t.string "rent_type"
t.string "intermediate_rent_product_name" t.string "intermediate_rent_product_name"
t.string "purchaser_code" t.string "purchaser_code"
@ -176,7 +177,6 @@ ActiveRecord::Schema.define(version: 2022_01_26_101743) do
t.integer "is_carehome" t.integer "is_carehome"
t.integer "letting_in_sheltered_accomodation" t.integer "letting_in_sheltered_accomodation"
t.integer "household_charge" t.integer "household_charge"
t.integer "earnings"
t.integer "referral" t.integer "referral"
t.decimal "brent", precision: 10, scale: 2 t.decimal "brent", precision: 10, scale: 2
t.decimal "scharge", precision: 10, scale: 2 t.decimal "scharge", precision: 10, scale: 2

4
spec/factories/case_log.rb

@ -4,7 +4,7 @@ FactoryBot.define do
managing_organisation { FactoryBot.create(:organisation) } managing_organisation { FactoryBot.create(:organisation) }
trait :about_completed do trait :about_completed do
gdpr_acceptance { "Yes" } gdpr_acceptance { "Yes" }
tenant_same_property_renewal { "No" } renewal { "No" }
needstype { 1 } needstype { 1 }
rent_type { 1 } rent_type { 1 }
startdate { Time.zone.local(2022, 5, 1) } startdate { Time.zone.local(2022, 5, 1) }
@ -116,7 +116,7 @@ FactoryBot.define do
gdpr_declined { "No" } gdpr_declined { "No" }
property_owner_organisation { "Test" } property_owner_organisation { "Test" }
property_manager_organisation { "Test" } property_manager_organisation { "Test" }
tenant_same_property_renewal { 1 } renewal { 1 }
rent_type { 1 } rent_type { 1 }
intermediate_rent_product_name { 2 } intermediate_rent_product_name { 2 }
needstype { 1 } needstype { 1 }

2
spec/fixtures/complete_case_log.json vendored

@ -142,7 +142,7 @@
"builtype": "Purpose built", "builtype": "Purpose built",
"property_wheelchair_accessible": "Yes", "property_wheelchair_accessible": "Yes",
"void_or_renewal_date": "05/05/2020", "void_or_renewal_date": "05/05/2020",
"tenant_same_property_renewal": "Yes", "renewal": "Yes",
"new_build_handover_date": "01/01/2019", "new_build_handover_date": "01/01/2019",
"has_benefits": "Yes", "has_benefits": "Yes",
"household_charge": "Yes", "household_charge": "Yes",

4
spec/fixtures/forms/2022_2023.json vendored

@ -31,11 +31,11 @@
}, },
"depends_on": [{ "gdpr_acceptance": "No" }] "depends_on": [{ "gdpr_acceptance": "No" }]
}, },
"tenant_same_property_renewal": { "renewal": {
"header": "", "header": "",
"description": "", "description": "",
"questions": { "questions": {
"tenant_same_property_renewal": { "renewal": {
"check_answer_label": "Property renewal", "check_answer_label": "Property renewal",
"header": "Is this a renewal to the same tenant in the same property?", "header": "Is this a renewal to the same tenant in the same property?",
"hint_text": "", "hint_text": "",

Loading…
Cancel
Save