Skip to content

Commit cec51b4

Browse files
Reduce support interface to MVP (#268)
This reduces the support interface to just being able to activate/deactivate regional users, and add new regional users.
1 parent efbf6a1 commit cec51b4

File tree

5 files changed

+21
-102
lines changed

5 files changed

+21
-102
lines changed

app/views/includes/header-logged-in-support.html

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,11 @@
77
"showNav": "true",
88
"showSearch": "false",
99
"primaryLinks": [
10-
{
11-
url : "/support",
12-
label : "Dashboard",
13-
classes: ("app-header__navigation-item--current" if currentSection == "dashboard")
14-
},
1510
{
1611
url : "/support/regions",
1712
label : "Regions",
1813
classes: ("app-header__navigation-item--current" if currentSection == "regions")
1914
},
20-
{
21-
url : "/support/organisations",
22-
label : "Organisations",
23-
classes: ("app-header__navigation-item--current" if currentSection == "organisations")
24-
},
25-
{
26-
url : "/support/users",
27-
label : "Users",
28-
classes: ("app-header__navigation-item--current" if currentSection == "users")
29-
},
3015
{
3116
url: "#",
3217
label: currentUser.email,

app/views/support/region.html

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
{% block beforeContent %}
66
{{ backLink({
7-
href: "/support",
7+
href: "/support/regions",
88
text: "Back"
99
}) }}
1010
{% endblock %}
1111

12-
{% set currentSection = "dashboard" %}
12+
{% set currentSection = "regions" %}
1313

1414
{% block header %}
1515
{% include "includes/header-logged-in-support.html" %}
@@ -22,12 +22,7 @@
2222
<h1 class="nhsuk-heading-xl">{{ pageName }}</h1>
2323

2424

25-
<h2 class="nhsuk-heading-m">Users</h2>
26-
27-
{{ button({
28-
text: "Add user",
29-
href: "/support/regions/" + region.id + "/add-user"
30-
}) }}
25+
<h2 class="nhsuk-heading-m nhsuk-u-margin-bottom-1">Users</h2>
3126

3227
{% if (users | length) > 0 %}
3328
<table class="nhsuk-table">
@@ -67,12 +62,18 @@ <h2 class="nhsuk-heading-m">Users</h2>
6762
</table>
6863
{% endif %}
6964

65+
{{ button({
66+
text: "Add user",
67+
href: "/support/regions/" + region.id + "/add-user"
68+
}) }}
69+
7070
</div>
7171
</div>
7272
<div class="nhsuk-grid-row">
7373
<div class="nhsuk-grid-column-full">
7474

7575

76+
<!--
7677
<table class="nhsuk-table nhsuk-table--padding-2">
7778
<caption class="nhsuk-table__caption nhsuk-u-margin-bottom-2 nhsuk-table__caption--m">Organisations</caption>
7879
<thead role="rowgroup" class="nhsuk-table__head">
@@ -143,7 +144,7 @@ <h2 class="nhsuk-heading-m">Users</h2>
143144
</tr>
144145
</tfoot>
145146
</table>
146-
147+
-->
147148

148149

149150
</div>

app/views/support/regions.html

Lines changed: 5 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -14,78 +14,11 @@
1414

1515
<h1 class="nhsuk-heading-l">{{ pageName }}</h1>
1616

17-
<table class="nhsuk-table">
18-
<thead role="rowgroup" class="nhsuk-table__head">
19-
<tr role="row">
20-
<th rowspan="2" class="app-table__header--border-right app-table__header--align-bottom app-table__header--border-top">
21-
Name
22-
</th>
23-
<th colspan="1" rowspan="2" class="app-table__header--align-bottom app-table__header--border-right app-table__header--padding-left app-table__header--border-top nhsuk-table__header--numeric">
24-
Organisations
25-
</th>
26-
<th colspan="3" class="app-table__header--padding-left nhsuk-table__header--centred app-table__header--border-right app-table__header--border-top">
27-
Users
28-
</th>
29-
<th colspan="4" class="app-table__header--padding-left nhsuk-table__header--centred app-table__header--border-top">
30-
Vaccinations
31-
</th>
32-
</tr>
33-
<tr role="row">
34-
35-
<th class="app-table__header--padding-left nhsuk-table__header--numeric ">
36-
Lead
37-
</th>
38-
<th class="nhsuk-table__header--numeric app-table__header--align-bottom">
39-
Admin
40-
</th>
41-
<th class="nhsuk-table__header--numeric app-table__header--border-right app-table__header--align-bottom">
42-
Recorder
43-
</th>
44-
<th class="app-table__header--padding-left nhsuk-table__header--numeric app-table__header--align-bottom">
45-
COVID
46-
</th>
47-
<th class="app-table__header--padding-left nhsuk-table__header--numeric app-table__header--align-bottom">
48-
Flu
49-
</th>
50-
<th class="nhsuk-table__header--numeric app-table__header--align-bottom">
51-
RSV
52-
</th>
53-
<th class="nhsuk-table__header--numeric app-table__header--align-bottom">
54-
Pertussis
55-
</th>
56-
</tr>
57-
</thead>
58-
<tbody class="nhsuk-table__body">
59-
{% for region in (data.regions | sort(false, true, "name")) %}
60-
<tr role="row" class="nhsuk-table__row">
61-
<th class="nhsuk-table__cell app-table__cell--border-right nhsuk-u-font-weight-normal"><a href="/support/regions/{{ region.id }}">{{ region.name }}</a></th>
62-
<td class="nhsuk-table__cell app-table__cell--padding-left app-table__cell--border-right nhsuk-table__cell--numeric">150</td>
63-
<td class="nhsuk-table__cell app-table__cell--padding-left nhsuk-table__cell--numeric">103</td>
64-
<td class="nhsuk-table__cell nhsuk-table__cell--numeric">150</td>
65-
<td class="nhsuk-table__cell nhsuk-table__cell--numeric app-table__cell--border-right">501</td>
66-
<td class="nhsuk-table__cell app-table__cell--padding-left nhsuk-table__cell--numeric">1,014</td>
67-
<td class="nhsuk-table__cell app-table__cell--padding-left nhsuk-table__cell--numeric">304</td>
68-
<td class="nhsuk-table__cell app-table__cell--padding-left nhsuk-table__cell--numeric">734</td>
69-
<td class="nhsuk-table__cell app-table__cell--padding-left nhsuk-table__cell--numeric">16</td>
70-
</tr>
71-
{% endfor %}
72-
</tbody>
73-
<tfoot>
74-
<tr role="row" class="nhsuk-table__row nhsuk-table__row--bold">
75-
<th class="nhsuk-table__cell app-table__cell--border-right ">Total</th>
76-
<td class="nhsuk-table__cell app-table__cell--padding-left nhsuk-table__cell--numeric nhsuk-table__cell app-table__cell--border-right">1,050</td>
77-
<td class="nhsuk-table__cell app-table__cell--padding-left nhsuk-table__cell--numeric">721</td>
78-
<td class="nhsuk-table__cell nhsuk-table__cell--numeric">1,050</td>
79-
<td class="nhsuk-table__cell nhsuk-table__cell nhsuk-table__cell--numeric app-table__cell--border-right">3,507</td>
80-
<td class="nhsuk-table__cell app-table__cell--padding-left nhsuk-table__cell--numeric">7,098</td>
81-
<td class="nhsuk-table__cell app-table__cell--padding-left nhsuk-table__cell--numeric">2,128</td>
82-
<td class="nhsuk-table__cell app-table__cell--padding-left nhsuk-table__cell--numeric">5,138</td>
83-
<td class="nhsuk-table__cell app-table__cell--padding-left nhsuk-table__cell--numeric">112</td>
84-
</tr>
85-
</tfoot>
86-
</table>
87-
88-
17+
<ul>
18+
{% for region in (data.regions | sort(false, true, "name")) %}
19+
<li><a href="/support/regions/{{ region.id }}">{{ region.name }}</a></li>
20+
{% endfor %}
21+
</ul>
8922

9023
</div>
9124
</div>

app/views/support/users/edit-region.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}) }}
1212
{% endblock %}
1313

