From 1435c42b6f3d4994b522f3c5163600dca8ea1a7d Mon Sep 17 00:00:00 2001 From: Mat Johnson Date: Tue, 27 Oct 2026 09:16:42 +0000 Subject: [PATCH 1/7] Tweaks to clinic prototypes, in particular calendar page --- .../sass/components/_calendar-table.scss | 13 ++- app/routes/create-capacity-from-zero.js | 8 +- .../clinic-summary.html | 68 ++++++++++---- .../create-clinic.html | 92 +++++++++---------- 4 files changed, 107 insertions(+), 74 deletions(-) diff --git a/app/assets/sass/components/_calendar-table.scss b/app/assets/sass/components/_calendar-table.scss index 26d2040..eae3d13 100644 --- a/app/assets/sass/components/_calendar-table.scss +++ b/app/assets/sass/components/_calendar-table.scss @@ -38,6 +38,11 @@ background-color: nhsuk-colour("pale-yellow"); } + .calendar-table-td-header { + display: flex; + justify-content: space-between; + } + // the number that is the date .calendar-table-date { display: flex; @@ -47,7 +52,7 @@ height: 2rem; border-radius: 50%; background-color: nhsuk-colour("grey-5"); - margin-bottom: nhsuk-spacing(3); + margin-bottom: nhsuk-spacing(2); } .--date-selected .calendar-table-date { @@ -74,11 +79,11 @@ .--schedule-name { display: block; border-radius: 4px; - background-color: nhsuk-colour("grey-2"); - color: nhsuk-colour("white"); + border: 2px solid $nhsuk-input-border-colour; padding: nhsuk-spacing(1); margin-top: nhsuk-spacing(2); font-size: nhsuk-px-to-rem(14); + color: $nhsuk-input-border-colour; text-wrap: nowrap; } } @@ -106,7 +111,7 @@ display: flex; align-items: center; @include nhsuk-font-size(16); - color: nhsuk-colour("grey-2"); + color: $nhsuk-secondary-text-colour; margin-bottom: nhsuk-spacing(2); } diff --git a/app/routes/create-capacity-from-zero.js b/app/routes/create-capacity-from-zero.js index cd24fe1..6ec1f9d 100644 --- a/app/routes/create-capacity-from-zero.js +++ b/app/routes/create-capacity-from-zero.js @@ -10,7 +10,7 @@ const router = express.Router() // Slot/held totals per session template, matching select-session-template.html const sessionTemplates = { - 'Standard': { totalSlots: 42, heldSlots: 8 }, + 'Standard day': { totalSlots: 42, heldSlots: 8 }, 'Special appointments': { totalSlots: 42, heldSlots: 42 } } @@ -187,7 +187,9 @@ router.get('/create-capacity-from-zero/clinic-summary', function (req, res) { templateName, templateId: matchedTemplate && matchedTemplate.id, totalSlots: template.totalSlots, - heldSlots: template.heldSlots + heldSlots: template.heldSlots, + startTime: matchedTemplate && matchedTemplate.sessionStartLabel, + endTime: matchedTemplate && matchedTemplate.sessionEndLabel }) })) @@ -214,7 +216,7 @@ router.post('/create-capacity-from-zero/select-days', function (req, res) { }) const exampleTemplateSlugs = { - 'standard': 'Standard', + 'standard': 'Standard day', 'special-appointments': 'Special appointments' } diff --git a/app/views/create-capacity-from-zero/clinic-summary.html b/app/views/create-capacity-from-zero/clinic-summary.html index 680c908..9bc381c 100644 --- a/app/views/create-capacity-from-zero/clinic-summary.html +++ b/app/views/create-capacity-from-zero/clinic-summary.html @@ -16,15 +16,15 @@ {% block content %} {% set padlockSvg %} -
+ - Locked -
+ Locked + {% endset %} {% include "create-capacity-from-zero/_local-includes/clinic-summary.html" %} @@ -54,13 +54,17 @@ {% for dayItem in week %} {% if dayItem %} - {{ dayItem.date }} +
+ {{ dayItem.date }} + {% if dayItem.templateName %} + {{ padlockSvg | safe }} + {% endif %} +
{% if dayItem.templateName %} - {{ padlockSvg | safe }} + Template:

- {{ dayItem.totalSlots }} slots
- 0 booked
- {{ dayItem.heldSlots }} held
+ {{ dayItem.startTime }} to {{ dayItem.endTime }}
+ {{ dayItem.totalSlots }} total slots {% endif %} {% if dayItem.isScheduleStart %} Select schedule @@ -79,18 +83,42 @@ {% endfor %} -
-
-

With selected days:

-
+
+
+
+

+ Clinic sessions +

+ +
    +
  • + +
  • +
  • + +
  • +
+
+ + +
+
+
+
+

+ Control availability +

