Browse Source

fixup! CLDC-4188: Add validation between prevten and referral_register

use .prp?

improve grammar
CLDC-4151-new-referral-questions
Samuel Young 2 weeks ago
parent
commit
31a7a07acb
  1. 2
      app/models/validations/household_validations.rb
  2. 4
      config/locales/validations/lettings/household.en.yml

2
app/models/validations/household_validations.rb

@ -178,7 +178,7 @@ module Validations::HouseholdValidations
record.errors.add :prevten, message: I18n.t("validations.lettings.household.prevten.general_needs.internal_transfer", prevten: label)
record.errors.add :referral_register, message: I18n.t("validations.lettings.household.referral.general_needs.internal_transfer", prevten: label)
end
elsif record.is_internal_transfer? && record.owning_organisation.provider_type == "PRP" && record.is_prevten_la_general_needs?
elsif record.is_internal_transfer? && record.owning_organisation.prp? && record.is_prevten_la_general_needs?
record.errors.add :prevten, :internal_transfer_fixed_or_lifetime, message: I18n.t("validations.lettings.household.prevten.la_general_needs.internal_transfer")
record.errors.add :referral, :internal_transfer_fixed_or_lifetime, message: I18n.t("validations.lettings.household.referral.la_general_needs.internal_transfer")
end

4
config/locales/validations/lettings/household.en.yml

@ -99,11 +99,11 @@ en:
la_general_needs:
internal_transfer: "Answer cannot be a fixed-term or lifetime local authority general needs tenancy as it’s an internal transfer and a private registered provider is on the tenancy agreement."
general_needs:
internal_transfer: "Answer cannot be %{prevten} as this tenancy is an internal transfer. Internal transfers are for existing social tenants only, your answer to where the household was immediately before this letting shows the tenant was not in the social sector immediately prior to this letting."
internal_transfer: "Answer cannot be %{prevten} as this tenancy is an internal transfer. Internal transfers are for existing social tenants only; your answer to where the household was immediately before this letting shows the tenant was not in the social sector immediately prior to this letting."
referral:
prevten_invalid: "Answer cannot be internal transfer as the household situation immediately before this letting was %{prevten}."
la_general_needs:
internal_transfer: "Answer cannot be internal transfer as it’s the same landlord on the tenancy agreement and the household had either a fixed-term or lifetime local authority general needs tenancy immediately before this letting."
general_needs:
internal_transfer: "Answer cannot be internal transfer as the household situation immediately before this letting was %{prevten}. Internal transfers are for existing social tenants only, your answer to where the household was immediately before this letting shows the tenant was not in the social sector immediately prior to this letting."
internal_transfer: "Answer cannot be internal transfer as the household situation immediately before this letting was %{prevten}. Internal transfers are for existing social tenants only; your answer to where the household was immediately before this letting shows the tenant was not in the social sector immediately prior to this letting."

Loading…
Cancel
Save