From 2a8c48a18445588dcfbbdaa02ab2b52cebc2a658 Mon Sep 17 00:00:00 2001 From: Caitlin Roach Date: Tue, 16 Jun 2026 16:14:41 +0100 Subject: [PATCH 1/5] Add empty state for no pharmacies --- app/routes/prototype-admin.js | 14 +++ .../includes/_preset-scenarios-table.html | 8 ++ app/views/pharmacies/index.html | 116 +++++++++--------- 3 files changed, 81 insertions(+), 57 deletions(-) diff --git a/app/routes/prototype-admin.js b/app/routes/prototype-admin.js index b2401748..2bd6777f 100644 --- a/app/routes/prototype-admin.js +++ b/app/routes/prototype-admin.js @@ -564,6 +564,20 @@ module.exports = (router) => { res.redirect('/home') }) + // ---------------------------------------------------------------- + // Preset: Pharmacy HQ, no data (Amanda White, P15951) + // ---------------------------------------------------------------- + + router.get('/prototype-setup/preset/pharmacy-hq-no-data', (req, res) => { + resetSession(req) + const data = req.session.data + data.currentUserId = '6424325235325' + data.currentOrganisationId = 'P15951' + // Remove all pharmacies belonging to P15951 to start with a clean slate + data.organisations = data.organisations.filter(org => org.companyId !== 'P15951' || org.type === 'Pharmacy HQ') + res.redirect('/home') + }) + // ---------------------------------------------------------------- // Preset: Recorder, single organisation (Ocean Merritt, FR4V56) // ---------------------------------------------------------------- diff --git a/app/views/includes/_preset-scenarios-table.html b/app/views/includes/_preset-scenarios-table.html index 3d9bd63b..05a98cf7 100644 --- a/app/views/includes/_preset-scenarios-table.html +++ b/app/views/includes/_preset-scenarios-table.html @@ -71,6 +71,14 @@ role: "Group administrator", scenarioDetails: "Group admin for a large pharmacy chain (same-name pharmacies)." }, + { + presetLabel: "Group admin, pharmacy HQ (no data)", + presetPath: "/prototype-setup/preset/pharmacy-hq-no-data", + userName: "Amanda White", + userEmail: "amanda.white@nhs.net", + role: "Group administrator", + scenarioDetails: "Group admin for a pharmacy HQ with no pre-loaded data, pharmacies or users." + }, { presetLabel: "Regional lead", presetPath: "/prototype-setup/preset/regions", diff --git a/app/views/pharmacies/index.html b/app/views/pharmacies/index.html index b033a9bf..ac9ab6ff 100644 --- a/app/views/pharmacies/index.html +++ b/app/views/pharmacies/index.html @@ -43,65 +43,67 @@

Pharmacies