14-
{% set currentSection = "users" %}
14+
{% set currentSection = "regions" %}
1515

1616
{% block header %}
1717
{% include "includes/header-logged-in-support.html" %}
@@ -21,7 +21,7 @@
2121
<div class="nhsuk-grid-row">
2222
<div class="nhsuk-grid-column-two-thirds">
2323

24-
<div class="nhsuk-caption-l">{{ user.name }}</div>
24+
<div class="nhsuk-caption-l">{{ user.firstName }} {{ user.lastName }}</div>
2525
<h1 class="nhsuk-heading-l">{{ region.name }}</h1>
2626

2727
<form action="/support/users/{{ user.id }}/regions/{{ region.id }}/update" method="post" novalidate="true">
@@ -31,7 +31,7 @@ <h1 class="nhsuk-heading-l">{{ region.name }}</h1>
3131
fieldset: {
3232
legend: {
3333
text: "Status",
34-
classes: "nhsuk-fieldset__legend--m"
34+
classes: "nhsuk-fieldset__legend--s"
3535
}
3636
},
3737
value: userRegionSettings.status,

app/views/support/users/show.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
{% block beforeContent %}
66
{{ backLink({
7-
href: "/support/users",
7+
href: "javascript: history.back();",
88
text: "Back"
99
}) }}
1010
{% endblock %}
1111

12-
{% set currentSection = "users" %}
12+
{% set currentSection = "regions" %}
1313

1414
{% block header %}
1515
{% include "includes/header-logged-in-support.html" %}
@@ -29,7 +29,7 @@ <h1 class="nhsuk-heading-l">{{ pageName }}</h1>
2929
classes: "nhsuk-u-font-weight-normal"
3030
},
3131
value: {
32-
html: user.name
32+
html: user.firstName + " " + user.lastName
3333
}
3434
},
3535
{

0 commit comments

Comments
 (0)