Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

28 lines
778 B

class Form::Lettings::Pages::PersonLeadPartner < ::Form::Page
def initialize(id, hsh, subsection, person_index:)
super(id, hsh, subsection)
@id = "person_#{person_index}_lead_partner"
@person_index = person_index
end
def questions
@questions ||= [Form::Lettings::Questions::PersonPartner.new(nil, nil, self, person_index: @person_index)]
end
def depends_on
if form.start_year_2026_or_later?
[
{
"details_known_#{@person_index}" => 0,
"age#{@person_index}" => {
"operator" => ">=",
"operand" => 16,
},
},
{ "details_known_#{@person_index}" => 0, "age#{@person_index}" => nil },
]
else
[{ "details_known_#{@person_index}" => 0 }]
end
end
end