Skip to content

Commit 6037c38

Browse files
committed
add batch in vaccinate
1 parent d65c739 commit 6037c38

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed

app/routes/vaccinate.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,26 @@ module.exports = router => {
109109

110110
})
111111

112+
113+
114+
router.post('/vaccinate/answer-patient-nhs-number-known', (req, res) => {
115+
116+
const nhsNumberKnown = req.session.data.nhsNumberKnown;
117+
118+
if (nhsNumberKnown === "yes") {
119+
120+
req.session.data.patientName = "Jodie Brown"
121+
req.session.data.dateOfBirth = {day: "4", month: "7", year: "1964"}
122+
req.session.data.postcode = "GD3 I83"
123+
124+
res.redirect('/vaccinate/patient-history')
125+
} else if (nhsNumberKnown === "no") {
126+
res.redirect('/vaccinate/patient-search')
127+
} else {
128+
res.redirect('/vaccinate/patient?showError=yes')
129+
}
130+
131+
})
132+
133+
112134
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{% extends 'layout.html' %}
2+
3+
{% block pageTitle %}
4+
Add batch
5+
{% endblock %}
6+
7+
{% set currentSection = "vaccines" %}
8+
9+
{% block beforeContent %}
10+
{{ backLink({
11+
href: "/vaccinate/batch",
12+
text: "Back"
13+
}) }}
14+
{% endblock %}
15+
16+
{% block content %}
17+
<div class="nhsuk-grid-row">
18+
<div class="nhsuk-grid-column-two-thirds">
19+
20+
<h1 class="nhsuks-heading-xl">Add batch</h1>
21+
22+
<form action="/vaccinate/eligibility" method="post" novalidate="true">
23+
24+
{{ input({
25+
"label": {
26+
"text": "Batch number",
27+
classes: "nhsuk-label--s"
28+
},
29+
hint: {
30+
text: "For example, XX123456"
31+
},
32+
"id": "batch-number",
33+
"name": "batchNumber",
34+
classes: "nhsuk-input--width-20",
35+
value: data.batchNumber
36+
}) }}
37+
38+
39+
{{ dateInput({
40+
"id": "batchExpiryDate",
41+
"namePrefix": "batchExpiryDate",
42+
"fieldset": {
43+
"legend": {
44+
"text": "Expiry date",
45+
"classes": "nhsuk-label--s"
46+
}
47+
},
48+
values: data.batchExpiryDate
49+
}) }}
50+
51+
{{ button({
52+
"text": "Continue"
53+
}) }}
54+
</form>
55+
56+
57+
</div>
58+
</div>
59+
60+
61+
{% endblock %}

0 commit comments

Comments
 (0)