Skip to content

Commit 1cd4df9

Browse files
Misc bug fixes ahead of UR (#141)
1 parent bc50ab8 commit 1cd4df9

File tree

6 files changed

+38
-13
lines changed

6 files changed

+38
-13
lines changed

app/lib/utils/status.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const STATUS_GROUPS = {
1010
not_started: ['event_scheduled', 'event_checked_in'],
1111
completed: ['event_complete', 'event_partially_screened'],
1212
final: ['event_complete', 'event_partially_screened', 'event_did_not_attend', 'event_attended_not_screened', 'event_cancelled'],
13-
active: ['event_scheduled', 'event_checked_in', 'event_in_progress'],
13+
active: ['event_scheduled', 'event_checked_in'],
1414
eligible_for_reading: ['event_complete', 'event_partially_screened'],
1515
}
1616

app/lib/utils/summary-list.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ const handleSummaryListMissingInformation = (input, showNotProvidedText = false)
7070

7171
// Check if input is a summary list (has rows property)
7272
if (input.rows && Array.isArray(input.rows)) {
73-
const updatedRows = input.rows.map(processRow)
73+
// Filter out any falsy/undefined rows that come from failed Nunjucks conditions
74+
const validRows = input.rows.filter(row => row && typeof row === 'object')
75+
const updatedRows = validRows.map(processRow)
7476

7577
return {
7678
...input,

app/views/_components/check-in/template.njk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
{% if confirmIdentityEnabled %}
1818
{% set modalId = "check-in-modal-" + params.event.id %}
1919
{% set statusTagId = params.statusTagId %}
20+
{% set appointmentUrl = "/clinics/" + params.clinicId + "/events/" + params.event.id %}
2021
{% include "_includes/confirm-identity-modal.njk" %}
2122
{% endif %}
2223

app/views/_includes/medical-information/index.njk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
{# -------------------------------------------------------------- #}
139139
{# Medical history #}
140140

141-
{% set sectionHeading = "Medical history" %}
141+
{# {% set sectionHeading = "Medical history" %}
142142
{% set subHeading = "Including breast cancer, implants, prior proceedures and treatments" %}
143143
{% set scrollTo = 'medical-history' %}
144144
@@ -170,7 +170,7 @@
170170
html: medicalHistoryHtml,
171171
status: "To review"
172172
}) }}
173-
{% endswitch %}
173+
{% endswitch %} #}
174174

175175
{% set medicalHistoryHtml %}
176176
{% set rows = [

app/views/events/appointment.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
}
126126
]
127127
}
128-
}
128+
} if false
129129
]
130130
} | handleSummaryListMissingInformation) }}
131131
{% endset %}

app/views/index.html

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,20 @@ <h1>
2020
href: "/dashboard"
2121
}) }}
2222

23-
<h2>Active screening appointment</h2>
23+
<h2>Clinics</h2>
24+
25+
<ul>
26+
<li>
27+
<a href="/clinics">Clinics</a>
28+
<ul>
29+
<li><a href="/clinics/wtrl7jud">First clinic today</a></li>
30+
</ul>
31+
</li>
32+
33+
</ul>
34+
35+
36+
<h2>Screening appointment</h2>
2437

2538
{% set eventId = "5gpn41oi" %}
2639

@@ -29,6 +42,21 @@ <h2>Active screening appointment</h2>
2942
{% set exampleParticipant = "/clinics/wtrl7jud/events/" + eventId %}
3043
{% set startUrl = exampleParticipant + "/start" %}
3144

45+
<h3>Appointment pages</h3>
46+
<ul>
47+
<li>
48+
<a href="{{ exampleParticipant }}/appointment">Appointment tab</a>
49+
</li>
50+
<li>
51+
<a href="{{ exampleParticipant }}/participant">Participant tab</a>
52+
</li>
53+
<li>
54+
<a href="{{ exampleParticipant }}/medical-information">Medical information tab</a>
55+
</li>
56+
</ul>
57+
58+
<h3>Appointment during workflow</h3>
59+
3260
<ul>
3361
<li>
3462
<a href="{{ startUrl }}?returnTo=identity">Participant</a>
@@ -82,7 +110,7 @@ <h2>Completed screening appointment</h2>
82110

83111
<ul>
84112
<li>
85-
<a href="{{ exampleParticipant }}">Main appointment page</a>
113+
<a href="{{ exampleParticipant }}/appointment">Appointment tab</a>
86114
</li>
87115
<li>
88116
<a href="{{ exampleParticipant }}/medical-information">Medical information</a>
@@ -95,12 +123,6 @@ <h2>Completed screening appointment</h2>
95123
<h2>Other sections</h2>
96124

97125
<ul>
98-
<li>
99-
<a href="/clinics">Clinics</a>
100-
<ul>
101-
<li><a href="/clinics/wtrl7jud">First clinic today</a></li>
102-
</ul>
103-
</li>
104126

105127
<li>
106128
<a href="/reading">Image reading</a>

0 commit comments

Comments
 (0)