From a8d38af91d1401e623a95c239e4e123118c9f871 Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Mon, 20 Jan 2025 14:02:04 +0000 Subject: [PATCH] Update condition --- app/views/home/_upcoming_deadlines.html.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/home/_upcoming_deadlines.html.erb b/app/views/home/_upcoming_deadlines.html.erb index 462255d2a..6b7e7aef2 100644 --- a/app/views/home/_upcoming_deadlines.html.erb +++ b/app/views/home/_upcoming_deadlines.html.erb @@ -2,7 +2,7 @@ <% open_lettings_form = FormHandler.instance.in_crossover_period? ? FormHandler.instance.previous_lettings_form : FormHandler.instance.current_lettings_form %> <% formatted_deadline = open_lettings_form.submission_deadline.strftime("%A %-d %B %Y") %> -<% if FormHandler.instance.in_crossover_period? && Time.zone.now <= open_lettings_form.start_date %> +<% if FormHandler.instance.in_crossover_period? && open_lettings_form.submission_deadline > Time.zone.now %>
End of year deadline - <%= formatted_deadline %>: Deadline to submit logs for tenancies starting between <%= open_lettings_form.start_date.to_formatted_s(:govuk_date) %> to <%= collection_end_date(open_lettings_form.start_date).to_formatted_s(:govuk_date) %>
<% end %> @@ -11,13 +11,13 @@<%= "#{current_quarter.quarter} - #{current_quarter.cutoff_date.strftime('%A %-d %B %Y')}" %>: 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 %> -<% unless FormHandler.instance.in_crossover_period? && Time.zone.now <= open_lettings_form.start_date %> +<% unless FormHandler.instance.in_crossover_period? && open_lettings_form.submission_deadline > Time.zone.now %>Try to complete your logs for each quarter by the cut-off date.
You can still create logs for a previous quarter after its cut-off date, as long as you complete them by the end-of-year deadline: <%= formatted_deadline %>.
<% end %> -<% if FormHandler.instance.in_crossover_period? && Time.zone.now <= open_lettings_form.start_date %> -<% previous_lettings_form = FormHandler.instance.previous_lettings_form %> +<% if FormHandler.instance.in_crossover_period? && open_lettings_form.submission_deadline > Time.zone.now %> + <% previous_lettings_form = FormHandler.instance.previous_lettings_form %>Prioritise completing logs for the closing collection year. You must complete all <%= previous_lettings_form.start_date.year %> to <%= previous_lettings_form.submission_deadline.year %> logs by the end-of-year deadline. You can still create <%= open_lettings_form.start_date.year %> to <%= open_lettings_form.submission_deadline.year %> logs for this quarter after the quarterly cut-off date.
<% end %>