mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-29 04:09:07 -04:00
Link to usage, not dashboard
Organisation team members only have access to the dashboard if they’re also a member of that service. They always have access to the usage page, so let’s link there instead.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<nav class="navigation">
|
||||
<ul>
|
||||
<li><a href="{{ url_for('.organisation_dashboard', org_id=current_org.id) }}" {{ org_navigation.is_selected('dashboard') }}>Services</a></li>
|
||||
<li><a href="{{ url_for('.organisation_dashboard', org_id=current_org.id) }}" {{ org_navigation.is_selected('dashboard') }}>Usage</a></li>
|
||||
<li><a href="{{ url_for('.manage_org_users', org_id=current_org.id) }}" {{ org_navigation.is_selected('team-members') }}>Team members</a></li>
|
||||
{% if current_user.platform_admin %}
|
||||
<li><a href="{{ url_for('.organisation_settings', org_id=current_org.id) }}" {{ org_navigation.is_selected('settings') }}>Settings</a></li>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
{% extends "org_template.html" %}
|
||||
|
||||
{% block org_page_title %}
|
||||
Services
|
||||
Usage
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<h1 class="heading-medium">
|
||||
Services
|
||||
Usage
|
||||
</h1>
|
||||
<ul>
|
||||
{% for service in current_org.live_services %}
|
||||
<li class="browse-list-item">
|
||||
<a href="{{ url_for('main.service_dashboard', service_id=service.id) }}" class="browse-list-link">{{ service['name'] }}</a>
|
||||
<a href="{{ url_for('main.usage', service_id=service.id) }}" class="browse-list-link">{{ service['name'] }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
@@ -72,7 +72,7 @@ def test_view_organisation_shows_the_correct_organisation(
|
||||
org_id=ORGANISATION_ID,
|
||||
)
|
||||
|
||||
assert normalize_spaces(page.select_one('h1').text) == 'Services'
|
||||
assert normalize_spaces(page.select_one('h1').text) == 'Usage'
|
||||
|
||||
|
||||
def test_create_new_organisation(
|
||||
@@ -121,8 +121,8 @@ def test_organisation_services_shows_live_services_only(
|
||||
|
||||
assert normalize_spaces(services[0].text) == '1'
|
||||
assert normalize_spaces(services[1].text) == '5'
|
||||
assert services[0].find('a')['href'] == url_for('main.service_dashboard', service_id=SERVICE_ONE_ID)
|
||||
assert services[1].find('a')['href'] == url_for('main.service_dashboard', service_id=SERVICE_TWO_ID)
|
||||
assert services[0].find('a')['href'] == url_for('main.usage', service_id=SERVICE_ONE_ID)
|
||||
assert services[1].find('a')['href'] == url_for('main.usage', service_id=SERVICE_TWO_ID)
|
||||
|
||||
|
||||
def test_organisation_trial_mode_services_shows_all_non_live_services(
|
||||
|
||||
@@ -130,7 +130,7 @@ def test_a_page_should_nave_selected_header_navigation_item(
|
||||
|
||||
|
||||
@pytest.mark.parametrize('endpoint, selected_nav_item', [
|
||||
('main.organisation_dashboard', 'Services'),
|
||||
('main.organisation_dashboard', 'Usage'),
|
||||
('main.manage_org_users', 'Team members'),
|
||||
])
|
||||
def test_a_page_should_nave_selected_org_navigation_item(
|
||||
|
||||
Reference in New Issue
Block a user