mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 09:28:27 -04:00
more test fixes & letter trimming
This commit is contained in:
@@ -355,20 +355,14 @@ def get_job_partials(job):
|
||||
filter_args = parse_filter_args(request.args)
|
||||
filter_args['status'] = set_status_filters(filter_args)
|
||||
notifications = job.get_notifications(status=filter_args['status'])
|
||||
if job.template_type == 'letter':
|
||||
counts = render_template(
|
||||
'partials/jobs/count-letters.html',
|
||||
job=job,
|
||||
)
|
||||
else:
|
||||
counts = render_template(
|
||||
'partials/count.html',
|
||||
counts=_get_job_counts(job),
|
||||
status=filter_args['status'],
|
||||
notifications_deleted=(
|
||||
job.status == 'finished' and not notifications['notifications']
|
||||
),
|
||||
)
|
||||
counts = render_template(
|
||||
'partials/count.html',
|
||||
counts=_get_job_counts(job),
|
||||
status=filter_args['status'],
|
||||
notifications_deleted=(
|
||||
job.status == 'finished' and not notifications['notifications']
|
||||
),
|
||||
)
|
||||
service_data_retention_days = current_service.get_days_of_retention(job.template_type)
|
||||
|
||||
return {
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
{% from 'components/big-number.html' import big_number %}
|
||||
|
||||
<div class="govuk-grid-row bottom-gutter-2-3">
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<div class="keyline-block">
|
||||
{{ big_number(
|
||||
job.notification_count,
|
||||
job.notification_count|message_count_label('letter', suffix='')|capitalize,
|
||||
smaller=True
|
||||
)}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<div class="keyline-block">
|
||||
{{ big_number(
|
||||
job.letter_timings.earliest_delivery|string|format_date_short,
|
||||
'Estimated delivery date',
|
||||
smaller=True
|
||||
)}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,31 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>Letter preview</title>
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #dee0e2;
|
||||
margin: 0;
|
||||
}
|
||||
img {
|
||||
display: block;
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.letter-postage,
|
||||
.visually-hidden {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{ template }}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user