Link to downloadable report for org usage

Link is sticky so that it is easy to spot even when
an org has many services.
This commit is contained in:
Pea Tyczynska
2021-11-12 14:35:16 +00:00
parent ccebae6c75
commit 00a629befc
3 changed files with 47 additions and 1 deletions

View File

@@ -156,10 +156,20 @@ def organisation_dashboard(org_id):
**{
f'total_{key}': sum(service[key] for service in services)
for key in ('emails_sent', 'sms_cost', 'letter_cost')
}
},
download_link=url_for(
'.download_services_report_for_org',
org_id=org_id,
)
)
@main.route("/organisations/<uuid:org_id>", methods=['GET'])
@user_has_permissions()
def download_services_report_for_org(org_id):
pass
@main.route("/organisations/<uuid:org_id>/trial-services", methods=['GET'])
@user_is_platform_admin
def organisation_trial_mode_services(org_id):

View File

@@ -112,4 +112,10 @@
<div class="keyline-block govuk-!-margin-top-2"></div>
{% endif %}
<div class="js-stick-at-bottom-when-scrolling">
<p class="bottom-gutter">
<a href="{{ download_link }}" download="download" class="govuk-link govuk-link--no-visited-state govuk-!-font-weight-bold">Download this report</a>
</p>
</div>
{% endblock %}