Merge branch 'master' into convert-all-links-to-govuk-frontend

This commit is contained in:
Tom Byers
2020-02-24 10:12:58 +00:00
committed by GitHub
34 changed files with 468 additions and 135 deletions

View File

@@ -296,10 +296,6 @@ def get_dashboard_partials(service_id):
),
'inbox': render_template(
'views/dashboard/_inbox.html',
inbound_sms_summary=(
service_api_client.get_inbound_sms_summary(service_id)
if current_service.has_permission('inbound_sms') else None
),
),
'totals': render_template(
'views/dashboard/_totals.html',

View File

@@ -2,7 +2,7 @@ from collections import OrderedDict
from flask import render_template
from app import service_api_client
from app import current_service, service_api_client
from app.main import main
from app.utils import Spreadsheet, user_has_permissions
@@ -10,10 +10,9 @@ from app.utils import Spreadsheet, user_has_permissions
@main.route("/services/<uuid:service_id>/returned-letters")
@user_has_permissions('view_activity')
def returned_letter_summary(service_id):
summary = service_api_client.get_returned_letter_summary(service_id)
return render_template(
'views/returned-letter-summary.html',
data=summary,
data=current_service.returned_letter_summary,
)

View File

@@ -234,7 +234,6 @@ def uploaded_letter_preview(service_id, file_id):
@main.route("/services/<uuid:service_id>/preview-letter-image/<uuid:file_id>")
@user_has_permissions('send_messages')
def view_letter_upload_as_preview(service_id, file_id):
try:
page = int(request.args.get('page'))
except ValueError: