|
| 1 | + |
| 2 | +{% extends 'layout-app.html' %} |
| 3 | + |
| 4 | +{% set pageHeading = "Today’s clinics" %} |
| 5 | + |
| 6 | + |
| 7 | +{% block pageContent %} |
| 8 | + {% set unit = data.breastScreeningUnits | findById(clinic.breastScreeningUnitId) %} |
| 9 | + {% set events = data.events | getClinicEvents(clinicId) %} |
| 10 | + |
| 11 | + <h1 class="nhsuk-heading-l"> |
| 12 | + <span class="nhsuk-caption-l">{{ unit.name }}</span> |
| 13 | + Clinic on {{ clinic.date | formatDate }} |
| 14 | + </h1> |
| 15 | + |
| 16 | + {% if events.length === 0 %} |
| 17 | + <p class="nhsuk-body">No participants scheduled for this clinic.</p> |
| 18 | + {% else %} |
| 19 | + <table class="nhsuk-table"> |
| 20 | + <caption class="nhsuk-table__caption"> |
| 21 | + {{ events.length }} scheduled participants |
| 22 | + </caption> |
| 23 | + <thead class="nhsuk-table__head"> |
| 24 | + <tr> |
| 25 | + <th scope="col" class="nhsuk-table__header">Time</th> |
| 26 | + <th scope="col" class="nhsuk-table__header">Name</th> |
| 27 | + <th scope="col" class="nhsuk-table__header">SX number</th> |
| 28 | + <th scope="col" class="nhsuk-table__header">Status</th> |
| 29 | + <th scope="col" class="nhsuk-table__header">Actions</th> |
| 30 | + </tr> |
| 31 | + </thead> |
| 32 | + <tbody class="nhsuk-table__body"> |
| 33 | + {% for event in events %} |
| 34 | + {% set participant = data.participants | findById(event.participantId) %} |
| 35 | + <tr class="nhsuk-table__row"> |
| 36 | + <td class="nhsuk-table__cell"> |
| 37 | + {{ event.statusHistory[0].timestamp | formatTime }} |
| 38 | + </td> |
| 39 | + <td class="nhsuk-table__cell"> |
| 40 | + <a href="/clinics/{{ clinicId }}/participants/{{ participant.id }}" class="nhsuk-link"> |
| 41 | + {{ participant | getFullName }} |
| 42 | + </a> |
| 43 | + </td> |
| 44 | + <td class="nhsuk-table__cell"> |
| 45 | + {{ participant.sxNumber }} |
| 46 | + </td> |
| 47 | + <td class="nhsuk-table__cell"> |
| 48 | + {{ event.status | replace("_", " ") | capitalize }} |
| 49 | + </td> |
| 50 | + <td class="nhsuk-table__cell"> |
| 51 | + {% if event.status === 'scheduled' %} |
| 52 | + <a href="/clinics/{{ clinicId }}/check-in/{{ event.id }}" class="nhsuk-link">Check in</a> |
| 53 | + {% endif %} |
| 54 | + </td> |
| 55 | + </tr> |
| 56 | + {% endfor %} |
| 57 | + </tbody> |
| 58 | + </table> |
| 59 | + {% endif %} |
| 60 | + |
| 61 | + <h2 class="nhsuk-heading-m">Details</h2> |
| 62 | + <dl class="nhsuk-summary-list"> |
| 63 | + <div class="nhsuk-summary-list__row"> |
| 64 | + <dt class="nhsuk-summary-list__key">Location</dt> |
| 65 | + <dd class="nhsuk-summary-list__value"> |
| 66 | + {{ unit.name }}<br> |
| 67 | + {{ unit.address | replace("\n", "<br>") | safe }} |
| 68 | + </dd> |
| 69 | + </div> |
| 70 | + <div class="nhsuk-summary-list__row"> |
| 71 | + <dt class="nhsuk-summary-list__key">Phone</dt> |
| 72 | + <dd class="nhsuk-summary-list__value">{{ unit.phoneNumber }}</dd> |
| 73 | + </div> |
| 74 | + <div class="nhsuk-summary-list__row"> |
| 75 | + <dt class="nhsuk-summary-list__key">Date</dt> |
| 76 | + <dd class="nhsuk-summary-list__value">{{ clinic.date | formatDate }}</dd> |
| 77 | + </div> |
| 78 | + <div class="nhsuk-summary-list__row"> |
| 79 | + <dt class="nhsuk-summary-list__key">Type</dt> |
| 80 | + <dd class="nhsuk-summary-list__value"> |
| 81 | + {{ clinic.clinicType | replace("_", " ") | capitalize }} |
| 82 | + </dd> |
| 83 | + </div> |
| 84 | + </dl> |
| 85 | + |
| 86 | + <a href="/clinics" class="nhsuk-back-link">Back to today's clinics</a> |
| 87 | + |
| 88 | +{% endblock %} |
0 commit comments