Refactor summaries into model

This lets us encapsulate some of the logic that’s currently cluttering
up the view/template layer.
This commit is contained in:
Chris Hill-Scott
2020-02-12 14:03:51 +00:00
parent 5ba5ee2502
commit 74e70ed8bc
4 changed files with 18 additions and 13 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',