Skip to content

Commit 97f70cf

Browse files
Update vaccines list and show pages
Provide link to vaccine show page, and align some of the design with what is in production
1 parent 0f8157c commit 97f70cf

3 files changed

Lines changed: 34 additions & 34 deletions

File tree

app/locales/en.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ export const en = {
110110
batch: {
111111
new: {
112112
label: 'Add a new batch',
113+
ariaLabel: 'Add a new %s batch',
113114
title: 'Add batch',
114115
confirm: 'Add batch',
115116
success: 'Batch {{batch.id}} added'

app/views/vaccine/list.njk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
{% for vaccine in vaccines %}
1313
{% call card({
14-
feature: true,
1514
heading: vaccine.brandWithType,
1615
headingSize: "m",
1716
href: vaccine.uri
@@ -23,10 +22,12 @@
2322
})
2423
}) }}
2524

26-
{{ button({
25+
{{ actionLink({
2726
text: __("batch.new.label"),
2827
href: vaccine.uri + "/batches/new",
29-
variant: "secondary"
28+
attributes: {
29+
"aria-label": __("batch.new.ariaLabel", vaccine.brandWithType)
30+
}
3031
}) }}
3132

3233
{% set batchRows = [] %}

app/views/vaccine/show.njk

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,37 @@
11
{% extends "_layouts/default.njk" %}
22

3-
{% set title = vaccine.brandWithName %}
3+
{% set title = vaccine.brandWithType %}
44
{% set paths = { back: "/vaccines" } %}
55

66
{% block content %}
7-
<div class="nhsuk-u-width-three-quarters">
8-
{{ super() }}
7+
{{ super() }}
98

10-
{{ appHeading({
11-
title: title
12-
}) }}
9+
{{ appHeading({
10+
title: title
11+
}) }}
1312

14-
{{ summaryList({
15-
card: {
16-
heading: vaccine.brand,
17-
headingSize: "m",
18-
actions: {
19-
items: [
20-
{
21-
text: __("vaccine.show.delete"),
22-
href: vaccine.uri + "/delete"
23-
}
24-
]
25-
}
26-
},
27-
rows: summaryRows(vaccine, {
28-
manufacturer: {},
29-
snomed: {},
30-
type: {},
31-
method: {},
32-
dose: {},
33-
healthQuestions: {},
34-
preScreenQuestions: {},
35-
sideEffects: {}
36-
})
37-
}) }}
38-
</div>
13+
{{ summaryList({
14+
card: {
15+
heading: __("vaccine.show.summary"),
16+
headingSize: "m",
17+
actions: {
18+
items: [
19+
{
20+
text: __("vaccine.show.delete"),
21+
href: vaccine.uri + "/delete"
22+
}
23+
]
24+
}
25+
},
26+
rows: summaryRows(vaccine, {
27+
type: {},
28+
brand: {},
29+
manufacturer: {},
30+
snomed: {},
31+
method: {},
32+
dose: {},
33+
healthQuestions: {},
34+
sideEffects: {}
35+
})
36+
}) }}
3937
{% endblock %}

0 commit comments

Comments
 (0)