From a761f957150da88d9ae031b1cdd4d68a7568a1a4 Mon Sep 17 00:00:00 2001 From: Kat Date: Mon, 6 Dec 2021 12:11:17 +0000 Subject: [PATCH] finish renaming the columns, remove duplicate constants' --- app/models/case_log.rb | 4 ++-- app/models/constants/case_log.rb | 24 ------------------------ 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/app/models/case_log.rb b/app/models/case_log.rb index 3408d6f5f..ae6e06fb6 100644 --- a/app/models/case_log.rb +++ b/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 diff --git a/app/models/constants/case_log.rb b/app/models/constants/case_log.rb index 90b96609e..535cd1f83 100644 --- a/app/models/constants/case_log.rb +++ b/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",