Skip to content

Commit 2bfcf7e

Browse files
Add school moves to exports list
1 parent cc57f2f commit 2bfcf7e

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

app/enums.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export const DownloadFormat = {
112112
*/
113113
export const DownloadType = {
114114
Report: 'Vaccination records',
115+
Moves: 'School moves',
115116
Session: 'Offline session'
116117
}
117118

app/models/download.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ export class Download {
111111
*/
112112
get name() {
113113
switch (true) {
114+
case this.type === DownloadType.Moves:
115+
return `School moves (${this.formatted.createdAt})`
114116
case this.type === DownloadType.Report:
115117
return `${this.programme.name} vaccination records`
116118
case this.type === DownloadType.Session:

app/views/move/list.njk

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
{% extends "_layouts/default.njk" %}
1+
{% extends "_layouts/form.njk" %}
22

3+
{% set gridColumns = "full" %}
4+
{% set hideConfirmButton = true %}
35
{% set title = __("move.list.title") %}
46

5-
{% block content %}
7+
{% block form %}
68
{{ super() }}
79

810
{{ appHeading({
@@ -16,7 +18,12 @@
1618
{{ button({
1719
classes: "nhsuk-button--secondary",
1820
text: __("move.download.label"),
19-
href: "#"
21+
value: DownloadType.Moves,
22+
decorate: "download.type",
23+
attributes: {
24+
formaction: "/downloads/new",
25+
formmethod: "post"
26+
}
2027
}) }}
2128
</div>
2229

0 commit comments

Comments
 (0)