Skip to content

Commit b84d9cc

Browse files
Warnign message (#158)
This adds a example warning message if the COVID-19 interval hasn't been reached: ![Screenshot 2025-01-10 at 16 13 17](https://github.com/user-attachments/assets/f7197d45-2b37-4f15-8302-b09d147c1f5e) --------- Co-authored-by: Frankie Roberto <[email protected]> Co-authored-by: Frankie Roberto <[email protected]>
1 parent ea39d3e commit b84d9cc

File tree

3 files changed

+46
-2
lines changed

3 files changed

+46
-2
lines changed

app/views/vaccinate/consent.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
{% set currentSection = "consent" %}
88

99
{% block beforeContent %}
10-
{{ backLink({ href: "/vaccinate/patient-history" }) }}
10+
{% if data.vaccine === "COVID-19" %}
11+
{% set backLinkHref = "/vaccinate/warning" %}
12+
{% else %}
13+
{% set backLinkHref = "/vaccinate/patient-history" %}
14+
{% endif %}
15+
{{ backLink({ href: backLinkHref }) }}
1116
{% endblock %}
1217

1318
{% block content %}

app/views/vaccinate/patient-history.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
{% set currentSection = "vaccinate" %}
88

9-
{% if (data.eligibility | arrayOrStringIncludes("Pregnant")) or (data.vaccine == "Pertussis") %}
9+
{% if (data.vaccine === "COVID-19") %}
10+
{% set nextPage = "/vaccinate/warning" %}
11+
{% elseif (data.eligibility | arrayOrStringIncludes("Pregnant")) or (data.vaccine == "Pertussis") %}
1012
{% set nextPage = "/vaccinate/patient-estimated-due-date" %}
1113
{% else %}
1214
{% set nextPage = "/vaccinate/consent" %}

app/views/vaccinate/warning.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{% extends 'layout.html' %}
2+
3+
{% block pageTitle %}
4+
Vaccines
5+
{% endblock %}
6+
7+
{% set currentSection = "vaccinate" %}
8+
9+
{% block beforeContent %}
10+
{{ backLink({ href: "/vaccinate/patient-history" }) }}
11+
{% endblock %}
12+
13+
{% block content %}
14+
<div class="nhsuk-grid-row">
15+
<div class="nhsuk-grid-column-two-thirds">
16+
17+
<h1 class="nhsuk-heading-l">Are you sure you want to give the vaccine?</h1>
18+
19+
<p>
20+
{{ data.patientName }} had a COVID-19 vaccine less than 3 months ago, on 1&nbsp;December 2024.
21+
</p>
22+
23+
<p>
24+
For most people, the minimum recommended gap between COVID-19 vaccine doses is 3 months. See the section ‘Doses and schedules’ in the <a href="https://www.gov.uk/government/publications/covid-19-vaccination-programme-guidance[…]-vaccination-programme-information-for-healthcare-practitioners" target="_blank">
25+
UKHSA guidance on COVID-19 vaccination (opens in new tab)</a>.
26+
</p>
27+
28+
</div>
29+
</div>
30+
31+
{{ button({
32+
"text": "Continue",
33+
"href": "/vaccinate/consent"
34+
}) }}
35+
36+
{% endblock %}
37+

0 commit comments

Comments
 (0)