href: "/pharmacies/select" }) }} - - -
Pharmacies added ({{ organisations | length }})
- {% if (organisations | length) > 10 %} -
- - -
- {% endif %} - - - - - - - - - - - - {% for organisation in organisations %} - - - - - - + {% if (organisations | length) > 0 %} +
- Name - - Vaccines - - Users - - Status - - Actions -
- {{ organisation.name }} ({{ organisation.id}}) - - {% set vaccinesEnabled = [] %} - {% for vaccine in organisation.vaccines %} - {% if vaccine.status == "enabled" %} - {% set vaccinesEnabled = (vaccinesEnabled.push(vaccine.name), vaccinesEnabled) %} - {% endif %} - {% endfor %} - - {{ (vaccinesEnabled | sort | join(", ")) | capitaliseFirstLetter }} - - {{ organisationUserCounts[organisation.id] }} - - {{ organisation.status }} - - Manage -
+ +
Pharmacies added ({{ organisations | length }})
+ {% if (organisations | length) > 10 %} +
+ + +
+ {% endif %} + + + + + + + + - {% endfor %} + + + {% for organisation in organisations %} + + + + + + + + {% endfor %} - -
+ Name + + Vaccines + + Users + + Status + + Actions +
+ {{ organisation.name }} ({{ organisation.id}}) + + {% set vaccinesEnabled = [] %} + {% for vaccine in organisation.vaccines %} + {% if vaccine.status == "enabled" %} + {% set vaccinesEnabled = (vaccinesEnabled.push(vaccine.name), vaccinesEnabled) %} + {% endif %} + {% endfor %} + + {{ (vaccinesEnabled | sort | join(", ")) | capitaliseFirstLetter }} + + {{ organisationUserCounts[organisation.id] }} + + {{ organisation.status }} + + Manage +
+ + + {% endif %} {% if closedOrganisations.length > 0 %}
From 2013a987586a31610d471a3c650d83e9e4fb54e6 Mon Sep 17 00:00:00 2001 From: Caitlin Roach Date: Mon, 20 Jul 2026 10:13:48 +0100 Subject: [PATCH 2/5] Initial dashboard changes --- app/routes/home.js | 126 ++++++++++++++++- app/views/dashboard/_by-vaccine.html | 137 +++++++++++++------ app/views/dashboard/_vaccination-totals.html | 18 ++- app/views/dashboard/index.html | 15 +- 4 files changed, 238 insertions(+), 58 deletions(-) diff --git a/app/routes/home.js b/app/routes/home.js index a70f4c6d4..60829741 100644 --- a/app/routes/home.js +++ b/app/routes/home.js @@ -68,7 +68,55 @@ module.exports = router => { const data = req.session.data const allVaccinationsRecorded = data.vaccinationsRecorded const dateToday = new Date() + const dateYesterday = new Date(dateToday) + dateYesterday.setDate(dateToday.getDate() - 1) + + const startOfThisWeek = new Date(Date.UTC( + dateToday.getUTCFullYear(), + dateToday.getUTCMonth(), + dateToday.getUTCDate() - ((dateToday.getUTCDay() + 6) % 7), + 0, + 0, + 0 + )) + const startOfLastCalendarWeek = new Date(startOfThisWeek) + startOfLastCalendarWeek.setUTCDate(startOfThisWeek.getUTCDate() - 7) + const endOfLastCalendarWeek = new Date(startOfThisWeek) + endOfLastCalendarWeek.setUTCDate(startOfThisWeek.getUTCDate() - 1) + endOfLastCalendarWeek.setUTCHours(23, 59, 59, 999) + + const shortDateFormatter = new Intl.DateTimeFormat('en-GB', { + day: 'numeric', + month: 'short', + timeZone: 'UTC' + }) + const lastCalendarWeekStartLabel = shortDateFormatter.format(startOfLastCalendarWeek) + const lastCalendarWeekEndLabel = shortDateFormatter.format(endOfLastCalendarWeek) + + const startOfThisMonth = new Date(Date.UTC( + dateToday.getUTCFullYear(), + dateToday.getUTCMonth(), + 1, + 0, + 0, + 0 + )) + const startOfLastCalendarMonth = new Date(Date.UTC( + startOfThisMonth.getUTCFullYear(), + startOfThisMonth.getUTCMonth() - 1, + 1, + 0, + 0, + 0 + )) + const endOfLastCalendarMonth = new Date(startOfThisMonth) + endOfLastCalendarMonth.setUTCDate(0) + endOfLastCalendarMonth.setUTCHours(23, 59, 59, 999) + const monthToday = (dateToday.getMonth() + 1) // JavaScript dates are 0-indexed + const currentYear = dateToday.getFullYear() + const lastCalendarMonth = (startOfLastCalendarMonth.getMonth() + 1) + const lastCalendarMonthYear = startOfLastCalendarMonth.getFullYear() // Vaccinations to count let vaccinationsRecorded = [] @@ -105,6 +153,20 @@ module.exports = router => { let totalsByVaccine = [] let totalsByDay = [] + const selectedSiteIdFromQuery = req.query.siteId + const hasMultipleVisibleSites = sites.length > 1 + const selectedByVaccinationSiteId = ( + hasMultipleVisibleSites && + selectedSiteIdFromQuery && + sites.some((site) => site.id === selectedSiteIdFromQuery) + ) + ? selectedSiteIdFromQuery + : 'all' + + const vaccinationsRecordedForByVaccine = (selectedByVaccinationSiteId === 'all') + ? vaccinationsRecorded + : vaccinationsRecorded.filter((vaccination) => vaccination.siteId === selectedByVaccinationSiteId) + const totalVaccinationsRecorded = countVaccinations(vaccinationsRecorded) const totalVaccinationsRecordedToday = countVaccinations( @@ -112,6 +174,11 @@ module.exports = router => { {date: dateToday} ) + const totalVaccinationsRecordedYesterday = countVaccinations( + vaccinationsRecorded, + {date: dateYesterday} + ) + const sevenDaysAgo = new Date(Date.UTC(dateToday.getFullYear(), dateToday.getMonth(), dateToday.getDate() - 7, 0, 0, 0)); const totalVaccinationsRecordedPast7Days = countVaccinations( @@ -123,7 +190,24 @@ module.exports = router => { month: dateToday }) - const uniqueVaccinesRecorded = [...new Set(vaccinationsRecorded.map((vaccination) => vaccination.vaccine))] + const totalVaccinationsRecordedLastCalendarWeek = countVaccinations( + vaccinationsRecorded, + { + // Range counting uses > minDate and <= maxDate, so move minDate back one day + // to include all vaccinations on the start date. + minDate: new Date(Date.UTC( + startOfLastCalendarWeek.getUTCFullYear(), + startOfLastCalendarWeek.getUTCMonth(), + startOfLastCalendarWeek.getUTCDate() - 1, + 0, + 0, + 0 + )), + maxDate: endOfLastCalendarWeek + } + ) + + const uniqueVaccinesRecorded = [...new Set(vaccinationsRecordedForByVaccine.map((vaccination) => vaccination.vaccine))] for (let i = 0; i < 7; i++) { @@ -142,11 +226,39 @@ module.exports = router => { totalsByVaccine.push({ vaccine: vaccine, - today: countVaccinations(vaccinationsRecorded, { + today: countVaccinations(vaccinationsRecordedForByVaccine, { date: dateToday, vaccine: vaccine }), - month: countVaccinations(vaccinationsRecorded, { + yesterday: countVaccinations(vaccinationsRecordedForByVaccine, { + date: dateYesterday, + vaccine: vaccine + }), + lastCalendarWeek: countVaccinations(vaccinationsRecordedForByVaccine, { + minDate: new Date(Date.UTC( + startOfLastCalendarWeek.getUTCFullYear(), + startOfLastCalendarWeek.getUTCMonth(), + startOfLastCalendarWeek.getUTCDate() - 1, + 0, + 0, + 0 + )), + maxDate: endOfLastCalendarWeek, + vaccine: vaccine + }), + lastCalendarMonth: countVaccinations(vaccinationsRecordedForByVaccine, { + minDate: new Date(Date.UTC( + startOfLastCalendarMonth.getUTCFullYear(), + startOfLastCalendarMonth.getUTCMonth(), + startOfLastCalendarMonth.getUTCDate() - 1, + 0, + 0, + 0 + )), + maxDate: endOfLastCalendarMonth, + vaccine: vaccine + }), + thisMonth: countVaccinations(vaccinationsRecordedForByVaccine, { month: dateToday, vaccine: vaccine }), @@ -220,11 +332,19 @@ module.exports = router => { res.render('dashboard/index', { sites, pharmacies, + selectedByVaccinationSiteId, totalVaccinationsRecorded, totalVaccinationsRecordedToday, + totalVaccinationsRecordedYesterday, totalVaccinationsRecordedThisMonth, + totalVaccinationsRecordedLastCalendarWeek, totalVaccinationsRecordedPast7Days, monthToday, + currentYear, + lastCalendarWeekStartLabel, + lastCalendarWeekEndLabel, + lastCalendarMonth, + lastCalendarMonthYear, totalsBySite, totalsByVaccine, totalsByDay, diff --git a/app/views/dashboard/_by-vaccine.html b/app/views/dashboard/_by-vaccine.html index 56277088..7473c022 100644 --- a/app/views/dashboard/_by-vaccine.html +++ b/app/views/dashboard/_by-vaccine.html @@ -1,46 +1,99 @@ - - - - - - - - - - - - +

By vaccination

+ +{% if (sites | length) > 1 %} + {% set siteFilterItems = [{ + text: "All sites", + value: "all", + selected: (selectedByVaccinationSiteId == "all") + }] %} - {% for totalByVaccine in (totalsByVaccine | sort(false, true, "vaccine") ) %} - - - - - - - + {% for site in (sites | sort(false, false, "name")) %} + {% set siteFilterItems = (siteFilterItems.push({ + text: site.name, + value: site.id, + selected: (selectedByVaccinationSiteId == site.id) + }), siteFilterItems) %} {% endfor %} + + {{ select({ + id: "dashboard-by-vaccination-site-filter", + name: "siteId", + label: { + text: "Filter by site", + size: "s" + }, + items: siteFilterItems, + attributes: { + onchange: "this.form.submit()" + } + }) }} + +{% endif %} + +{% if selectedByVaccinationSiteId != "all" and (totalsByVaccine | length) == 0 %} + {% set selectedSite = sites | findById(selectedByVaccinationSiteId) %} +

{{ selectedSite.name if selectedSite else "This site" }} has not yet recorded any vaccinations.

+{% else %} +
By vaccination
- Vaccination - - Today - - Past 7 days - - {{ (monthToday | monthName) }} to date - - Total -
- {{ (totalByVaccine.vaccine ) | capitaliseFirstLetter }} - - {{ totalByVaccine.today }} - - {{ totalByVaccine.past7Days }} - - {{ totalByVaccine.month }} - - {{ totalByVaccine.total }} -
+ + + + + + + + + + + + + {% for totalByVaccine in (totalsByVaccine | sort(false, true, "vaccine") ) %} + + + + + + + + + {% endfor %} + - -
+ Vaccine + + Today + + Yesterday + + {{ lastCalendarWeekStartLabel }} + to {{ lastCalendarWeekEndLabel }} + + {{ (lastCalendarMonth | monthName) }} {{ lastCalendarMonthYear }} + + {{ (monthToday | monthName) }} {{ currentYear }} +
+ Vaccine + {{ (totalByVaccine.vaccine ) | capitaliseFirstLetter }} + + Today + {{ totalByVaccine.today }} + + Yesterday + {{ totalByVaccine.yesterday }} + + + {{ lastCalendarWeekStartLabel }} + to {{ lastCalendarWeekEndLabel }} + + {{ totalByVaccine.lastCalendarWeek }} + + {{ (lastCalendarMonth | monthName) }} {{ lastCalendarMonthYear }} + {{ totalByVaccine.lastCalendarMonth }} + + {{ (monthToday | monthName) }} {{ currentYear }} + {{ totalByVaccine.thisMonth }} +
+ + +{% endif %} diff --git a/app/views/dashboard/_vaccination-totals.html b/app/views/dashboard/_vaccination-totals.html index 64c03011..321809dc 100644 --- a/app/views/dashboard/_vaccination-totals.html +++ b/app/views/dashboard/_vaccination-totals.html @@ -8,18 +8,20 @@ }), topStats) %} {% set topStats = (topStats.push({ - label: "Past 7 days", - value: totalVaccinationsRecordedPast7Days + label: "Yesterday", + value: totalVaccinationsRecordedYesterday }), topStats) %} {% set topStats = (topStats.push({ - label: (monthToday | monthName) + " to date", - value: totalVaccinationsRecordedThisMonth + label: "Last calendar week", + hint: lastCalendarWeekStartLabel + " to " + lastCalendarWeekEndLabel, + value: totalVaccinationsRecordedLastCalendarWeek }), topStats) %} {% set topStats = (topStats.push({ - label: "Total", - value: totalVaccinationsRecorded + label: "Month to date", + hint: (monthToday | monthName) + " " + currentYear, + value: totalVaccinationsRecordedThisMonth }), topStats) %} {% for stat in topStats %} @@ -27,6 +29,10 @@ {% set cardHtml %}

