mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 18:22:37 -04:00
Always show created time for sending state
When a notification is in `created` or `sending` the thing you care about is how long it’s been sitting there.
This commit is contained in:
+4
-4
@@ -282,11 +282,11 @@ def format_notification_status(status, template_type):
|
|||||||
}.get(template_type).get(status, status)
|
}.get(template_type).get(status, status)
|
||||||
|
|
||||||
|
|
||||||
def format_notification_status_as_time(status, when):
|
def format_notification_status_as_time(status, created, updated):
|
||||||
return {
|
return {
|
||||||
'sending': ' since {}'.format(when),
|
'sending': ' since {}'.format(created),
|
||||||
'created': ' since {}'.format(when)
|
'created': ' since {}'.format(created)
|
||||||
}.get(status, when)
|
}.get(status, updated)
|
||||||
|
|
||||||
|
|
||||||
def format_notification_status_as_field_status(status):
|
def format_notification_status_as_field_status(status):
|
||||||
|
|||||||
@@ -113,6 +113,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<span class="status-hint">
|
<span class="status-hint">
|
||||||
{{ notification.status|format_notification_status_as_time(
|
{{ notification.status|format_notification_status_as_time(
|
||||||
|
notification.created_at|format_datetime_short,
|
||||||
(notification.updated_at or notification.created_at)|format_datetime_short
|
(notification.updated_at or notification.created_at)|format_datetime_short
|
||||||
) }}
|
) }}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user