Update banner message for CSV letters

This was always showing the text 'Your letter has been sent...' This has
now been updated to start 'Your letters have been sent...' if a job has
more than one notification in it.
This commit is contained in:
Katie Smith
2018-11-29 11:37:38 +00:00
parent 088d6ee4b0
commit b9688f9ad3
3 changed files with 30 additions and 4 deletions

View File

@@ -93,6 +93,11 @@ def view_job(service_id, job_id):
version=job['template_version']
)['data']
just_sent_message = 'Your {} been sent. Printing starts {} at 5.30pm.'.format(
'letter has' if job['notification_count'] == 1 else 'letters have',
printing_today_or_tomorrow()
)
return render_template(
'views/jobs/job.html',
finished=(total_notifications == processed_notifications),
@@ -110,7 +115,7 @@ def view_job(service_id, job_id):
request.args.get('just_sent') == 'yes' and
template['template_type'] == 'letter'
),
printing_day=printing_today_or_tomorrow()
just_sent_message=just_sent_message,
)

View File

@@ -14,9 +14,7 @@
</h1>
{% if just_sent %}
{{ banner('Your letter has been sent. Printing starts {} at 5.30pm.'.format(printing_day),
type='default',
with_tick=True) }}
{{ banner(just_sent_message, type='default', with_tick=True) }}
{% else %}
{{ ajax_block(partials, updates_url, 'status', finished=finished) }}
{% endif %}