Files
notifications-admin/app/main/views/organizations.py

436 lines
15 KiB
Python
Raw Normal View History

2019-03-22 14:46:03 +00:00
from collections import OrderedDict
from datetime import datetime
from functools import partial
2019-03-22 14:46:03 +00:00
from flask import flash, redirect, render_template, request, url_for
from flask_login import current_user
from notifications_python_client.errors import HTTPError
2018-02-19 16:53:29 +00:00
2018-03-06 17:12:31 +00:00
from app import (
2023-07-12 12:09:44 -04:00
current_organization,
email_branding_client,
2018-03-06 17:12:31 +00:00
org_invite_api_client,
2023-07-12 12:09:44 -04:00
organizations_client,
2018-03-06 17:12:31 +00:00
)
from app.main import main
2018-02-19 16:53:29 +00:00
from app.main.forms import (
AdminBillingDetailsForm,
2023-07-12 12:09:44 -04:00
AdminNewOrganizationForm,
AdminNotesForm,
2023-07-12 12:09:44 -04:00
AdminOrganizationDomainsForm,
AdminOrganizationGoLiveNotesForm,
AdminPreviewBrandingForm,
AdminSetEmailBrandingForm,
2018-02-19 16:53:29 +00:00
InviteOrgUserForm,
2023-07-12 12:09:44 -04:00
OrganizationOrganizationTypeForm,
RenameOrganizationForm,
SearchByNameForm,
SearchUsersForm,
2018-02-19 16:53:29 +00:00
)
from app.main.views.dashboard import (
get_tuples_of_financial_years,
requested_and_current_financial_year,
)
from app.main.views.service_settings import get_branding_as_value_and_label
2023-07-12 12:09:44 -04:00
from app.models.organization import AllOrganizations, Organization
from app.models.user import InvitedOrgUser, User
from app.utils.csv import Spreadsheet
from app.utils.user import user_has_permissions, user_is_platform_admin
2023-07-12 12:09:44 -04:00
@main.route("/organizations", methods=['GET'])
@user_is_platform_admin
2023-07-12 12:09:44 -04:00
def organizations():
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/index.html',
organizations=AllOrganizations(),
search_form=SearchByNameForm(),
)
2023-07-12 12:09:44 -04:00
@main.route("/organizations/add", methods=['GET', 'POST'])
@user_is_platform_admin
2023-07-12 12:09:44 -04:00
def add_organization():
form = AdminNewOrganizationForm()
2018-02-14 13:08:44 +00:00
if form.validate_on_submit():
Handle exception is org name already exists Previously this would return a 500 error, as the 400 exception was not handled from the API [1]. Note that: - We tend to rely on exception messages to identify the error that occurred [2][3], with services being a notable deviation [4]. I've used the exception message approach, as this is more granular and broadly consistent with the rest of the app. - There is already code to cover this scenario when a user changes the name of an existing organisation or service, but the mechanism is different [5][6]. It makes sense to just get any error from the call to try and create the organisation. - The API mock is based on one for services [7], but I've chosen to have it inline with the test, since we're unlikely to reuse it, and it's clearer to have the test setup as part of the test. [1]: https://github.com/alphagov/notifications-api/blob/8f99da525dad3bf653a4e1f9e4a7b7b689219d78/app/organisation/rest.py#L34-L47 [2]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/manage_users.py#L166 [3]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/templates.py#L499 [4]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/add_service.py#L30 [5]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/service_settings.py#L102-L104 [6]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/organisations.py#L264-L266 [7]: https://github.com/alphagov/notifications-admin/blob/0abc143147c98ac50c059729eb5c1a4755d607fa/tests/conftest.py#L590-L606
2021-02-11 12:02:42 +00:00
try:
return redirect(url_for(
2023-07-12 12:09:44 -04:00
'.organization_settings',
org_id=Organization.create_from_form(form).id,
Handle exception is org name already exists Previously this would return a 500 error, as the 400 exception was not handled from the API [1]. Note that: - We tend to rely on exception messages to identify the error that occurred [2][3], with services being a notable deviation [4]. I've used the exception message approach, as this is more granular and broadly consistent with the rest of the app. - There is already code to cover this scenario when a user changes the name of an existing organisation or service, but the mechanism is different [5][6]. It makes sense to just get any error from the call to try and create the organisation. - The API mock is based on one for services [7], but I've chosen to have it inline with the test, since we're unlikely to reuse it, and it's clearer to have the test setup as part of the test. [1]: https://github.com/alphagov/notifications-api/blob/8f99da525dad3bf653a4e1f9e4a7b7b689219d78/app/organisation/rest.py#L34-L47 [2]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/manage_users.py#L166 [3]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/templates.py#L499 [4]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/add_service.py#L30 [5]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/service_settings.py#L102-L104 [6]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/organisations.py#L264-L266 [7]: https://github.com/alphagov/notifications-admin/blob/0abc143147c98ac50c059729eb5c1a4755d607fa/tests/conftest.py#L590-L606
2021-02-11 12:02:42 +00:00
))
except HTTPError as e:
msg = 'Organization name already exists'
Handle exception is org name already exists Previously this would return a 500 error, as the 400 exception was not handled from the API [1]. Note that: - We tend to rely on exception messages to identify the error that occurred [2][3], with services being a notable deviation [4]. I've used the exception message approach, as this is more granular and broadly consistent with the rest of the app. - There is already code to cover this scenario when a user changes the name of an existing organisation or service, but the mechanism is different [5][6]. It makes sense to just get any error from the call to try and create the organisation. - The API mock is based on one for services [7], but I've chosen to have it inline with the test, since we're unlikely to reuse it, and it's clearer to have the test setup as part of the test. [1]: https://github.com/alphagov/notifications-api/blob/8f99da525dad3bf653a4e1f9e4a7b7b689219d78/app/organisation/rest.py#L34-L47 [2]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/manage_users.py#L166 [3]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/templates.py#L499 [4]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/add_service.py#L30 [5]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/service_settings.py#L102-L104 [6]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/organisations.py#L264-L266 [7]: https://github.com/alphagov/notifications-admin/blob/0abc143147c98ac50c059729eb5c1a4755d607fa/tests/conftest.py#L590-L606
2021-02-11 12:02:42 +00:00
if e.status_code == 400 and msg in e.message:
form.name.errors.append("This organization name is already in use")
Handle exception is org name already exists Previously this would return a 500 error, as the 400 exception was not handled from the API [1]. Note that: - We tend to rely on exception messages to identify the error that occurred [2][3], with services being a notable deviation [4]. I've used the exception message approach, as this is more granular and broadly consistent with the rest of the app. - There is already code to cover this scenario when a user changes the name of an existing organisation or service, but the mechanism is different [5][6]. It makes sense to just get any error from the call to try and create the organisation. - The API mock is based on one for services [7], but I've chosen to have it inline with the test, since we're unlikely to reuse it, and it's clearer to have the test setup as part of the test. [1]: https://github.com/alphagov/notifications-api/blob/8f99da525dad3bf653a4e1f9e4a7b7b689219d78/app/organisation/rest.py#L34-L47 [2]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/manage_users.py#L166 [3]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/templates.py#L499 [4]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/add_service.py#L30 [5]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/service_settings.py#L102-L104 [6]: https://github.com/alphagov/notifications-admin/blob/70b606a2d4cb03f2bd9f3a5742a40970a928e696/app/main/views/organisations.py#L264-L266 [7]: https://github.com/alphagov/notifications-admin/blob/0abc143147c98ac50c059729eb5c1a4755d607fa/tests/conftest.py#L590-L606
2021-02-11 12:02:42 +00:00
else:
raise e
2018-02-14 13:08:44 +00:00
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/add-organization.html',
2018-02-14 13:08:44 +00:00
form=form
)
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>", methods=['GET'])
@user_has_permissions()
2023-07-12 12:09:44 -04:00
def organization_dashboard(org_id):
year, current_financial_year = requested_and_current_financial_year(request)
2023-07-12 12:09:44 -04:00
services = current_organization.services_and_usage(
financial_year=year
)['services']
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/organization/index.html',
services=services,
years=get_tuples_of_financial_years(
2023-07-12 12:09:44 -04:00
partial(url_for, '.organization_dashboard', org_id=current_organization.id),
start=current_financial_year - 2,
end=current_financial_year,
),
selected_year=year,
search_form=SearchByNameForm() if len(services) > 7 else None,
**{
f'total_{key}': sum(service[key] for service in services)
2022-12-05 15:33:44 -05:00
for key in ('emails_sent', 'sms_cost')
},
download_link=url_for(
2023-07-12 12:09:44 -04:00
'.download_organization_usage_report',
org_id=org_id,
selected_year=year
)
)
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>/download-usage-report.csv", methods=['GET'])
@user_has_permissions()
2023-07-12 12:09:44 -04:00
def download_organization_usage_report(org_id):
selected_year = request.args.get('selected_year')
2023-07-12 12:09:44 -04:00
services_usage = current_organization.services_and_usage(
financial_year=selected_year
)['services']
unit_column_names = OrderedDict([
('service_id', 'Service ID'),
('service_name', 'Service Name'),
('emails_sent', 'Emails sent'),
('sms_remainder', 'Free text message allowance remaining'),
])
monetary_column_names = OrderedDict([
2022-10-12 20:16:22 +00:00
('sms_cost', 'Spent on text messages ($)'),
])
org_usage_data = [
list(unit_column_names.values()) + list(monetary_column_names.values())
] + [
[
service[attribute] for attribute in unit_column_names.keys()
] + [
'{:,.2f}'.format(service[attribute]) for attribute in monetary_column_names.keys()
]
for service in services_usage
]
return Spreadsheet.from_rows(org_usage_data).as_csv_data, 200, {
'Content-Type': 'text/csv; charset=utf-8',
'Content-Disposition': (
'inline;'
2023-07-12 12:09:44 -04:00
'filename="{} organization usage report for year {}'
' - generated on {}.csv"'.format(
2023-07-12 12:09:44 -04:00
current_organization.name,
selected_year,
datetime.now().strftime("%Y-%m-%dT%H:%M:%S.%fZ")
))
}
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>/trial-services", methods=['GET'])
@user_is_platform_admin
2023-07-12 12:09:44 -04:00
def organization_trial_mode_services(org_id):
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/organization/trial-mode-services.html',
search_form=SearchByNameForm(),
)
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>/users", methods=['GET'])
@user_has_permissions()
2018-02-19 16:53:29 +00:00
def manage_org_users(org_id):
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/organization/users/index.html',
users=current_organization.team_members,
show_search_box=(len(current_organization.team_members) > 7),
2018-02-19 16:53:29 +00:00
form=SearchUsersForm(),
)
2018-02-19 16:53:29 +00:00
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>/users/invite", methods=['GET', 'POST'])
@user_has_permissions()
2018-02-19 16:53:29 +00:00
def invite_org_user(org_id):
form = InviteOrgUserForm(
inviter_email_address=current_user.email_address
2018-02-19 16:53:29 +00:00
)
if form.validate_on_submit():
email_address = form.email_address.data
invited_org_user = InvitedOrgUser.create(
2018-02-19 16:53:29 +00:00
current_user.id,
org_id,
email_address
)
flash('Invite sent to {}'.format(invited_org_user.email_address), 'default_with_tick')
return redirect(url_for('.manage_org_users', org_id=org_id))
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/organization/users/invite-org-user.html',
2018-02-19 16:53:29 +00:00
form=form
)
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>/users/<uuid:user_id>", methods=['GET'])
@user_has_permissions()
2023-07-12 12:09:44 -04:00
def edit_organization_user(org_id, user_id):
# The only action that can be done to an org user is to remove them from the org.
# This endpoint is used to get the ID of the user to delete without passing it as a
# query string, but it uses the template for all org team members in order to avoid
# having a page containing a single link.
2018-02-19 16:53:29 +00:00
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/organization/users/index.html',
users=current_organization.team_members,
show_search_box=(len(current_organization.team_members) > 7),
form=SearchUsersForm(),
user_to_remove=User.from_id(user_id)
2018-02-19 16:53:29 +00:00
)
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>/users/<uuid:user_id>/delete", methods=['POST'])
@user_has_permissions()
2023-07-12 12:09:44 -04:00
def remove_user_from_organization(org_id, user_id):
organizations_client.remove_user_from_organization(org_id, user_id)
2018-02-19 16:53:29 +00:00
return redirect(url_for('.show_accounts_or_dashboard'))
2018-02-19 16:53:29 +00:00
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>/cancel-invited-user/<uuid:invited_user_id>", methods=['GET'])
@user_has_permissions()
2018-02-19 16:53:29 +00:00
def cancel_invited_org_user(org_id, invited_user_id):
org_invite_api_client.cancel_invited_user(org_id=org_id, invited_user_id=invited_user_id)
invited_org_user = InvitedOrgUser.by_id_and_org_id(org_id, invited_user_id)
flash(f'Invitation cancelled for {invited_org_user.email_address}', 'default_with_tick')
2018-02-19 16:53:29 +00:00
return redirect(url_for('main.manage_org_users', org_id=org_id))
2018-03-06 17:12:31 +00:00
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>/settings/", methods=['GET'])
@user_is_platform_admin
2023-07-12 12:09:44 -04:00
def organization_settings(org_id):
2018-03-06 17:12:31 +00:00
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/organization/settings/index.html',
2018-03-06 17:12:31 +00:00
)
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>/settings/edit-name", methods=['GET', 'POST'])
@user_is_platform_admin
2023-07-12 12:09:44 -04:00
def edit_organization_name(org_id):
form = RenameOrganizationForm(name=current_organization.name)
2018-03-06 17:12:31 +00:00
if form.validate_on_submit():
try:
2023-07-12 12:09:44 -04:00
current_organization.update(name=form.name.data)
except HTTPError as http_error:
error_msg = 'Organization name already exists'
if http_error.status_code == 400 and error_msg in http_error.message:
form.name.errors.append('This organization name is already in use')
else:
raise http_error
else:
2023-07-12 12:09:44 -04:00
return redirect(url_for('.organization_settings', org_id=org_id))
2018-03-06 17:12:31 +00:00
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/organization/settings/edit-name.html',
2018-03-06 17:12:31 +00:00
form=form,
)
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>/settings/edit-type", methods=['GET', 'POST'])
@user_is_platform_admin
2023-07-12 12:09:44 -04:00
def edit_organization_type(org_id):
2023-07-12 12:09:44 -04:00
form = OrganizationOrganizationTypeForm(
organization_type=current_organization.organization_type
)
if form.validate_on_submit():
2023-07-12 12:09:44 -04:00
current_organization.update(
organization_type=form.organization_type.data,
delete_services_cache=True,
)
2023-07-12 12:09:44 -04:00
return redirect(url_for('.organization_settings', org_id=org_id))
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/organization/settings/edit-type.html',
form=form,
)
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>/settings/set-email-branding", methods=['GET', 'POST'])
@user_is_platform_admin
2023-07-12 12:09:44 -04:00
def edit_organization_email_branding(org_id):
email_branding = email_branding_client.get_all_email_branding()
form = AdminSetEmailBrandingForm(
all_branding_options=get_branding_as_value_and_label(email_branding),
2023-07-12 12:09:44 -04:00
current_branding=current_organization.email_branding_id,
)
if form.validate_on_submit():
return redirect(url_for(
2023-07-12 12:09:44 -04:00
'.organization_preview_email_branding',
org_id=org_id,
branding_style=form.branding_style.data,
))
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/organization/settings/set-email-branding.html',
form=form,
search_form=SearchByNameForm()
)
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>/settings/preview-email-branding", methods=['GET', 'POST'])
@user_is_platform_admin
2023-07-12 12:09:44 -04:00
def organization_preview_email_branding(org_id):
branding_style = request.args.get('branding_style', None)
form = AdminPreviewBrandingForm(branding_style=branding_style)
if form.validate_on_submit():
2023-07-12 12:09:44 -04:00
current_organization.update(
email_branding_id=form.branding_style.data,
delete_services_cache=True,
)
2023-07-12 12:09:44 -04:00
return redirect(url_for('.organization_settings', org_id=org_id))
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/organization/settings/preview-email-branding.html',
form=form,
2023-07-12 12:09:44 -04:00
action=url_for('main.organization_preview_email_branding', org_id=org_id),
)
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>/settings/edit-organization-domains", methods=['GET', 'POST'])
@user_is_platform_admin
2023-07-12 12:09:44 -04:00
def edit_organization_domains(org_id):
2023-07-12 12:09:44 -04:00
form = AdminOrganizationDomainsForm()
if form.validate_on_submit():
try:
2023-07-12 12:09:44 -04:00
organizations_client.update_organization(
org_id,
domains=list(OrderedDict.fromkeys(
domain.lower()
for domain in filter(None, form.domains.data)
)),
)
except HTTPError as e:
error_message = "Domain already exists"
if e.status_code == 400 and error_message in e.message:
flash("This domain is already in use", "error")
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/organization/settings/edit-domains.html',
form=form,
)
else:
raise e
2023-07-12 12:09:44 -04:00
return redirect(url_for('.organization_settings', org_id=org_id))
2023-07-12 12:09:44 -04:00
form.populate(current_organization.domains)
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/organization/settings/edit-domains.html',
form=form,
)
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>/settings/edit-go-live-notes", methods=['GET', 'POST'])
@user_is_platform_admin
2023-07-12 12:09:44 -04:00
def edit_organization_go_live_notes(org_id):
2023-07-12 12:09:44 -04:00
form = AdminOrganizationGoLiveNotesForm()
if form.validate_on_submit():
2023-07-12 12:09:44 -04:00
organizations_client.update_organization(
org_id,
request_to_go_live_notes=form.request_to_go_live_notes.data
)
2023-07-12 12:09:44 -04:00
return redirect(url_for('.organization_settings', org_id=org_id))
2023-07-12 12:09:44 -04:00
org = organizations_client.get_organization(org_id)
form.request_to_go_live_notes.data = org['request_to_go_live_notes']
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/organization/settings/edit-go-live-notes.html',
form=form,
)
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>/settings/notes", methods=['GET', 'POST'])
@user_is_platform_admin
2023-07-12 12:09:44 -04:00
def edit_organization_notes(org_id):
form = AdminNotesForm(notes=current_organization.notes)
if form.validate_on_submit():
2023-07-12 12:09:44 -04:00
if form.notes.data == current_organization.notes:
return redirect(url_for('.organization_settings', org_id=org_id))
2023-07-12 12:09:44 -04:00
current_organization.update(
notes=form.notes.data
)
2023-07-12 12:09:44 -04:00
return redirect(url_for('.organization_settings', org_id=org_id))
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/organization/settings/edit-organization-notes.html',
form=form,
)
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>/settings/edit-billing-details", methods=['GET', 'POST'])
@user_is_platform_admin
2023-07-12 12:09:44 -04:00
def edit_organization_billing_details(org_id):
form = AdminBillingDetailsForm(
2023-07-12 12:09:44 -04:00
billing_contact_email_addresses=current_organization.billing_contact_email_addresses,
billing_contact_names=current_organization.billing_contact_names,
billing_reference=current_organization.billing_reference,
purchase_order_number=current_organization.purchase_order_number,
notes=current_organization.notes,
)
if form.validate_on_submit():
2023-07-12 12:09:44 -04:00
current_organization.update(
billing_contact_email_addresses=form.billing_contact_email_addresses.data,
billing_contact_names=form.billing_contact_names.data,
billing_reference=form.billing_reference.data,
purchase_order_number=form.purchase_order_number.data,
notes=form.notes.data,
)
2023-07-12 12:09:44 -04:00
return redirect(url_for('.organization_settings', org_id=org_id))
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/organization/settings/edit-organization-billing-details.html',
form=form,
)
2023-07-12 12:09:44 -04:00
@main.route("/organizations/<uuid:org_id>/billing")
@user_is_platform_admin
2023-07-12 12:09:44 -04:00
def organization_billing(org_id):
return render_template(
2023-07-12 12:09:44 -04:00
'views/organizations/organization/billing.html'
)