From b6a1c24efcb483f38dfcc885f997612f4af4dff8 Mon Sep 17 00:00:00 2001 From: Kat Date: Fri, 5 Jan 2024 16:11:06 +0000 Subject: [PATCH] Update the content to use the correct dates --- app/models/form_handler.rb | 4 ++++ app/views/home/_upcoming_deadlines.html.erb | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/models/form_handler.rb b/app/models/form_handler.rb index 83bfb0f8a..d9a3d4a35 100644 --- a/app/models/form_handler.rb +++ b/app/models/form_handler.rb @@ -28,6 +28,10 @@ class FormHandler forms["current_lettings"] end + def previous_lettings_form + forms["previous_lettings"] + end + def current_sales_form forms["current_sales"] end diff --git a/app/views/home/_upcoming_deadlines.html.erb b/app/views/home/_upcoming_deadlines.html.erb index 5a2300ea4..a18503ecc 100644 --- a/app/views/home/_upcoming_deadlines.html.erb +++ b/app/views/home/_upcoming_deadlines.html.erb @@ -1,10 +1,10 @@

Upcoming deadlines

<% current_quarter = quarter_for_date(date: Time.zone.now) %> <% if current_quarter.present? %> -

12 January 2024: Quarterly cut off date for tenancies and sales starting between 1 October 2023 and 31 December 2023.

+

<%= current_quarter.cutoff_date.to_formatted_s(:govuk_date) %>: Quarterly cut off date for tenancies and sales starting between <%= current_quarter.quarter_start_date.to_formatted_s(:govuk_date) %> and <%= current_quarter.quarter_end_date.to_formatted_s(:govuk_date) %>.

<% end %> -<% current_lettings_form = FormHandler.instance.current_lettings_form %> +<% current_lettings_form = FormHandler.instance.in_crossover_period? ? FormHandler.instance.previous_lettings_form : FormHandler.instance.current_lettings_form %>

<%= current_lettings_form.submission_deadline.to_formatted_s(:govuk_date) %>: Deadline to submit logs for tenancies starting between <%= collection_start_date(Time.zone.now).to_formatted_s(:govuk_date) %> to <%= collection_end_date(Time.zone.now).to_formatted_s(:govuk_date) %>

<%= govuk_details(summary_text: "Quarterly cut-off dates for 2024 to 2025") do %>