Files
notifications-admin/app/templates/views/dashboard/_totals.html
Chris Hill-Scott 6c841affc8 Always show letter counts on dashboard
We hid letters originally because it wasn’t a mature feature. We rolled
it out by letting teams choose to use it (#1803)
and then automatically giving it to new teams (notifications-api/#1600).

This commit doesn’t change who has access to letters, but it does make
it more discoverable by revealing it in the UI. This is the same thing we do for emails/texts, where even if you switch them off they still show up on the dashboard and usage
page.
2019-10-29 16:19:38 +00:00

44 lines
2.1 KiB
HTML

{% from "components/big-number.html" import big_number_with_status %}
{% from "components/message-count-label.html" import message_count_label %}
<div class="ajax-block-container">
<div class="grid-row">
<div id="total-email" class="{{column_width}}">
{{ big_number_with_status(
statistics['email']['requested'],
message_count_label(statistics['email']['requested'], 'email', suffix='sent'),
statistics['email']['failed'],
statistics['email']['failed_percentage'],
statistics['email']['show_warning'],
failure_link=url_for(".view_notifications", service_id=service_id, message_type='email', status='failed'),
link=url_for(".view_notifications", service_id=service_id, message_type='email', status='sending,delivered,failed'),
smaller=smaller_font_size
) }}
</div>
<div id="total-sms" class="{{column_width}}">
{{ big_number_with_status(
statistics['sms']['requested'],
message_count_label(statistics['sms']['requested'], 'sms', suffix='sent'),
statistics['sms']['failed'],
statistics['sms']['failed_percentage'],
statistics['sms']['show_warning'],
failure_link=url_for(".view_notifications", service_id=service_id, message_type='sms', status='failed'),
link=url_for(".view_notifications", service_id=service_id, message_type='sms', status='sending,delivered,failed'),
smaller=smaller_font_size
) }}
</div>
<div id="total-letters" class="{{column_width}}">
{{ big_number_with_status(
statistics['letter']['requested'],
message_count_label(statistics['letter']['requested'], 'letter', suffix='sent'),
statistics['letter']['failed'],
statistics['letter']['failed_percentage'],
statistics['letter']['show_warning'],
failure_link=url_for(".view_notifications", service_id=service_id, message_type='letter', status='failed'),
link=url_for(".view_notifications", service_id=service_id, message_type='letter', status=''),
smaller=smaller_font_size
) }}
</div>
</div>
</div>