|
|
@ -50,7 +50,7 @@ class CaseLog < ApplicationRecord |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
AUTOGENERATED_FIELDS = %w[id status created_at updated_at discarded_at].freeze |
|
|
|
AUTOGENERATED_FIELDS = %w[id status created_at updated_at discarded_at].freeze |
|
|
|
OPTIONAL_FIELDS = %w[postcode_known previous_la_known first_time_property_let_as_social_housing tenant_code propcode].freeze |
|
|
|
OPTIONAL_FIELDS = %w[first_time_property_let_as_social_housing tenant_code propcode].freeze |
|
|
|
RENT_TYPE_MAPPING = { 0 => 1, 1 => 2, 2 => 2, 3 => 3, 4 => 3, 5 => 3 }.freeze |
|
|
|
RENT_TYPE_MAPPING = { 0 => 1, 1 => 2, 2 => 2, 3 => 3, 4 => 3, 5 => 3 }.freeze |
|
|
|
RENT_TYPE_MAPPING_LABELS = { 1 => "Social Rent", 2 => "Affordable Rent", 3 => "Intermediate Rent" }.freeze |
|
|
|
RENT_TYPE_MAPPING_LABELS = { 1 => "Social Rent", 2 => "Affordable Rent", 3 => "Intermediate Rent" }.freeze |
|
|
|
HAS_BENEFITS_OPTIONS = [1, 6, 8, 7].freeze |
|
|
|
HAS_BENEFITS_OPTIONS = [1, 6, 8, 7].freeze |
|
|
@ -419,7 +419,8 @@ private |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def dynamically_not_required |
|
|
|
def dynamically_not_required |
|
|
|
(form.invalidated_questions(self) + form.readonly_questions).map(&:id).uniq |
|
|
|
previous_la_known_field = postcode_known? ? %w[previous_la_known] : [] |
|
|
|
|
|
|
|
((form.invalidated_questions(self) + form.readonly_questions).map(&:id) + previous_la_known_field).uniq |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def set_derived_fields! |
|
|
|
def set_derived_fields! |
|
|
|