mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Merge pull request #3297 from alphagov/returned-letters-on-dashboard
Put a count of recently returned letters on the dashboard
This commit is contained in:
@@ -2,19 +2,32 @@
|
||||
{% from "components/message-count-label.html" import message_count_label %}
|
||||
|
||||
<div class="ajax-block">
|
||||
{% if inbound_sms_summary != None %}
|
||||
<a id="total-received" class="govuk-link govuk-link--no-visited-state banner-dashboard" href="{{ url_for('.inbox', service_id=current_service.id) }}">
|
||||
{% if current_service.inbound_sms_summary != None %}
|
||||
<a id="total-received" class="govuk-link govuk-link--no-visited-state banner-dashboard" class="banner-dashboard" href="{{ url_for('.inbox', service_id=current_service.id) }}">
|
||||
<span class="banner-dashboard-count">
|
||||
{{ inbound_sms_summary.count|format_thousands }}
|
||||
{{ current_service.inbound_sms_summary.count|format_thousands }}
|
||||
</span>
|
||||
<span class="banner-dashboard-count-label">
|
||||
{{ message_count_label(inbound_sms_summary.count, 'sms', suffix='received') }}
|
||||
{{ message_count_label(current_service.inbound_sms_summary.count, 'sms', suffix='received') }}
|
||||
</span>
|
||||
{% if inbound_sms_summary.most_recent %}
|
||||
{% if current_service.inbound_sms_summary.most_recent %}
|
||||
<span class="banner-dashboard-meta">
|
||||
latest message {{ inbound_sms_summary.most_recent | format_delta }}
|
||||
latest message {{ current_service.inbound_sms_summary.most_recent | format_delta }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if current_service.returned_letter_summary %}
|
||||
<a id="total-returned-letters" class="govuk-link govuk-link--no-visited-state banner-dashboard" href="{{ url_for('main.returned_letter_summary', service_id=current_service.id) }}">
|
||||
<span class="banner-dashboard-count">
|
||||
{{ current_service.count_of_returned_letters_in_last_7_days|format_thousands }}
|
||||
</span>
|
||||
<span class="banner-dashboard-count-label">
|
||||
returned {{ message_count_label(current_service.count_of_returned_letters_in_last_7_days, 'letter', suffix='') }}
|
||||
</span>
|
||||
<span class="banner-dashboard-meta">
|
||||
latest report {{ current_service.most_recent_returned_letter_report|format_delta_days }}
|
||||
</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{% from "components/table.html" import list_table, row_heading %}
|
||||
{% from "components/message-count-label.html" import message_count_label %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block service_page_title %}
|
||||
@@ -7,9 +8,20 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
<h1 class="heading-large">
|
||||
Returned letters
|
||||
</h1>
|
||||
<div class="grid-row">
|
||||
<div class="column-five-sixths">
|
||||
{{ page_header(
|
||||
'Returned letters',
|
||||
back_link=url_for('main.service_dashboard', service_id=current_service.id)
|
||||
) }}
|
||||
<p class="govuk-body">
|
||||
Reports are published once a month.
|
||||
</p>
|
||||
<p class="govuk-body">
|
||||
You’ll only get a report if one or more of your letters is returned.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-table">
|
||||
{% call(item, row_number) list_table(
|
||||
data,
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
{% call field(align='right') %}
|
||||
<span class="align-with-message-body">
|
||||
<span class="status-hint">
|
||||
Originally sent {{ item.created_at|format_date_normal }}
|
||||
Sent {{ item.created_at|format_date_normal }}
|
||||
</span>
|
||||
</span>
|
||||
{% endcall %}
|
||||
|
||||
Reference in New Issue
Block a user