Browse Source

Fix allocation unknown type and depends on for referrals

pull/308/head
Kat 3 years ago
parent
commit
a8357a1e80
  1. 1
      app/models/case_log.rb
  2. 8
      config/forms/2021_2022.json
  3. 2
      db/migrate/20220210132254_remove_checkbox_parent_fields.rb
  4. 15
      db/migrate/20220216094400_change_unknown_letting_allocation_type.rb
  5. 2
      db/schema.rb

1
app/models/case_log.rb

@ -100,6 +100,7 @@ class CaseLog < ApplicationRecord
enum cbl: POLAR, _suffix: true
enum chr: POLAR, _suffix: true
enum cap: POLAR, _suffix: true
enum letting_allocation_unknown: POLAR, _suffix: true
enum wchair: POLAR2, _suffix: true
enum incfreq: INCFREQ, _suffix: true
enum benefits: BENEFITS, _suffix: true

8
config/forms/2021_2022.json

@ -2095,7 +2095,7 @@
{
"managing_organisation.provider_type": "LA",
"needstype": "General needs",
"referral": "No"
"renewal": "No"
}
]
},
@ -2152,7 +2152,7 @@
{
"managing_organisation.provider_type": "PRP",
"needstype": "General needs",
"referral": "No"
"renewal": "No"
}
]
},
@ -2209,7 +2209,7 @@
{
"managing_organisation.provider_type": "LA",
"needstype": "Supported housing",
"referral": "No"
"renewal": "No"
}
]
},
@ -2269,7 +2269,7 @@
{
"managing_organisation.provider_type": "PRP",
"needstype": "Supported housing",
"referral": "No"
"renewal": "No"
}
]
}

2
db/migrate/20220210132254_remove_checkbox_parent_fields.rb

@ -11,7 +11,7 @@ class RemoveCheckboxParentFields < ActiveRecord::Migration[7.0]
change_table :case_logs, bulk: true do |t|
t.column :accessibility_requirements, :string
t.column :condition_effects, :string
t.remove :reasonable_preference_reason, :string
t.column :reasonable_preference_reason, :string
end
end
end

15
db/migrate/20220216094400_change_unknown_letting_allocation_type.rb

@ -0,0 +1,15 @@
class ChangeUnknownLettingAllocationType < ActiveRecord::Migration[7.0]
def up
change_table :case_logs, bulk: true do |t|
t.remove :letting_allocation_unknown
t.column :letting_allocation_unknown, :integer
end
end
def down
change_table :case_logs, bulk: true do |t|
t.remove :letting_allocation_unknown
t.column :letting_allocation_unknown, :boolean
end
end
end

2
db/schema.rb

@ -190,7 +190,7 @@ ActiveRecord::Schema[7.0].define(version: 202202071123100) do
t.integer "previous_postcode_known"
t.integer "previous_la_known"
t.boolean "is_previous_la_inferred"
t.boolean "letting_allocation_unknown"
t.integer "letting_allocation_unknown"
t.index ["managing_organisation_id"], name: "index_case_logs_on_managing_organisation_id"
t.index ["owning_organisation_id"], name: "index_case_logs_on_owning_organisation_id"
end

Loading…
Cancel
Save