Files
notifications-admin/app/templates/views/dashboard/_upcoming.html
Chris Hill-Scott 3ad00adfb3 Reverse chronologically sort scheduled jobs
Now that scheduled jobs are mixed in with regular jobs it looks weird
for the sort order to be different. This makes the sort order
consistently go from furthest in the future to furthest in the past.

The old sort order made sense when scheduled jobs were displayed
separately on the dashboard.
2020-03-06 10:15:51 +00:00

28 lines
1.0 KiB
HTML

{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading %}
{% from "components/big-number.html" import big_number %}
{% from "components/show-more.html" import show_more %}
<div class="ajax-block-container">
{% if current_service.scheduled_jobs %}
<h2 class="heading-medium heading-upcoming-jobs">
In the next few days
</h2>
<a class="govuk-link govuk-link--no-visited-state banner-dashboard" href="{{ url_for('.uploads', service_id=current_service.id) }}">
<span class="banner-dashboard-count">
{{ current_service.scheduled_jobs|length }}
</span>
<span class="banner-dashboard-count-label">
{% if current_service.scheduled_jobs|length == 1 %}
file waiting to send
{% else %}
files waiting to send
{% endif %}
</span>
<span class="banner-dashboard-meta">
sending starts
{{ current_service.scheduled_jobs[-1].scheduled_for|format_datetime_relative }}
</span>
</a>
{% endif %}
</div>