Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
e4be84b
Added users pages and logic back
caitlinroach-nhs Jun 9, 2026
29faf5b
Add ODS codes to pharmacy table on ind user page
caitlinroach-nhs Jun 9, 2026
e4b2fae
added full stops to success messages
caitlinroach-nhs Jun 9, 2026
2ea6ac7
added email variants folder
caitlinroach-nhs Jun 9, 2026
b66f71e
flattened email structure
caitlinroach-nhs Jun 9, 2026
21399a3
pharmacy table updates
caitlinroach-nhs Jun 9, 2026
a41f4c1
added example of closed pharmacy
caitlinroach-nhs Jun 9, 2026
24a275d
Update line that introduced the email on check.html
Anna-Sutton Jun 9, 2026
4f0adb3
Aligned H1 on this screen with other similar screens
Anna-Sutton Jun 10, 2026
50e812f
Fixed h1 text on user add to pharmacy
caitlinroach-nhs Jun 10, 2026
84f9d3b
added email file for multiple pharmacies
caitlinroach-nhs Jun 10, 2026
f525666
change role to permissions
caitlinroach-nhs Jun 10, 2026
7b68739
Updated email for user added to multiple pharmacies
Anna-Sutton Jun 10, 2026
f8d7003
Updated description of Pharmacies page
Anna-Sutton Jun 10, 2026
3f220e1
Tweaked deactivation message for user
Anna-Sutton Jun 10, 2026
df9f258
Fixed remove action on new pharmas to a user
caitlinroach-nhs Jun 10, 2026
037245a
Merge branch 'cp-admin-expanded-scope' of https://github.com/NHSDigit…
caitlinroach-nhs Jun 10, 2026
766136a
fix line on check pharmacies for multi pharma to a user
caitlinroach-nhs Jun 10, 2026
55bcc43
Changes to make adding to additional pharmacies for multi at once
caitlinroach-nhs Jun 10, 2026
2a4fb1c
Success message updates
caitlinroach-nhs Jun 10, 2026
3737ce3
added ability to deactivate from all pharmacies at once
caitlinroach-nhs Jun 10, 2026
892e1c1
fix to h1 for adding brand new user to a pharmacy
caitlinroach-nhs Jun 10, 2026
4e79a93
permission expander
caitlinroach-nhs Jun 10, 2026
0023c1d
Updates to check pages
caitlinroach-nhs Jun 10, 2026
571c8cd
Update welcome email for user invited to use RAVS for a single pharmacy
Anna-Sutton Jun 11, 2026
bf83895
remove unneeded email tempalte
caitlinroach-nhs Jun 11, 2026
74d0891
Updated welcome email content for pharmacy company
Anna-Sutton Jun 11, 2026
3ff074d
pharmacy selection text update
caitlinroach-nhs Jun 11, 2026
c47b3b1
Merge branch 'cp-admin-expanded-scope' of https://github.com/NHSDigit…
caitlinroach-nhs Jun 11, 2026
b121c21
Minor tweak to H1
Anna-Sutton Jun 11, 2026
2865ed6
fix to capitalisation and to how we write vaccine co admins in appts
caitlinroach-nhs Jun 11, 2026
9235193
Merge branch 'cp-admin-expanded-scope' of https://github.com/NHSDigit…
caitlinroach-nhs Jun 11, 2026
be11125
Apply suggestion from @Anna-Sutton
Anna-Sutton Jun 12, 2026
9a10669
Updated default welcome email content
Anna-Sutton Jun 12, 2026
c59f5b9
Updated content of welcome email multiple pharmacies
Anna-Sutton Jun 12, 2026
eb99297
Update greeting in welcome email template
Anna-Sutton Jun 12, 2026
a7bb2ed
Change pharmacy list to a bullet list
Anna-Sutton Jun 12, 2026
55490ee
Update deactivate page messaging and button text
Anna-Sutton Jun 12, 2026
aa425d7
Added a new email template for the pharmacies section
Anna-Sutton Jun 12, 2026
d1199d8
Update name of this file
Anna-Sutton Jun 12, 2026
df2c7e5
Added link to email for lead admins
Anna-Sutton Jun 15, 2026
e4267e4
Renamed this file
Anna-Sutton Jun 15, 2026
13b9d21
Fixed extra box around deactivate pharma email
caitlinroach-nhs Jun 15, 2026
1b84868
Linked up group admin email
caitlinroach-nhs Jun 15, 2026
61b7e07
Fix permission level change link
caitlinroach-nhs Jun 15, 2026
15d8fad
added some deactivated users bydefault
caitlinroach-nhs Jun 15, 2026
4d79c24
Revert "added some deactivated users bydefault"
caitlinroach-nhs Jun 15, 2026
b1e6c2b
column header updates
caitlinroach-nhs Jun 15, 2026
dcad26d
Update deactivation message for group admins
Anna-Sutton Jun 15, 2026
b32c0ea
Changed 'Closed pharmacies' references to 'Pharmacies no longer using…
Anna-Sutton Jun 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/data/appointments.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ module.exports = [
}
},
vaccinations: [
"flu", "RSV"
"COVID-19", "RSV"
]
},
{
Expand Down
83 changes: 83 additions & 0 deletions app/data/organisations.js
Original file line number Diff line number Diff line change
Expand Up @@ -9157,5 +9157,88 @@ module.exports = [
type: 'Pharmacy HQ',
status: 'Active',
region: "Y56"
},
{
id: "FCX831",
name: "Riverside Community Pharmacy",
address: {
line1: "42 River Street",
town: "Bristol",
postcode: "BS2 8NT"
},
type: "Community Pharmacy",
status: "Closed",
region: "Y56",
companyId: "P0191N",
vaccines: [
{name: "COVID-19", status: "enabled"},
{name: "flu", status: "enabled"}
],
sites: [
{
id: "FCX831-01",
name: "Riverside Community Pharmacy",
address: {
line1: "42 River Street",
town: "Bristol",
postcode: "BS2 8NT"
}
}
]
},
{
id: "FDX942",
name: "Central Health Pharmacy",
address: {
line1: "78 Main Street",
town: "Oxford",
postcode: "OX1 3HR"
},
type: "Community Pharmacy",
status: "Closed",
region: "Y56",
companyId: "P0191N",
vaccines: [
{name: "COVID-19", status: "enabled"}
],
sites: [
{
id: "FDX942-01",
name: "Central Health Pharmacy",
address: {
line1: "78 Main Street",
town: "Oxford",
postcode: "OX1 3HR"
}
}
]
},
{
id: "FEY153",
name: "Wellcare Pharmacy",
address: {
line1: "156 High Street",
town: "Edinburgh",
postcode: "EH8 8DH"
},
type: "Community Pharmacy",
status: "Closed",
region: "Y56",
companyId: "P15951",
vaccines: [
{name: "COVID-19", status: "enabled"},
{name: "MMR", status: "enabled"}
],
sites: [
{
id: "FEY153-01",
name: "Wellcare Pharmacy",
address: {
line1: "156 High Street",
town: "Edinburgh",
postcode: "EH8 8DH"
}
}
]
}
]
82 changes: 82 additions & 0 deletions app/data/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,19 @@ module.exports = [
"firstName": "Paulina",
"lastName": "Sloan"
},
{
"id": "7301948572610",
"email": "michael.reid@nhs.net",
"organisations": [
{
"id": "P0191N",
"permissionLevel": "Group administrator",
"status": "Active"
}
],
"firstName": "Michael",
"lastName": "Reid"
},
// Each pharmacy in Paulina Sloan’s chain has its own vaccinator, some of whom are also admins
{
"id": "46436346",
Expand Down Expand Up @@ -155,6 +168,34 @@ module.exports = [
"firstName": "Samantha",
"lastName": "Black"
},
{
"id": "2195407736418",
"email": "nina.hunt@nhs.net",
"organisations": [
{
"id": "FA424",
"permissionLevel": "Administrator",
"status": "Active",
"vaccinator": true
}
],
"firstName": "Nina",
"lastName": "Hunt"
},
{
"id": "8701294465302",
"email": "liam.byrne@nhs.net",
"organisations": [
{
"id": "FA02S",
"permissionLevel": "Recorder",
"status": "Active",
"vaccinator": false
}
],
"firstName": "Liam",
"lastName": "Byrne"
},
// Amanda White is a group administrator for the
// MediCare Health Ltd chain of pharmacies
{
Expand All @@ -170,6 +211,47 @@ module.exports = [
}
]
},
{
"firstName": "Farah",
"lastName": "Iqbal",
"id": "6015872204914",
"email": "farah.iqbal@nhs.net",
"organisations": [
{
"id": "P15951",
"permissionLevel": "Group administrator",
"status": "Active"
}
]
},
{
"id": "3041597862150",
"email": "kyle.mason@nhs.net",
"organisations": [
{
"id": "FX9141",
"permissionLevel": "Administrator",
"status": "Active",
"vaccinator": true
}
],
"firstName": "Kyle",
"lastName": "Mason"
},
{
"id": "4586231970421",
"email": "elise.turner@nhs.net",
"organisations": [
{
"id": "FX4825",
"permissionLevel": "Recorder",
"status": "Active",
"vaccinator": true
}
],
"firstName": "Elise",
"lastName": "Turner"
},
{
"id": "34634617277",
"email": "peter.orange@nhs.net",
Expand Down
49 changes: 49 additions & 0 deletions app/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,25 @@ module.exports = function () {
}
}

