From 8e690c3631ff229f8fe3758f10c207788587dd52 Mon Sep 17 00:00:00 2001 From: Mat Johnson Date: Thu, 16 Jul 2026 13:09:43 +0100 Subject: [PATCH 1/4] Adding some potential example errors and removing as yet unused intro paras --- app/views/clinics/00-create-day-clinic.html | 45 +++++++++- app/views/clinics/01-set-date-and-time.html | 96 ++++++++++++++++----- app/views/clinics/02-organise-slots.html | 4 +- 3 files changed, 117 insertions(+), 28 deletions(-) diff --git a/app/views/clinics/00-create-day-clinic.html b/app/views/clinics/00-create-day-clinic.html index b2ffcc6..29eae0f 100644 --- a/app/views/clinics/00-create-day-clinic.html +++ b/app/views/clinics/00-create-day-clinic.html @@ -1,5 +1,7 @@ {% extends 'layout.html' %} +{% set errorState = "false" %} + {% set pageName = "Clinics" %} {% from "_includes/primary-navigation.html" import primaryNavigation %} @@ -63,18 +65,43 @@

+ {% if errorState === "true" %} + {{ errorSummary({ + titleText: "There is a problem", + errorList: [ + { + text: "Clinic must be given a name", + href: "#" + }, + { + text: "A unit must be chosen", + href: "#" + }, + { + text: "A location must be chosen", + href: "#" + } + ] + }) }} + {% endif %} +

Clinic details

-
+
A memorable name for this clinic. This is the name you’ll see everywhere for it, as titles and links.
- + {% if errorState === "true" %} + + Error: Clinic must be given a name + + {% endif %} +
@@ -89,11 +116,16 @@

Clinic details

-
+
Unit + {% if errorState === "true" %} + + Error: A unit must be chosen + + {% endif %}
@@ -132,11 +164,16 @@

Clinic details

-
+
Location + {% if errorState === "true" %} + + Error: A location must be chosen + + {% endif %}
diff --git a/app/views/clinics/01-set-date-and-time.html b/app/views/clinics/01-set-date-and-time.html index 4e1e71d..489f9be 100644 --- a/app/views/clinics/01-set-date-and-time.html +++ b/app/views/clinics/01-set-date-and-time.html @@ -1,5 +1,7 @@ {% extends 'layout.html' %} +{% set errorState = "false" %} + {% set pageName = "Clinics" %} {% from "_includes/primary-navigation.html" import primaryNavigation %} @@ -63,12 +65,47 @@

+ {% if errorState === "true" %} + {{ errorSummary({ + titleText: "There is a problem", + errorList: [ + { + text: "Date of clinic must be given a day, month, and year", + href: "#" + }, + { + text: "Date of clinic must be in the future", + href: "#" + }, + { + text: "Start time must be entered, in 24 hour format", + href: "#" + }, + { + text: "End time must be entered, in 24 hour format", + href: "#" + }, + { + text: "End time must be later than start time", + href: "#" + }, + { + text: "Start time must be earlier than end time", + href: "#" + }, + { + text: "Slot length must be entered, in minutes", + href: "#" + } + ] + }) }} + {% endif %} +

Set date and time

-

Potentially some real brief help and scene setting. Mainly to point out you can punch holes in it as you go?

-
+
Date of clinic @@ -76,13 +113,18 @@

Set date and time

For example, 18 6 2026
+ {% if errorState === "true" %} + + Error: Date of clinic must be given a day, month, and year + + {% endif %}
- +
@@ -90,7 +132,7 @@

Set date and time

- +
@@ -98,21 +140,26 @@

Set date and time

- +

-
+
Session start time
- For example, 10:00 + Use 24 hour format, for example, 10:00
+ {% if errorState === "true" %} + + Error: Start time must be entered, in 24 hour format + + {% endif %}
@@ -120,7 +167,7 @@

Set date and time

-
@@ -130,7 +177,7 @@

Set date and time

-
@@ -138,14 +185,19 @@

Set date and time

-
+
Session end time
- For example, 17:00 + Use 24 hour format, for example, 17:00
+ {% if errorState === "true" %} + + Error: End time must be entered, in 24 hour format + + {% endif %}
@@ -153,7 +205,7 @@

Set date and time

-
@@ -162,7 +214,7 @@

Set date and time

-
@@ -170,12 +222,17 @@

Set date and time

-
+
+ {% if errorState === "true" %} + + Error: Slot length must be entered, in minutes + + {% endif %}
-
@@ -187,18 +244,12 @@

Set date and time

X total slots in the session

- +
- -
- Time must be in 24 hour format
- Start time must be before end time and vice versa
- Slots dont have to divide equally into the times, but it'll be interesting to work that out? -
@@ -269,6 +320,7 @@

Set date and time

totalElement.textContent = String(totalSlots); totalInput.value = String(totalSlots); + if (!errorElement) { return; } diff --git a/app/views/clinics/02-organise-slots.html b/app/views/clinics/02-organise-slots.html index 56dc77a..d61c18b 100644 --- a/app/views/clinics/02-organise-slots.html +++ b/app/views/clinics/02-organise-slots.html @@ -126,7 +126,6 @@

Organise slots

-

Potentially some real brief help and scene setting. Selection and controls

Session time {{ data.newSession.startTime.hour | zeroPad }}:{{ data.newSession.startTime.minute | zeroPad }} to {{ data.newSession.endTime.hour | zeroPad }}:{{ data.newSession.endTime.minute | zeroPad }} @@ -155,8 +154,9 @@

