|
|
@ -225,7 +225,9 @@ private |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def reset_derived_questions |
|
|
|
def reset_derived_questions |
|
|
|
dependent_questions = { layear: [{ key: :renewal, value: "No" }], homeless: [{ key: :renewal, value: "No" }] } |
|
|
|
dependent_questions = { layear: [{ key: :renewal, value: "No" }], |
|
|
|
|
|
|
|
homeless: [{ key: :renewal, value: "No" }], |
|
|
|
|
|
|
|
referral: [{ key: :renewal, value: "No" }]} |
|
|
|
|
|
|
|
|
|
|
|
dependent_questions.each do |dependent, conditions| |
|
|
|
dependent_questions.each do |dependent, conditions| |
|
|
|
condition_key = conditions.first[:key] |
|
|
|
condition_key = conditions.first[:key] |
|
|
@ -283,6 +285,7 @@ private |
|
|
|
self.homeless = "No" |
|
|
|
self.homeless = "No" |
|
|
|
self.referral = "Internal transfer" |
|
|
|
self.referral = "Internal transfer" |
|
|
|
self.layear = "Less than 1 year" |
|
|
|
self.layear = "Less than 1 year" |
|
|
|
|
|
|
|
self.reasonpref = nil if reasonpref == "Yes" |
|
|
|
end |
|
|
|
end |
|
|
|
if needstype == "General needs" |
|
|
|
if needstype == "General needs" |
|
|
|
self.prevten = "Fixed-term private registered provider (PRP) general needs tenancy" if managing_organisation.provider_type == "PRP" |
|
|
|
self.prevten = "Fixed-term private registered provider (PRP) general needs tenancy" if managing_organisation.provider_type == "PRP" |
|
|
|