mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-12 01:48:54 -04:00
If possible, show sent not uploaded time for jobs
If you’re looking back at a job that was scheduled and has now been sent it’s more useful and consistent to know what time it went out. The time it was uploaded at is a bit arbitrary once it’s sent. The only time the uploaded time is relevant is when the job is still waiting to be sent. Slightly fiddlier than it sounds because we never want to show ‘uploaded by’ for a job that hasn’t been scheduled because it almost immediately changes to ‘sent by’. This flickering of the UI is undesirable.
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
<div class="ajax-block-container">
|
||||
<p class='heading-small bottom-gutter'>
|
||||
Uploaded by {{ job.created_by.name }} on {{ job.created_at|format_datetime_short }}
|
||||
{% if job.scheduled_for %}
|
||||
{% if job.processing_started %}
|
||||
Sent by {{ job.created_by.name }} on {{ job.processing_started|format_datetime_short }}
|
||||
{% else %}
|
||||
Uploaded by {{ job.created_by.name }} on {{ job.created_at|format_datetime_short }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
Sent by {{ job.created_by.name }} on {{ job.created_at|format_datetime_short }}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -267,7 +267,7 @@ def test_should_show_updates_for_one_job_as_json(
|
||||
assert 'Status' in content['notifications']
|
||||
assert 'Delivered' in content['notifications']
|
||||
assert '12:01am' in content['notifications']
|
||||
assert 'Uploaded by Test User on 1 January at midnight' in content['status']
|
||||
assert 'Sent by Test User on 1 January at midnight' in content['status']
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
Reference in New Issue
Block a user