|
1 | 1 | {% extends 'layout.html' %} |
2 | 2 |
|
3 | | -{% set pageName = "Check break changes — " + site.name %} |
| 3 | +{% set pageName = "Check your answers — " + site.name %} |
4 | 4 |
|
5 | 5 | {% block beforeContent %} |
6 | 6 | {{ backLink({ href: backHref }) }} |
|
10 | 10 | <div class="nhsuk-grid-row"> |
11 | 11 | <div class="nhsuk-grid-column-two-thirds"> |
12 | 12 |
|
13 | | - <h1 class="nhsuk-heading-xl">Check break changes</h1> |
| 13 | + <h1 class="nhsuk-heading-xl">Check your answers</h1> |
14 | 14 |
|
15 | | - <div class="app-summary-card"> |
16 | | - <div class="app-summary-card__title-wrapper"> |
17 | | - <h2 class="app-summary-card__title">Session details</h2> |
18 | | - </div> |
19 | | - <div class="app-summary-card__content"> |
20 | | - {{ summaryList({ rows: [ |
21 | | - { |
22 | | - key: { text: "Session" }, |
23 | | - value: { text: sessionLabel } |
24 | | - }, |
25 | | - { |
26 | | - key: { text: "Date" }, |
27 | | - value: { text: date | formatDateLong } |
28 | | - } |
29 | | - ] }) }} |
30 | | - </div> |
31 | | - </div> |
| 15 | + <p class="nhsuk-body">Review the break changes before saving.</p> |
32 | 16 |
|
33 | | - <div class="app-summary-card"> |
34 | | - <div class="app-summary-card__title-wrapper"> |
35 | | - <h2 class="app-summary-card__title">Break details</h2> |
36 | | - {% if changeHref %} |
37 | | - <ul class="app-summary-card__actions"> |
38 | | - <li class="app-summary-card__action"> |
39 | | - <a href="{{ changeHref }}">Change<span class="nhsuk-u-visually-hidden"> break details</span></a> |
40 | | - </li> |
41 | | - </ul> |
42 | | - {% endif %} |
43 | | - </div> |
44 | | - <div class="app-summary-card__content"> |
45 | | - {{ summaryList({ rows: [ |
46 | | - { |
47 | | - key: { text: "Action" }, |
48 | | - value: { text: "Remove break" if draft.breakAction === "remove" else ("Change break" if draft.breakAction === "change" else "Add break") } |
49 | | - }, |
50 | | - { |
51 | | - key: { text: "Time" }, |
52 | | - value: { text: (draft.breakStart | formatTime) + " to " + (draft.breakEnd | formatTime) } |
53 | | - } |
54 | | - ] }) }} |
55 | | - </div> |
56 | | - </div> |
| 17 | + {% set summaryRows = [ |
| 18 | + { |
| 19 | + key: { text: "Session" }, |
| 20 | + value: { text: sessionLabel } |
| 21 | + }, |
| 22 | + { |
| 23 | + key: { text: "Date" }, |
| 24 | + value: { text: date | formatDateLong } |
| 25 | + }, |
| 26 | + { |
| 27 | + key: { text: "Action" }, |
| 28 | + value: { text: "Remove break" if draft.breakAction === "remove" else ("Change break" if draft.breakAction === "change" else "Add break") } |
| 29 | + }, |
| 30 | + { |
| 31 | + key: { text: "Time" }, |
| 32 | + value: { text: (draft.breakStart | formatTime) + " to " + (draft.breakEnd | formatTime) }, |
| 33 | + actions: { |
| 34 | + items: [{ |
| 35 | + href: changeHref, |
| 36 | + text: "Change", |
| 37 | + visuallyHiddenText: "break details" |
| 38 | + }] |
| 39 | + } if changeHref |
| 40 | + } |
| 41 | + ] %} |
57 | 42 |
|
58 | | - {% if draft.affectedBookingIds.length > 0 %} |
59 | | - {% call insetText({}) %} |
60 | | - <p> |
61 | | - {% if draft.bookingsChoice === "cancel" %} |
62 | | - {{ draft.affectedBookingIds.length }} {{ "booking will" if draft.affectedBookingIds.length === 1 else "bookings will" }} be cancelled when you save these changes. |
63 | | - {% else %} |
64 | | - {{ draft.affectedBookingIds.length }} {{ "booking will" if draft.affectedBookingIds.length === 1 else "bookings will" }} move to Kept bookings so {{ "it can" if draft.affectedBookingIds.length === 1 else "they can" }} be rescheduled. |
65 | | - {% endif %} |
66 | | - </p> |
| 43 | + {% if affectedCount > 0 %} |
| 44 | + {% set summaryRows = (summaryRows.push({ |
| 45 | + key: { text: "Bookings affected" }, |
| 46 | + value: { text: affectedCount } |
| 47 | + }), summaryRows) %} |
| 48 | + {% set summaryRows = (summaryRows.push({ |
| 49 | + key: { text: "What do you want to do with bookings" }, |
| 50 | + value: { text: "Keep bookings" if draft.bookingsChoice === "keep" else ("Cancel " + affectedCount + " " + ("booking" if affectedCount === 1 else "bookings")) }, |
| 51 | + actions: { |
| 52 | + items: [{ |
| 53 | + href: bookingsHref, |
| 54 | + text: "Change", |
| 55 | + visuallyHiddenText: "what to do with bookings" |
| 56 | + }] |
| 57 | + } |
| 58 | + }), summaryRows) %} |
| 59 | + {% endif %} |
| 60 | + |
| 61 | + {{ summaryList({ rows: summaryRows }) }} |
| 62 | + |
| 63 | + {% if affectedCount > 0 and draft.bookingsChoice === "cancel" %} |
| 64 | + {% call warningCallout({ heading: "You are about to remove " + affectedCount + " " + ("booking" if affectedCount === 1 else "bookings") }) %} |
| 65 | + <p>This cannot be undone.</p> |
67 | 66 | {% endcall %} |
68 | 67 | {% endif %} |
69 | 68 |
|
|
0 commit comments