15 changed files with 282 additions and 27 deletions
@ -0,0 +1,11 @@ |
|||||||
|
class Form::Lettings::Pages::ReferralDirect < ::Form::Page |
||||||
|
def initialize(id, hsh, subsection) |
||||||
|
super |
||||||
|
@id = "referral_direct" |
||||||
|
@depends_on = [{ "referral_type" => 101 }] |
||||||
|
end |
||||||
|
|
||||||
|
def questions |
||||||
|
@questions ||= [Form::Lettings::Questions::ReferralDirect.new(nil, nil, self)] |
||||||
|
end |
||||||
|
end |
@ -0,0 +1,11 @@ |
|||||||
|
class Form::Lettings::Pages::ReferralHsc < ::Form::Page |
||||||
|
def initialize(id, hsh, subsection) |
||||||
|
super |
||||||
|
@id = "referral_hsc" |
||||||
|
@depends_on = [{ "referral_type" => 104 }] |
||||||
|
end |
||||||
|
|
||||||
|
def questions |
||||||
|
@questions ||= [Form::Lettings::Questions::ReferralHsc.new(nil, nil, self)] |
||||||
|
end |
||||||
|
end |
@ -0,0 +1,11 @@ |
|||||||
|
class Form::Lettings::Pages::ReferralJustice < ::Form::Page |
||||||
|
def initialize(id, hsh, subsection) |
||||||
|
super |
||||||
|
@id = "referral_justice" |
||||||
|
@depends_on = [{ "referral_type" => 105 }] |
||||||
|
end |
||||||
|
|
||||||
|
def questions |
||||||
|
@questions ||= [Form::Lettings::Questions::ReferralJustice.new(nil, nil, self)] |
||||||
|
end |
||||||
|
end |
@ -0,0 +1,11 @@ |
|||||||
|
class Form::Lettings::Pages::ReferralLa < ::Form::Page |
||||||
|
def initialize(id, hsh, subsection) |
||||||
|
super |
||||||
|
@id = "referral_la" |
||||||
|
@depends_on = [{ "referral_type" => 102 }] |
||||||
|
end |
||||||
|
|
||||||
|
def questions |
||||||
|
@questions ||= [Form::Lettings::Questions::ReferralLa.new(nil, nil, self)] |
||||||
|
end |
||||||
|
end |
@ -0,0 +1,11 @@ |
|||||||
|
class Form::Lettings::Pages::ReferralPrp < ::Form::Page |
||||||
|
def initialize(id, hsh, subsection) |
||||||
|
super |
||||||
|
@id = "referral_prp" |
||||||
|
@depends_on = [{ "referral_type" => 103 }] |
||||||
|
end |
||||||
|
|
||||||
|
def questions |
||||||
|
@questions ||= [Form::Lettings::Questions::ReferralPrp.new(nil, nil, self)] |
||||||
|
end |
||||||
|
end |
@ -0,0 +1,10 @@ |
|||||||
|
class Form::Lettings::Pages::ReferralType < ::Form::Page |
||||||
|
def initialize(id, hsh, subsection) |
||||||
|
super |
||||||
|
@id = "referral" |
||||||
|
end |
||||||
|
|
||||||
|
def questions |
||||||
|
@questions ||= [Form::Lettings::Questions::ReferralType.new(nil, nil, self)] |
||||||
|
end |
||||||
|
end |
@ -0,0 +1,26 @@ |
|||||||
|
class Form::Lettings::Questions::ReferralDirect < ::Form::Question |
||||||
|
def initialize(id, hsh, page) |
||||||
|
super |
||||||
|
@id = "referral" |
||||||
|
@copy_key = "lettings.household_situation.referral.direct" |
||||||
|
@type = "radio" |
||||||
|
@check_answers_card_number = 0 |
||||||
|
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] |
||||||
|
end |
||||||
|
|
||||||
|
def answer_options |
||||||
|
{ |
||||||
|
"20" => { |
||||||
|
"value" => "Homeless households owed a duty and not on a housing register or waiting list", |
||||||
|
}, |
||||||
|
"2" => { |
||||||
|
"value" => "Tenant applied directly for an available property", |
||||||
|
}, |
||||||
|
"6" => { |
||||||
|
"value" => "Relocated through official housing mobility scheme", |
||||||
|
}, |
||||||
|
}.freeze |
||||||
|
end |
||||||
|
|
||||||
|
QUESTION_NUMBER_FROM_YEAR = { 2025 => 84 }.freeze |
||||||
|
end |
@ -0,0 +1,32 @@ |
|||||||
|
class Form::Lettings::Questions::ReferralHsc < ::Form::Question |
||||||
|
def initialize(id, hsh, page) |
||||||
|
super |
||||||
|
@id = "referral" |
||||||
|
@copy_key = "lettings.household_situation.referral.hsc" |
||||||
|
@type = "radio" |
||||||
|
@check_answers_card_number = 0 |
||||||
|
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] |
||||||
|
end |
||||||
|
|
||||||
|
def answer_options |
||||||
|
{ |
||||||
|
"15" => { |
||||||
|
"value" => "Health service", |
||||||
|
}, |
||||||
|
"9" => { |
||||||
|
"value" => "Community learning disability team", |
||||||
|
}, |
||||||
|
"14" => { |
||||||
|
"value" => "Community mental health team", |
||||||
|
}, |
||||||
|
"24" => { |
||||||
|
"value" => "Adult social services", |
||||||
|
}, |
||||||
|
"17" => { |
||||||
|
"value" => "Children's social care", |
||||||
|
}, |
||||||
|
}.freeze |
||||||
|
end |
||||||
|
|
||||||
|
QUESTION_NUMBER_FROM_YEAR = { 2025 => 84 }.freeze |
||||||
|
end |
@ -0,0 +1,23 @@ |
|||||||
|
class Form::Lettings::Questions::ReferralJustice < ::Form::Question |
||||||
|
def initialize(id, hsh, page) |
||||||
|
super |
||||||
|
@id = "referral" |
||||||
|
@copy_key = "lettings.household_situation.referral.justice" |
||||||
|
@type = "radio" |
||||||
|
@check_answers_card_number = 0 |
||||||
|
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] |
||||||
|
end |
||||||
|
|
||||||
|
def answer_options |
||||||
|
{ |
||||||
|
"18" => { |
||||||
|
"value" => "With a custodial sentence", |
||||||
|
}, |
||||||
|
"19" => { |
||||||
|
"value" => "No custodial sentence", |
||||||
|
}, |
||||||
|
}.freeze |
||||||
|
end |
||||||
|
|
||||||
|
QUESTION_NUMBER_FROM_YEAR = { 2025 => 84 }.freeze |
||||||
|
end |
@ -0,0 +1,29 @@ |
|||||||
|
class Form::Lettings::Questions::ReferralLa < ::Form::Question |
||||||
|
def initialize(id, hsh, page) |
||||||
|
super |
||||||
|
@id = "referral" |
||||||
|
@copy_key = "lettings.household_situation.referral.la" |
||||||
|
@type = "radio" |
||||||
|
@check_answers_card_number = 0 |
||||||
|
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] |
||||||
|
end |
||||||
|
|
||||||
|
def answer_options |
||||||
|
{ |
||||||
|
"21" => { |
||||||
|
"value" => "Local authority lettings", |
||||||
|
}, |
||||||
|
"3" => { |
||||||
|
"value" => "PRP lettings nominated by a local authority", |
||||||
|
}, |
||||||
|
"4" => { |
||||||
|
"value" => "PRP support lettings referred by a local authority", |
||||||
|
}, |
||||||
|
"22" => { |
||||||
|
"value" => "Other", |
||||||
|
}, |
||||||
|
}.freeze |
||||||
|
end |
||||||
|
|
||||||
|
QUESTION_NUMBER_FROM_YEAR = { 2025 => 84 }.freeze |
||||||
|
end |
@ -0,0 +1,26 @@ |
|||||||
|
class Form::Lettings::Questions::ReferralPrp < ::Form::Question |
||||||
|
def initialize(id, hsh, page) |
||||||
|
super |
||||||
|
@id = "referral" |
||||||
|
@copy_key = "lettings.household_situation.referral.prp" |
||||||
|
@type = "radio" |
||||||
|
@check_answers_card_number = 0 |
||||||
|
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] |
||||||
|
end |
||||||
|
|
||||||
|
def answer_options |
||||||
|
{ |
||||||
|
"1" => { |
||||||
|
"value" => "Internal transfer from another property with the same landlord", |
||||||
|
}, |
||||||
|
"10" => { |
||||||
|
"value" => "A different PRP landlord", |
||||||
|
}, |
||||||
|
"23" => { |
||||||
|
"value" => "Other", |
||||||
|
}, |
||||||
|
}.freeze |
||||||
|
end |
||||||
|
|
||||||
|
QUESTION_NUMBER_FROM_YEAR = { 2025 => 84 }.freeze |
||||||
|
end |
@ -0,0 +1,38 @@ |
|||||||
|
class Form::Lettings::Questions::ReferralType < ::Form::Question |
||||||
|
def initialize(id, hsh, page) |
||||||
|
super |
||||||
|
@id = "referral_type" |
||||||
|
@copy_key = "lettings.household_situation.referral" |
||||||
|
@type = "radio" |
||||||
|
@check_answers_card_number = 0 |
||||||
|
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] |
||||||
|
end |
||||||
|
|
||||||
|
def answer_options |
||||||
|
{ |
||||||
|
"101" => { |
||||||
|
"value" => "Direct", |
||||||
|
}, |
||||||
|
"102" => { |
||||||
|
"value" => "From a local authority housing register or waiting list", |
||||||
|
}, |
||||||
|
"103" => { |
||||||
|
"value" => "From a PRP-only housing register or waiting list (no local authority involvement)", |
||||||
|
}, |
||||||
|
"104" => { |
||||||
|
"value" => "Health and social care services", |
||||||
|
}, |
||||||
|
"105" => { |
||||||
|
"value" => "Police, probation, prison or youth offending team", |
||||||
|
}, |
||||||
|
"7" => { |
||||||
|
"value" => "Voluntary agency", |
||||||
|
}, |
||||||
|
"16" => { |
||||||
|
"value" => "Other", |
||||||
|
}, |
||||||
|
}.freeze |
||||||
|
end |
||||||
|
|
||||||
|
QUESTION_NUMBER_FROM_YEAR = { 2025 => 84 }.freeze |
||||||
|
end |
Loading…
Reference in new issue