From b9665bec868eecae60a61467d5723075dadfdb28 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Thu, 25 Jan 2024 10:03:35 +0000 Subject: [PATCH] feat: remove offered form 24 onwards --- .../form/lettings/subsections/property_information.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/form/lettings/subsections/property_information.rb b/app/models/form/lettings/subsections/property_information.rb index 860d4ea88..4600d5e95 100644 --- a/app/models/form/lettings/subsections/property_information.rb +++ b/app/models/form/lettings/subsections/property_information.rb @@ -16,7 +16,7 @@ class Form::Lettings::Subsections::PropertyInformation < ::Form::Subsection Form::Lettings::Pages::PropertyLetType.new(nil, nil, self), Form::Lettings::Pages::PropertyVacancyReasonNotFirstLet.new(nil, nil, self), Form::Lettings::Pages::PropertyVacancyReasonFirstLet.new(nil, nil, self), - Form::Lettings::Pages::PropertyNumberOfTimesRelet.new(nil, nil, self), + number_of_times_relet, Form::Lettings::Pages::PropertyUnitType.new(nil, nil, self), Form::Lettings::Pages::PropertyBuildingType.new(nil, nil, self), Form::Lettings::Pages::PropertyWheelchairAccessible.new(nil, nil, self), @@ -44,6 +44,10 @@ class Form::Lettings::Subsections::PropertyInformation < ::Form::Subsection end end + def number_of_times_relet + Form::Lettings::Pages::PropertyNumberOfTimesRelet.new(nil, nil, self) unless form.start_year_after_2024? + end + def displayed_in_tasklist?(log) !(log.is_supported_housing? && log.is_renewal?) end