{{ stat.value }}

{{ stat.label }} + {% if stat.hint %} +
+ {{ stat.hint }} + {% endif %} {% endset %} {{ card({ diff --git a/app/views/dashboard/index.html b/app/views/dashboard/index.html index 5d90a5e1..70a2365a 100644 --- a/app/views/dashboard/index.html +++ b/app/views/dashboard/index.html @@ -54,19 +54,20 @@

All vaccinations

{{ tabs({ items: [ { - label: "By day", - id: "past-7-days", + label: "By vaccination", + id: "by-vaccination", + selected: true, panel: { - html: byDayHtml + html: byVaccinationHtml } }, { - label: "By vaccination", - id: "by-vaccination", + label: "By day", + id: "past-7-days", panel: { - html: byVaccinationHtml + html: byDayHtml } - } if (totalsByVaccine | length) > 1, + }, { label: "By site", id: "by-site", From 3d4505acbb14631572db51cb6a5edb766279bda2 Mon Sep 17 00:00:00 2001 From: Caitlin Roach Date: Tue, 21 Jul 2026 12:32:12 +0100 Subject: [PATCH 3/5] Changes \ --- app/routes/home.js | 86 +++++++++++++++++--- app/views/dashboard/_by-site.html | 19 +++-- app/views/dashboard/_by-vaccine.html | 8 +- app/views/dashboard/_vaccination-totals.html | 6 +- app/views/dashboard/index.html | 4 + 5 files changed, 97 insertions(+), 26 deletions(-) diff --git a/app/routes/home.js b/app/routes/home.js index 60829741..4fa26f81 100644 --- a/app/routes/home.js +++ b/app/routes/home.js @@ -67,7 +67,22 @@ module.exports = router => { const data = req.session.data const allVaccinationsRecorded = data.vaccinationsRecorded - const dateToday = new Date() + const simulatedDateParam = req.query.simulatedDate + const simulatedDateMatch = (typeof simulatedDateParam === 'string') + ? simulatedDateParam.match(/^(\d{4})-(\d{2})-(\d{2})$/) + : null + + const dateToday = simulatedDateMatch + ? new Date(Date.UTC( + parseInt(simulatedDateMatch[1]), + parseInt(simulatedDateMatch[2]) - 1, + parseInt(simulatedDateMatch[3]), + 0, + 0, + 0 + )) + : new Date() + const dateYesterday = new Date(dateToday) dateYesterday.setDate(dateToday.getDate() - 1) @@ -85,13 +100,36 @@ module.exports = router => { endOfLastCalendarWeek.setUTCDate(startOfThisWeek.getUTCDate() - 1) endOfLastCalendarWeek.setUTCHours(23, 59, 59, 999) - const shortDateFormatter = new Intl.DateTimeFormat('en-GB', { - day: 'numeric', + const monthNameFormatter = new Intl.DateTimeFormat('en-GB', { + month: 'long', + timeZone: 'UTC' + }) + const shortMonthNameFormatter = new Intl.DateTimeFormat('en-GB', { month: 'short', timeZone: 'UTC' }) - const lastCalendarWeekStartLabel = shortDateFormatter.format(startOfLastCalendarWeek) - const lastCalendarWeekEndLabel = shortDateFormatter.format(endOfLastCalendarWeek) + const lastCalendarWeekStartDay = startOfLastCalendarWeek.getUTCDate() + const lastCalendarWeekEndDay = endOfLastCalendarWeek.getUTCDate() + const lastCalendarWeekStartMonth = monthNameFormatter.format(startOfLastCalendarWeek) + const lastCalendarWeekEndMonth = monthNameFormatter.format(endOfLastCalendarWeek) + const lastCalendarWeekStartMonthShort = shortMonthNameFormatter.format(startOfLastCalendarWeek) + const lastCalendarWeekEndMonthShort = shortMonthNameFormatter.format(endOfLastCalendarWeek) + const isLastCalendarWeekInSameMonth = ( + startOfLastCalendarWeek.getUTCMonth() === endOfLastCalendarWeek.getUTCMonth() && + startOfLastCalendarWeek.getUTCFullYear() === endOfLastCalendarWeek.getUTCFullYear() + ) + + const lastCalendarWeekRangeLabel = isLastCalendarWeekInSameMonth + ? `${lastCalendarWeekStartDay} to ${lastCalendarWeekEndDay} ${lastCalendarWeekEndMonth}` + : `${lastCalendarWeekStartDay} ${lastCalendarWeekStartMonthShort} to ${lastCalendarWeekEndDay} ${lastCalendarWeekEndMonthShort}` + + const lastCalendarWeekHeaderLineOne = isLastCalendarWeekInSameMonth + ? `${lastCalendarWeekStartDay} to ${lastCalendarWeekEndDay}` + : `${lastCalendarWeekStartDay} ${lastCalendarWeekStartMonthShort} to` + + const lastCalendarWeekHeaderLineTwo = isLastCalendarWeekInSameMonth + ? lastCalendarWeekEndMonth + : `${lastCalendarWeekEndDay} ${lastCalendarWeekEndMonthShort}` const startOfThisMonth = new Date(Date.UTC( dateToday.getUTCFullYear(), @@ -287,13 +325,36 @@ module.exports = router => { date: dateToday, siteId: site.id }), - month:countVaccinations(vaccinationsRecorded, { - month: dateToday, + yesterday: countVaccinations(vaccinationsRecorded, { + date: dateYesterday, siteId: site.id }), - past7Days: countVaccinations(vaccinationsRecorded, { - minDate: sevenDaysAgo, - maxDate: dateToday, + lastCalendarWeek: countVaccinations(vaccinationsRecorded, { + minDate: new Date(Date.UTC( + startOfLastCalendarWeek.getUTCFullYear(), + startOfLastCalendarWeek.getUTCMonth(), + startOfLastCalendarWeek.getUTCDate() - 1, + 0, + 0, + 0 + )), + maxDate: endOfLastCalendarWeek, + siteId: site.id + }), + lastCalendarMonth: countVaccinations(vaccinationsRecorded, { + minDate: new Date(Date.UTC( + startOfLastCalendarMonth.getUTCFullYear(), + startOfLastCalendarMonth.getUTCMonth(), + startOfLastCalendarMonth.getUTCDate() - 1, + 0, + 0, + 0 + )), + maxDate: endOfLastCalendarMonth, + siteId: site.id + }), + thisMonth: countVaccinations(vaccinationsRecorded, { + month: dateToday, siteId: site.id }), total: total @@ -341,8 +402,9 @@ module.exports = router => { totalVaccinationsRecordedPast7Days, monthToday, currentYear, - lastCalendarWeekStartLabel, - lastCalendarWeekEndLabel, + lastCalendarWeekRangeLabel, + lastCalendarWeekHeaderLineOne, + lastCalendarWeekHeaderLineTwo, lastCalendarMonth, lastCalendarMonthYear, totalsBySite, diff --git a/app/views/dashboard/_by-site.html b/app/views/dashboard/_by-site.html index af72f9f8..14353c1f 100644 --- a/app/views/dashboard/_by-site.html +++ b/app/views/dashboard/_by-site.html @@ -9,13 +9,17 @@ Today - Past 7 days + Yesterday - {{ (monthToday | monthName) }} to date + {{ lastCalendarWeekHeaderLineOne }} + {{ lastCalendarWeekHeaderLineTwo }} - Total + {{ (lastCalendarMonth | monthName) }} {{ lastCalendarMonthYear }} + + + {{ (monthToday | monthName) }} {{ currentYear }} @@ -30,13 +34,16 @@ {{ totalBySite.today }} - {{ totalBySite.past7Days }} + {{ totalBySite.yesterday }} - {{ totalBySite.month }} + {{ totalBySite.lastCalendarWeek }} + + + {{ totalBySite.lastCalendarMonth }} - {{ totalBySite.total }} + {{ totalBySite.thisMonth }} {% endfor %} diff --git a/app/views/dashboard/_by-vaccine.html b/app/views/dashboard/_by-vaccine.html index 7473c022..fef9cdd1 100644 --- a/app/views/dashboard/_by-vaccine.html +++ b/app/views/dashboard/_by-vaccine.html @@ -48,8 +48,8 @@

By vaccination

Yesterday - {{ lastCalendarWeekStartLabel }} - to {{ lastCalendarWeekEndLabel }} + {{ lastCalendarWeekHeaderLineOne }} + {{ lastCalendarWeekHeaderLineTwo }} {{ (lastCalendarMonth | monthName) }} {{ lastCalendarMonthYear }} @@ -77,8 +77,8 @@

By vaccination

- {{ lastCalendarWeekStartLabel }} - to {{ lastCalendarWeekEndLabel }} + {{ lastCalendarWeekHeaderLineOne }} + {{ lastCalendarWeekHeaderLineTwo }} {{ totalByVaccine.lastCalendarWeek }} diff --git a/app/views/dashboard/_vaccination-totals.html b/app/views/dashboard/_vaccination-totals.html index 321809dc..1b377cd5 100644 --- a/app/views/dashboard/_vaccination-totals.html +++ b/app/views/dashboard/_vaccination-totals.html @@ -13,14 +13,12 @@ }), topStats) %} {% set topStats = (topStats.push({ - label: "Last calendar week", - hint: lastCalendarWeekStartLabel + " to " + lastCalendarWeekEndLabel, + label: lastCalendarWeekRangeLabel, value: totalVaccinationsRecordedLastCalendarWeek }), topStats) %} {% set topStats = (topStats.push({ - label: "Month to date", - hint: (monthToday | monthName) + " " + currentYear, + label: (monthToday | monthName) + " to date", value: totalVaccinationsRecordedThisMonth }), topStats) %} diff --git a/app/views/dashboard/index.html b/app/views/dashboard/index.html index 70a2365a..5e7ccb96 100644 --- a/app/views/dashboard/index.html +++ b/app/views/dashboard/index.html @@ -15,6 +15,10 @@

{% if currentOrganisation %}{{ currentOrganisation.name }}{% else %}PCT Healthcare{% endif %}

+ {{ insetText({ + text: "Data shown is based on the date of administration of vaccinations." + }) }} + {% if currentOrganisation and totalVaccinationsRecorded == 0 %} {% include "dashboard/_no-vaccinations-recorded.html" %} From 8f67e0b10ae1a1ffe556d1afbbcf6c7f60788a86 Mon Sep 17 00:00:00 2001 From: Caitlin Roach Date: Tue, 21 Jul 2026 12:39:16 +0100 Subject: [PATCH 4/5] fix to remove unneeded variable --- app/routes/home.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app/routes/home.js b/app/routes/home.js index 4fa26f81..f36398a5 100644 --- a/app/routes/home.js +++ b/app/routes/home.js @@ -110,7 +110,6 @@ module.exports = router => { }) const lastCalendarWeekStartDay = startOfLastCalendarWeek.getUTCDate() const lastCalendarWeekEndDay = endOfLastCalendarWeek.getUTCDate() - const lastCalendarWeekStartMonth = monthNameFormatter.format(startOfLastCalendarWeek) const lastCalendarWeekEndMonth = monthNameFormatter.format(endOfLastCalendarWeek) const lastCalendarWeekStartMonthShort = shortMonthNameFormatter.format(startOfLastCalendarWeek) const lastCalendarWeekEndMonthShort = shortMonthNameFormatter.format(endOfLastCalendarWeek) From 29c6dba580183a2e44c3997fb9c60b1531b66dd4 Mon Sep 17 00:00:00 2001 From: Anna-Sutton Date: Tue, 21 Jul 2026 13:34:08 +0100 Subject: [PATCH 5/5] Update vaccination data description text --- app/views/dashboard/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/dashboard/index.html b/app/views/dashboard/index.html index 5e7ccb96..bd2c1dfc 100644 --- a/app/views/dashboard/index.html +++ b/app/views/dashboard/index.html @@ -16,7 +16,7 @@

{% if currentOrganisation %}{{ currentOrganisation.name }}{% else %}PCT Healthcare{% endif %}

{{ insetText({ - text: "Data shown is based on the date of administration of vaccinations." + text: "The data shown here is based on the date the vaccination was given." }) }}