filters.joinWithAnd = function(array) {
if (!Array.isArray(array) || array.length === 0) {
return ''
}

const items = array.map((item) => String(item))
items[0] = filters.capitaliseFirstLetter(items[0])

if (items.length === 1) {
return items[0]
}

if (items.length === 2) {
return `${items[0]} and ${items[1]}`
}

return `${items.slice(0, -1).join(', ')} and ${items[items.length - 1]}`
}

/**
* Returns the name of a month, eg 'November', when
* given the number of the month, eg 11.
Expand Down Expand Up @@ -68,6 +87,36 @@ module.exports = function () {
}
}

/**
* Calculate how long ago a date was
*
* @param {string|number|Date} date - Date to calculate from
* @returns {string} Time ago in readable format (e.g. "2 days ago")
*/
filters.timeAgo = function(date) {
if (!date) return '—'

const now = new Date()
const inputDate = new Date(date)
const diffInMs = now - inputDate
const diffInSeconds = Math.floor(diffInMs / 1000)
const diffInMinutes = Math.floor(diffInSeconds / 60)
const diffInHours = Math.floor(diffInMinutes / 60)
const diffInDays = Math.floor(diffInHours / 24)

if (diffInSeconds < 60) {
return 'just now'
} else if (diffInMinutes < 60) {
return `${diffInMinutes} minute${diffInMinutes === 1 ? '' : 's'} ago`
} else if (diffInHours < 24) {
return `${diffInHours} hour${diffInHours === 1 ? '' : 's'} ago`
} else if (diffInDays < 7) {
return `${diffInDays} day${diffInDays === 1 ? '' : 's'} ago`
} else {
return inputDate.toLocaleDateString('en-GB')
}
}

/* keep the following line to return your filters to the app */
return filters
}
Expand Down
Loading