Link to edit billing details page for organisation

This commit is contained in:
Pea Tyczynska
2021-02-04 18:19:54 +00:00
parent 8ea748f6e4
commit f4dc2a173e
4 changed files with 26 additions and 1 deletions

View File

@@ -553,3 +553,9 @@ def edit_organisation_notes(org_id):
'views/organisations/organisation/settings/edit-organisation-notes.html',
form=form,
)
@main.route("/organisations/<uuid:org_id>/settings/edit-billing-details", methods=['GET', 'POST'])
@user_is_platform_admin
def edit_organisation_billing_details(org_id):
pass

View File

@@ -182,6 +182,7 @@ class HeaderNavigation(Navigation):
'download_notifications_csv',
'edit_data_retention',
'edit_organisation_agreement',
'edit_organisation_billing_details',
'edit_organisation_crown_status',
'edit_organisation_domains',
'edit_organisation_email_branding',
@@ -577,6 +578,7 @@ class MainNavigation(Navigation):
'download_notifications_csv',
'edit_data_retention',
'edit_organisation_agreement',
'edit_organisation_billing_details',
'edit_organisation_crown_status',
'edit_organisation_email_branding',
'edit_organisation_domains',
@@ -807,6 +809,7 @@ class CaseworkNavigation(Navigation):
'clear_cache',
'count_content_length',
'edit_organisation_agreement',
'edit_organisation_billing_details',
'edit_organisation_crown_status',
'edit_organisation_domains',
'edit_organisation_email_branding',
@@ -1080,6 +1083,7 @@ class OrgNavigation(Navigation):
'settings': {
'confirm_edit_organisation_name',
'edit_organisation_agreement',
'edit_organisation_billing_details',
'edit_organisation_crown_status',
'edit_organisation_domains',
'edit_organisation_email_branding',

View File

@@ -75,7 +75,7 @@
{% call row() %}
{{ text_field('Billing details')}}
{{ optional_text_field(current_org.billing_details, default="No billing details yet", wrap=True) }}
{{ edit_field('Change', url_for('.organisation_settings', org_id=current_org.id), suffix='billing details for the organisation') }}
{{ edit_field('Change', url_for('.edit_organisation_billing_details', org_id=current_org.id), suffix='billing details for the organisation') }}
{% endcall %}
{% call row() %}

View File

@@ -1313,3 +1313,18 @@ def test_update_organisation_notes(
cached_service_ids=None,
notes="Very fluffy"
)
def test_organisation_settings_links_to_edit_organisation_billing_details_page(
mocker,
mock_get_organisation,
organisation_one,
platform_admin_client,
):
response = platform_admin_client.get(url_for(
'.organisation_settings', org_id=organisation_one['id']
))
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
assert len(page.find_all(
'a', attrs={'href': '/organisations/{}/settings/edit-billing-details'.format(organisation_one['id'])}
)) == 1