Merge pull request #3165 from alphagov/letters-always-on-usage

Always show letters on the dashboard and usage page
This commit is contained in:
Chris Hill-Scott
2019-11-04 14:49:47 +00:00
committed by GitHub
6 changed files with 74 additions and 229 deletions

View File

@@ -133,11 +133,8 @@ def usage(service_id):
units = billing_api_client.get_billable_units(service_id, year)
yearly_usage = billing_api_client.get_service_usage(service_id, year)
usage_template = 'views/usage.html'
if current_service.has_permission('letter'):
usage_template = 'views/usage-with-letters.html'
return render_template(
usage_template,
'views/usage.html',
months=list(get_free_paid_breakdown_for_billable_units(
year,
free_sms_allowance,
@@ -293,11 +290,8 @@ def get_dashboard_partials(service_id):
]
stats = aggregate_notifications_stats(all_statistics)
column_width, max_notifiction_count = get_column_properties(
number_of_columns=(
3 if current_service.has_permission('letter') else 2
)
)
column_width, max_notifiction_count = get_column_properties(3)
dashboard_totals = get_dashboard_totals(stats),
highest_notification_count = max(
sum(