|
|
|
@ -426,7 +426,9 @@ class LettingsLog < Log |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
delegate :service_name, :sensitive, :registered_under_care_act, :primary_client_group, :has_other_client_group, :secondary_client_group, :owning_organisation, :managing_organisation, :support_type, :intended_stay, :created_at, prefix: "scheme", to: :scheme, allow_nil: true |
|
|
|
delegate :service_name, :sensitive, :registered_under_care_act, :primary_client_group, :has_other_client_group, :secondary_client_group, :owning_organisation, :managing_organisation, :support_type, :intended_stay, :created_at, prefix: "scheme", to: :scheme, allow_nil: true |
|
|
|
|
|
|
|
delegate :service_name_before_type_cast, :sensitive_before_type_cast, :registered_under_care_act_before_type_cast, :primary_client_group_before_type_cast, :has_other_client_group_before_type_cast, :secondary_client_group_before_type_cast, :owning_organisation_before_type_cast, :managing_organisation_before_type_cast, :support_type_before_type_cast, :intended_stay_before_type_cast, :created_at_before_type_cast, prefix: "scheme", to: :scheme, allow_nil: true |
|
|
|
delegate :scheme_type, to: :scheme, allow_nil: true |
|
|
|
delegate :scheme_type, to: :scheme, allow_nil: true |
|
|
|
|
|
|
|
delegate :scheme_type_before_type_cast, to: :scheme, allow_nil: true |
|
|
|
|
|
|
|
|
|
|
|
def scheme_code |
|
|
|
def scheme_code |
|
|
|
scheme&.id ? "S#{scheme.id}" : nil |
|
|
|
scheme&.id ? "S#{scheme.id}" : nil |
|
|
|
@ -437,7 +439,9 @@ class LettingsLog < Log |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
delegate :postcode, :name, :units, :type_of_unit, :mobility_type, :startdate, prefix: "location", to: :location, allow_nil: true |
|
|
|
delegate :postcode, :name, :units, :type_of_unit, :mobility_type, :startdate, prefix: "location", to: :location, allow_nil: true |
|
|
|
|
|
|
|
delegate :postcode_before_type_cast, :name_before_type_cast, :units_before_type_cast, :type_of_unit_before_type_cast, :mobility_type_before_type_cast, :startdate_before_type_cast, prefix: "location", to: :location, allow_nil: true |
|
|
|
delegate :location_admin_district, to: :location, allow_nil: true |
|
|
|
delegate :location_admin_district, to: :location, allow_nil: true |
|
|
|
|
|
|
|
delegate :location_admin_district_before_type_cast, to: :location, allow_nil: true |
|
|
|
|
|
|
|
|
|
|
|
# This is not the location_code in the db, location.id is just called code in the UI |
|
|
|
# This is not the location_code in the db, location.id is just called code in the UI |
|
|
|
def location_code |
|
|
|
def location_code |
|
|
|
@ -495,6 +499,10 @@ class LettingsLog < Log |
|
|
|
form.get_question("rent_type", self)&.label_from_value(rent_type) |
|
|
|
form.get_question("rent_type", self)&.label_from_value(rent_type) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def lettings? |
|
|
|
|
|
|
|
true |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def non_location_setup_questions_completed? |
|
|
|
def non_location_setup_questions_completed? |
|
|
|
[needstype, renewal, rent_type, startdate, owning_organisation_id, created_by_id].all?(&:present?) |
|
|
|
[needstype, renewal, rent_type, startdate, owning_organisation_id, created_by_id].all?(&:present?) |
|
|
|
end |
|
|
|
end |
|
|
|
|