|
|
|
@ -72,15 +72,6 @@ module Validations::SetupValidations |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def validate_location(record) |
|
|
|
|
|
|
|
location_during_startdate_validation(record) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if record.location&.status == :incomplete |
|
|
|
|
|
|
|
record.errors.add :location_id, :incomplete, message: I18n.t("validations.setup.location.incomplete") |
|
|
|
|
|
|
|
record.errors.add :scheme_id, :incomplete, message: I18n.t("validations.setup.location.incomplete") |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def validate_scheme_has_confirmed_locations_validation(record) |
|
|
|
def validate_scheme_has_confirmed_locations_validation(record) |
|
|
|
return unless record.scheme |
|
|
|
return unless record.scheme |
|
|
|
|
|
|
|
|
|
|
|
@ -93,8 +84,13 @@ module Validations::SetupValidations |
|
|
|
scheme_during_startdate_validation(record) |
|
|
|
scheme_during_startdate_validation(record) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def validate_tenancy(record) |
|
|
|
def validate_location(record) |
|
|
|
tenancy_during_startdate_validation(record) |
|
|
|
location_during_startdate_validation(record) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if record.location&.status == :incomplete |
|
|
|
|
|
|
|
record.errors.add :location_id, :incomplete, message: I18n.t("validations.setup.location.incomplete") |
|
|
|
|
|
|
|
record.errors.add :scheme_id, :incomplete, message: I18n.t("validations.setup.location.incomplete") |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def validate_managing_organisation_data_sharing_agremeent_signed(record) |
|
|
|
def validate_managing_organisation_data_sharing_agremeent_signed(record) |
|
|
|
|