Browse Source

Update the content to use the correct dates

pull/2119/head
Kat 2 years ago
parent
commit
b6a1c24efc
  1. 4
      app/models/form_handler.rb
  2. 4
      app/views/home/_upcoming_deadlines.html.erb

4
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

4
app/views/home/_upcoming_deadlines.html.erb

@ -1,10 +1,10 @@
<h1 class="govuk-heading-l">Upcoming deadlines</h1>
<% current_quarter = quarter_for_date(date: Time.zone.now) %>
<% if current_quarter.present? %>
<p class="govuk-body govuk-body-m"><strong>12 January 2024</strong>: Quarterly cut off date for tenancies and sales starting between 1 October 2023 and 31 December 2023.</p>
<p class="govuk-body govuk-body-m"><strong><%= current_quarter.cutoff_date.to_formatted_s(:govuk_date) %></strong>: 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) %>.</p>
<% 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 %>
<p class="govuk-body govuk-body-m"><strong><%= current_lettings_form.submission_deadline.to_formatted_s(:govuk_date) %></strong>: 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) %></p>
<%= govuk_details(summary_text: "Quarterly cut-off dates for 2024 to 2025") do %>
<ul class="govuk-list govuk-list--bullet">

Loading…
Cancel
Save