@@ -74,7 +74,7 @@ <h1 class="nhsuk-heading-l">
7474 {% for event in filteredEvents %}
7575 {% set participant = data.participants | findById(event.participantId) %}
7676
77- < tr >
77+ < tr id =" event-row-{{event.id}} " >
7878
7979 {# Appointment time #}
8080 < td class ="nhsuk-table__cell "> {{ event.statusHistory[0].timestamp | formatTime }}</ td >
@@ -113,40 +113,23 @@ <h1 class="nhsuk-heading-l">
113113 {# NHS Number #}
114114 {# < td class ="nhsuk-table__cell "> {{ participant.medicalInformation.nhsNumber | formatNhsNumber | noWrap }}</ td > #}
115115
116- {# Appointment status #}
116+ {# Appointment status and check-in #}
117117 < td class ="nhsuk-table__cell ">
118- {{ tag({
119- text: event.status | getStatusText,
120- classes: "nhsuk-tag--" + event.status | getStatusTagColour
118+ {# Status tag with check-in link #}
119+ {{ eventStatus({
120+ clinicId: clinicId,
121+ event: event,
122+ referrer: currentUrl + "#event-row-" + event.id
121123 })}}
122-
123- {% if event.status === 'event_scheduled' %}
124- < div class ="nhsuk-u-margin-top-2 ">
125- {# < br > #}
126- < a href ="/clinics/{{ clinicId }}/check-in/{{ event.id }}?currentFilter={{ currentFilter }} " class ="nhsuk-link ">
127- {{ "Check in participant" | noWrap }}
128- </ a >
129- </ div >
130-
131- {% endif %}
132124 </ td >
133-
134- {# Check-in action #}
135- {# < td class ="nhsuk-table__cell ">
136- {% if event.status === 'event_scheduled' %}
137- < a href ="/clinics/{{ clinicId }}/check-in/{{ event.id }}?currentFilter={{ currentFilter }} " class ="nhsuk-link ">
138- {{ "Check in" | noWrap }}
139- </ a >
140- {% endif %}
141- </ td > #}
142125 </ tr >
143126 {% endfor %}
144127 </ tbody >
145128 </ table >
146129 {% endif %}
147130
148131 < h2 class ="nhsuk-heading-m "> Details</ h2 >
149-
132+
150133 < dl class ="nhsuk-summary-list ">
151134 < div class ="nhsuk-summary-list__row ">
152135 < dt class ="nhsuk-summary-list__key "> Location</ dt >
@@ -157,17 +140,17 @@ <h2 class="nhsuk-heading-m">Details</h2>
157140 {% endfor %}
158141 </ dd >
159142 </ div >
160-
143+
161144 < div class ="nhsuk-summary-list__row ">
162145 < dt class ="nhsuk-summary-list__key "> Phone</ dt >
163146 < dd class ="nhsuk-summary-list__value "> {{ unit.phoneNumber }}</ dd >
164147 </ div >
165-
148+
166149 < div class ="nhsuk-summary-list__row ">
167150 < dt class ="nhsuk-summary-list__key "> Date</ dt >
168151 < dd class ="nhsuk-summary-list__value "> {{ clinic.date | formatDate }}</ dd >
169152 </ div >
170-
153+
171154 < div class ="nhsuk-summary-list__row ">
172155 < dt class ="nhsuk-summary-list__key "> Location</ dt >
173156 < dd class ="nhsuk-summary-list__value "> {{ clinic.locationType | formatWords | sentenceCase }}</ dd >
@@ -180,3 +163,7 @@ <h2 class="nhsuk-heading-m">Details</h2>
180163 </ dl >
181164
182165{% endblock %}
166+
167+ {% block pageScripts %}
168+
169+ {% endblock %}
0 commit comments