Browse Source

finish renaming the columns, remove duplicate constants'

pull/147/head
Kat 4 years ago
parent
commit
a761f95715
  1. 4
      app/models/case_log.rb
  2. 24
      app/models/constants/case_log.rb

4
app/models/case_log.rb

@ -117,8 +117,8 @@ class CaseLog < ApplicationRecord
enum la_known: POLAR, _suffix: true
AUTOGENERATED_FIELDS = %w[id status created_at updated_at discarded_at renttype lettype].freeze
OPTIONAL_FIELDS = %w[do_you_know_the_postcode
do_you_know_the_local_authority
OPTIONAL_FIELDS = %w[postcode_known
la_known
first_time_property_let_as_social_housing].freeze
def self.editable_fields

24
app/models/constants/case_log.rb

@ -691,30 +691,6 @@ module Constants::CaseLog
"Intermediate Rent Supported housing LA" => 12,
}.freeze
RENT_TYPE_MAPPING = {
"Social rent" => "Social Rent",
"Affordable rent" => "Affordable Rent",
"London Affordable rent" => "Affordable Rent",
"Rent to buy" => "Intermediate Rent",
"London living rent" => "Intermediate Rent",
"Other intermediate rent product" => "Intermediate Rent",
}.freeze
LET_TYPE = {
"Social Rent General needs PRP" => 1,
"Social Rent Supported housing PRP" => 2,
"Social Rent General needs LA" => 3,
"Social Rent Supported housing LA" => 4,
"Affordable Rent General needs PRP" => 5,
"Affordable Rent Supported housing PRP" => 6,
"Affordable Rent General needs LA" => 7,
"Affordable Rent Supported housing LA" => 8,
"Intermediate Rent General needs PRP" => 9,
"Intermediate Rent Supported housing PRP" => 10,
"Intermediate Rent General needs LA" => 11,
"Intermediate Rent Supported housing LA" => 12,
}.freeze
RENT_TYPE_MAPPING = {
"Social rent" => "Social Rent",
"Affordable rent" => "Affordable Rent",

Loading…
Cancel
Save