|
|
@ -111,10 +111,9 @@ class CaseLog < ApplicationRecord |
|
|
|
enum property_relet: DbEnums.polar, _suffix: true |
|
|
|
enum property_relet: DbEnums.polar, _suffix: true |
|
|
|
enum armedforces: DbEnums.armed_forces, _suffix: true |
|
|
|
enum armedforces: DbEnums.armed_forces, _suffix: true |
|
|
|
enum first_time_property_let_as_social_housing: DbEnums.polar, _suffix: true |
|
|
|
enum first_time_property_let_as_social_housing: DbEnums.polar, _suffix: true |
|
|
|
enum do_you_know_the_postcode: DbEnums.polar, _suffix: true |
|
|
|
|
|
|
|
enum do_you_know_the_local_authority: DbEnums.polar, _suffix: true |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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[do_you_know_the_postcode do_you_know_the_local_authority].freeze |
|
|
|
|
|
|
|
|
|
|
|
def self.editable_fields |
|
|
|
def self.editable_fields |
|
|
|
attribute_names - AUTOGENERATED_FIELDS |
|
|
|
attribute_names - AUTOGENERATED_FIELDS |
|
|
@ -224,7 +223,7 @@ private |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def mandatory_fields |
|
|
|
def mandatory_fields |
|
|
|
required = attributes.except(*AUTOGENERATED_FIELDS) |
|
|
|
required = attributes.except(*(AUTOGENERATED_FIELDS + OPTIONAL_FIELDS)) |
|
|
|
|
|
|
|
|
|
|
|
dynamically_not_required = [] |
|
|
|
dynamically_not_required = [] |
|
|
|
|
|
|
|
|
|
|
|