- +
+ +
diff --git a/app/views/create-capacity-from-zero/create-clinic.html b/app/views/create-capacity-from-zero/create-clinic.html index 2f93783..a54461b 100644 --- a/app/views/create-capacity-from-zero/create-clinic.html +++ b/app/views/create-capacity-from-zero/create-clinic.html @@ -18,51 +18,46 @@ {% block content %}
+
+ + {% if errorState === "true" %} + {% set errorList = [] %} + {% if errors.clinicName %} + {% set errorList = errorList.concat([{ text: errors.clinicName, href: "#clinic-name" }]) %} + {% endif %} + {% if errors.unit %} + {% set errorList = errorList.concat([{ text: errors.unit, href: "#unit" }]) %} + {% endif %} + {% if errors.location %} + {% set errorList = errorList.concat([{ text: errors.location, href: "#location-0" }]) %} + {% endif %} + {{ errorSummary({ + titleText: "There is a problem", + errorList: errorList + }) }} + {% endif %} + +

Clinic details

+ +
+ + {% if errors and errors.clinicName %} + + Error: {{ errors.clinicName }} + + {% endif %} + +
-
-
-
- - {% if errorState === "true" %} - {% set errorList = [] %} - {% if errors.clinicName %} - {% set errorList = errorList.concat([{ text: errors.clinicName, href: "#clinic-name" }]) %} - {% endif %} - {% if errors.unit %} - {% set errorList = errorList.concat([{ text: errors.unit, href: "#unit" }]) %} - {% endif %} - {% if errors.location %} - {% set errorList = errorList.concat([{ text: errors.location, href: "#location-0" }]) %} - {% endif %} - {{ errorSummary({ - titleText: "There is a problem", - errorList: errorList - }) }} - {% endif %} - -

Clinic details

- -
- - {% if errors and errors.clinicName %} - - Error: {{ errors.clinicName }} - - {% endif %} - -
- -
- - -
- -
+
+ +
+
@@ -133,10 +128,13 @@

Clinic details

- -
- - + +
+
+
+ +
+
From 5198d2292fbdbe3c5046b83fb500e082bf4fe9d0 Mon Sep 17 00:00:00 2001 From: Mat Johnson Date: Tue, 27 Oct 2026 09:45:52 +0000 Subject: [PATCH 2/7] hinting at controls --- .../clinic-summary.html | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/app/views/create-capacity-from-zero/clinic-summary.html b/app/views/create-capacity-from-zero/clinic-summary.html index 9bc381c..eebe484 100644 --- a/app/views/create-capacity-from-zero/clinic-summary.html +++ b/app/views/create-capacity-from-zero/clinic-summary.html @@ -85,6 +85,23 @@
+
+

+ Availability +

+
    +
  • + +
  • +
  • + +
  • +
+ +
+
+

Clinic sessions @@ -95,7 +112,7 @@

  • - +

  • @@ -103,21 +120,18 @@

    -
    +

    - Control availability + Schedule

    • - +
    • - +
    • -
    -
    -
    From 9cc433a9246547160a208fe609fc61a2a5f4b345 Mon Sep 17 00:00:00 2001 From: Mat Johnson Date: Tue, 27 Oct 2026 12:33:37 +0000 Subject: [PATCH 3/7] Rename tabs and relink --- app/views/create-capacity-from-zero/index-all-clinics.html | 2 +- app/views/create-capacity-from-zero/index-manage.html | 2 +- app/views/create-capacity-from-zero/index.html | 2 +- .../create-capacity-from-zero/select-session-template.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/create-capacity-from-zero/index-all-clinics.html b/app/views/create-capacity-from-zero/index-all-clinics.html index 2d43365..a0caa2d 100644 --- a/app/views/create-capacity-from-zero/index-all-clinics.html +++ b/app/views/create-capacity-from-zero/index-all-clinics.html @@ -109,7 +109,7 @@ Today’s sessions
  • - Current clinics + Active clinics
  • All clinics diff --git a/app/views/create-capacity-from-zero/index-manage.html b/app/views/create-capacity-from-zero/index-manage.html index 5ebaa5d..0d735d2 100644 --- a/app/views/create-capacity-from-zero/index-manage.html +++ b/app/views/create-capacity-from-zero/index-manage.html @@ -42,7 +42,7 @@ Today’s sessions
  • - Current clinics + Active clinics
  • All clinics diff --git a/app/views/create-capacity-from-zero/index.html b/app/views/create-capacity-from-zero/index.html index 58c4ba5..34c7362 100644 --- a/app/views/create-capacity-from-zero/index.html +++ b/app/views/create-capacity-from-zero/index.html @@ -109,7 +109,7 @@ Today’s sessions
  • - Current clinics + Active clinics
  • All clinics diff --git a/app/views/create-capacity-from-zero/select-session-template.html b/app/views/create-capacity-from-zero/select-session-template.html index 0dbdd51..d91c43f 100644 --- a/app/views/create-capacity-from-zero/select-session-template.html +++ b/app/views/create-capacity-from-zero/select-session-template.html @@ -88,7 +88,7 @@