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 @@
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 %>