With selected:

  • Hold
  • Staff break
  • Special appointment
  • -
  • Clear slot type
  • +
  • Clear slot type
  • +
    • Merge selected
    • Unmerge
    • From c023e1abd1ee863d12e26511f98305d574bb651a Mon Sep 17 00:00:00 2001 From: Mat Johnson Date: Thu, 16 Jul 2026 15:18:18 +0100 Subject: [PATCH 2/4] Amending copilot shift-click to include label clicks --- app/views/clinics/02-organise-slots.html | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/app/views/clinics/02-organise-slots.html b/app/views/clinics/02-organise-slots.html index d61c18b..9e383d2 100644 --- a/app/views/clinics/02-organise-slots.html +++ b/app/views/clinics/02-organise-slots.html @@ -138,10 +138,9 @@

      - +

      + Click to select a slot. Press shift and click to select a range. +

      @@ -444,6 +443,7 @@

      With selected:

      `; const checkbox = div.querySelector('input[type="checkbox"]'); + const label = div.querySelector('label'); function handleCheckboxSelection(e, checked) { const head = resolveToMergeHead(i); @@ -475,6 +475,16 @@

      With selected:

      checkbox.addEventListener('click', e => { handleCheckboxSelection(e, checkbox.checked); }); + + if (label) { + label.addEventListener('click', e => { + // Handle label clicks explicitly so shift-click range selection works from the label text too. + e.preventDefault(); + const nextChecked = !checkbox.checked; + checkbox.checked = nextChecked; + handleCheckboxSelection(e, nextChecked); + }); + } } container.appendChild(div); From 690eaaef3b8fdda07b3301d3ff3f79eccf25b166 Mon Sep 17 00:00:00 2001 From: Mat Johnson Date: Fri, 17 Jul 2026 12:08:26 +0100 Subject: [PATCH 3/4] Little bit of tidying up --- app/views/clinics/00-create-day-clinic.html | 2 +- app/views/clinics/01-set-date-and-time.html | 2 +- app/views/clinics/03-publish-clinic.html | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/clinics/00-create-day-clinic.html b/app/views/clinics/00-create-day-clinic.html index 29eae0f..5c0694d 100644 --- a/app/views/clinics/00-create-day-clinic.html +++ b/app/views/clinics/00-create-day-clinic.html @@ -1,6 +1,6 @@ {% extends 'layout.html' %} -{% set errorState = "false" %} +{% set errorState = "true" %} {% set pageName = "Clinics" %} diff --git a/app/views/clinics/01-set-date-and-time.html b/app/views/clinics/01-set-date-and-time.html index 489f9be..e966857 100644 --- a/app/views/clinics/01-set-date-and-time.html +++ b/app/views/clinics/01-set-date-and-time.html @@ -1,6 +1,6 @@ {% extends 'layout.html' %} -{% set errorState = "false" %} +{% set errorState = "true" %} {% set pageName = "Clinics" %} diff --git a/app/views/clinics/03-publish-clinic.html b/app/views/clinics/03-publish-clinic.html index 65740ec..22ac66e 100644 --- a/app/views/clinics/03-publish-clinic.html +++ b/app/views/clinics/03-publish-clinic.html @@ -64,7 +64,6 @@

      Publish clinic

      -

      Potentially some real brief help and scene setting. Mainly to point out you can punch holes in it as you go?

      From e4454008b6cee27e56ba13500e3c767c43a35131 Mon Sep 17 00:00:00 2001 From: Mat Johnson Date: Fri, 17 Jul 2026 12:51:14 +0100 Subject: [PATCH 4/4] Error states to false, do page names quickly --- app/views/clinics/00-create-day-clinic.html | 4 ++-- app/views/clinics/01-set-date-and-time.html | 4 ++-- app/views/clinics/02-organise-slots.html | 2 +- app/views/clinics/03-publish-clinic.html | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/clinics/00-create-day-clinic.html b/app/views/clinics/00-create-day-clinic.html index 5c0694d..485b455 100644 --- a/app/views/clinics/00-create-day-clinic.html +++ b/app/views/clinics/00-create-day-clinic.html @@ -1,8 +1,8 @@ {% extends 'layout.html' %} -{% set errorState = "true" %} +{% set errorState = "false" %} -{% set pageName = "Clinics" %} +{% set pageName = "Create day clinic" %} {% from "_includes/primary-navigation.html" import primaryNavigation %} {% block header %} diff --git a/app/views/clinics/01-set-date-and-time.html b/app/views/clinics/01-set-date-and-time.html index e966857..5cb2e98 100644 --- a/app/views/clinics/01-set-date-and-time.html +++ b/app/views/clinics/01-set-date-and-time.html @@ -1,8 +1,8 @@ {% extends 'layout.html' %} -{% set errorState = "true" %} +{% set errorState = "false" %} -{% set pageName = "Clinics" %} +{% set pageName = "Set date and time" %} {% from "_includes/primary-navigation.html" import primaryNavigation %} {% block header %} diff --git a/app/views/clinics/02-organise-slots.html b/app/views/clinics/02-organise-slots.html index 9e383d2..ef31776 100644 --- a/app/views/clinics/02-organise-slots.html +++ b/app/views/clinics/02-organise-slots.html @@ -1,6 +1,6 @@ {% extends 'layout.html' %} -{% set pageName = "Clinics" %} +{% set pageName = "Organise slots" %} {% from "_includes/primary-navigation.html" import primaryNavigation %} {% block header %} diff --git a/app/views/clinics/03-publish-clinic.html b/app/views/clinics/03-publish-clinic.html index 22ac66e..5c79ff2 100644 --- a/app/views/clinics/03-publish-clinic.html +++ b/app/views/clinics/03-publish-clinic.html @@ -1,6 +1,6 @@ {% extends 'layout.html' %} -{% set pageName = "Clinics" %} +{% set pageName = "Publish clinic" %} {% from "_includes/primary-navigation.html" import primaryNavigation %} {% block header %}