-
Notifications
You must be signed in to change notification settings - Fork 6
[DTOSS-10296] split participant details into multiple sections #250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e8061dc
c8959be
a4481e5
4458324
209cdd0
0c653b9
5747f4a
3296064
ce7e5ce
340d0ee
8c5c28a
9b9f57a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,3 +21,5 @@ manage_breast_screening/static | |
| # Files that aren't checked in | ||
| .pytest_cache | ||
| .terraform | ||
| htmlcov/ | ||
| .mypy_cache/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| {% from "card/macro.jinja" import card %} | ||
| {% from "tag/macro.jinja" import tag %} | ||
|
|
||
| {% macro appointment_table(presented_appointments, testid) %} | ||
| <table class="nhsuk-table" data-testid="{{ testid }}"> | ||
| <thead> | ||
| <tr> | ||
| <th>Date</th> | ||
| <th>Type</th> | ||
| <th>Location</th> | ||
| <th>Status</th> | ||
| <th>Details</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| {% for presented_appointment in presented_appointments %} | ||
| <tr data-testid="appointment-row"> | ||
| <td>{{ presented_appointment.starts_at }}</td> | ||
| <td>{{ presented_appointment.clinic_type }}</td> | ||
| <td>{{ presented_appointment.setting_name }}</td> | ||
| <td> | ||
| {{ tag({ | ||
| "text": presented_appointment.status.text, | ||
| "classes": presented_appointment.status.classes | ||
| }) }} | ||
| </td> | ||
| <td> | ||
| <a href="{{ presented_appointment.url }}"> | ||
| View details | ||
| </a> | ||
| </td> | ||
| </tr> | ||
| {% endfor %} | ||
| </tbody> | ||
| </table> | ||
| {% endmacro %} | ||
|
|
||
| {% macro appointments(presented_appointments) %} | ||
| {% call card({ | ||
| "heading": "Appointments", | ||
| "headingLevel": "2" | ||
| }) %} | ||
| {% if presented_appointments.upcoming %} | ||
| <h3>Upcoming</h3> | ||
| {{ appointment_table(presented_appointments.upcoming, testid="upcoming-appointments-table") }} | ||
| {% endif %} | ||
|
|
||
| {% if presented_appointments.past %} | ||
| <h3>Previous</h3> | ||
| {{ appointment_table(presented_appointments.past, testid="past-appointments-table") }} | ||
| {% endif %} | ||
|
|
||
| {% if not presented_appointments.past and not presented_appointments.upcoming %} | ||
| <p>No screening history found</p> | ||
| {% endif %} | ||
| {% endcall %} | ||
| {% endmacro %} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| {% from "card/macro.jinja" import card %} | ||
| {% from "summary-list/macro.jinja" import summaryList %} | ||
|
|
||
| {% macro contact_details(presented_participant) %} | ||
| {% set address_html %} | ||
| {% if presented_participant.address %} | ||
| {% for line in presented_participant.address.lines %} | ||
| {{ line }}{% if not loop.last %}<br>{% endif %} | ||
| {% endfor %} | ||
| {% if presented_participant.address.postcode %} | ||
| <br>{{ presented_participant.address.postcode }} | ||
| {% endif %} | ||
| {% endif %} | ||
| {% endset %} | ||
| {% call card({ | ||
| "heading": "Contact details" | ||
| }) %} | ||
| {{ summaryList({ | ||
| "rows": [ | ||
| { | ||
| "key": { | ||
| "text": "Address" | ||
| }, | ||
| "value": { | ||
| "html": address_html | ||
| } | ||
| }, | ||
|
Comment on lines
+20
to
+27
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The NHS summary list guidance wasn't updated with Showing missing information (GOV.UK) but what if the address is empty here?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same for phone and email I suppose
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Think I'll park this one as well, we've got tickets to add the edit forms, so when that is done we will be linking to those. |
||
| { | ||
| "key": { | ||
| "text": "Phone" | ||
| }, | ||
| "value": { | ||
| "html": presented_participant.phone | ||
| } | ||
| }, | ||
| { | ||
| "key": { | ||
| "text": "Email" | ||
| }, | ||
| "value": { | ||
| "html": presented_participant.email | ||
| } | ||
| } | ||
| ] | ||
| }) }} | ||
| {% endcall %} | ||
| {% endmacro %} | ||
Uh oh!
There was an error while loading. Please reload this page.