Make technical failure letters show up on the activity page

This commit is contained in:
Chris Hill-Scott
2019-01-10 17:23:03 +00:00
parent 55279c91b5
commit 989875294b
3 changed files with 20 additions and 19 deletions

View File

@@ -144,7 +144,7 @@
{% macro notification_status_field(notification) %}
{% set displayed_on_single_line = notification.status in ['created', 'pending', 'sending', 'delivered'] %}
{% set displayed_on_single_line = notification.status in ['created', 'pending', 'pending-virus-check', 'sending', 'sent', 'delivered', 'returned-letter', 'accepted', 'received'] %}
{% if not notification %}
{% call field(align='right') %}{% endcall %}
@@ -157,14 +157,7 @@
{% if notification.status|format_notification_status_as_url(notification.notification_type) %}
<a href="{{ notification.status|format_notification_status_as_url(notification.notification_type) }}">
{% endif %}
{% if notification['notification_type'] != "letter" or notification.status in ('virus-scan-failed', 'validation-failed') %}
{{ notification.status|format_notification_status(
notification.template.template_type
) }}
{% endif %}
{% if notification.notification_type == "letter" and notification.status in ['permanent-failure', 'cancelled'] %}
Cancelled
{% endif %}
{{ notification.status|format_notification_status(notification.template.template_type) }}
{% if notification.status|format_notification_status_as_url(notification.notification_type) %}
</a>
{% endif %}