Browse Source

Lint

pull/2890/head
Manny Dinssa 1 month ago
parent
commit
3b02466013
  1. 4
      app/views/home/_upcoming_deadlines.html.erb

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

@ -1,14 +1,14 @@
<h1 class="govuk-heading-l">Upcoming deadlines</h1>
<% 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")}" %>
<% formatted_deadline = "#{open_lettings_form.submission_deadline.to_formatted_s.strftime('%A %-d %B %Y')}" %>
<% if FormHandler.instance.in_crossover_period? %>
<p class="govuk-body govuk-body-m"><strong>End of year deadline - <%= formatted_deadline %>:</strong> 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) %></p>
<% end %>
<% current_quarter = quarter_for_date(date: Time.zone.now) %>
<% if current_quarter.present? %>
<p class="govuk-body govuk-body-m"><strong><%= "#{current_quarter.quarter} - #{current_quarter.cutoff_date.strftime("%A %-d %B %Y")}" %>:</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>
<p class="govuk-body govuk-body-m"><strong><%= "#{current_quarter.quarter} - #{current_quarter.cutoff_date.strftime('%A %-d %B %Y')}" %>:</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 %>
<% unless FormHandler.instance.in_crossover_period? %>

Loading…
Cancel
Save