Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 30 additions & 0 deletions app/assets/sass/_overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,33 @@
display: none;
}
}

.app-custom-config-progress-card__details {
.nhsuk-details {
margin-bottom: 0;
}

.nhsuk-details__summary {
@include nhsuk-font(16);
padding-left: 1rem;
}

.nhsuk-details__summary::before {
border-width: .3rem 0 .3rem .52rem;
}

.nhsuk-details[open] > .nhsuk-details__summary::before {
border-width: .52rem .3rem 0 .3rem;
}

.nhsuk-details__summary-text {
font-weight: 400;
}

.nhsuk-details__text {
@include nhsuk-font(16);
margin-top: nhsuk-spacing(1);
padding-top: nhsuk-spacing(2);
padding-left: 1rem;
}
}
27 changes: 27 additions & 0 deletions app/data/organisations.js
Original file line number Diff line number Diff line change
Expand Up @@ -9036,6 +9036,33 @@ module.exports = [
}
]
},
{
id: "FS2847",
name: "Seaside Drive Pharmacy",
address: {
line1: "42 Seaside Drive",
town: "Torquay",
postcode: "TQ1 2BH"
},
type: "Community Pharmacy",
status: "Active",
region: "Y50",
vaccines: [
{name: "COVID-19", status: "enabled"},
{name: "flu", status: "enabled"}
],
sites: [
{
id: "FS2847-01",
name: "Seaside Drive Pharmacy",
address: {
line1: "42 Seaside Drive",
town: "Torquay",
postcode: "TQ1 2BH"
}
}
]
},
{
id: "FS5W89",
name: "MediCare Pharmacy",
Expand Down
2 changes: 1 addition & 1 deletion app/data/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ module.exports = [
"email": "ocean.merritt@nhs.net",
"organisations": [
{
"id": "FR4V56",
"id": "FS2847",
"permissionLevel": "Recorder",
"status": "Active",
"vaccinator": true
Expand Down
1 change: 1 addition & 0 deletions app/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ require('./routes/support')(router)
require('./routes/auth')(router)
require('./routes/home')(router)
require('./routes/helpers')(router)
require('./routes/explorations')(router)

router.get('/product-page', (req, res) => {
// Sign out the user - this is just to make it easier
Expand Down
4 changes: 4 additions & 0 deletions app/routes/appointments.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
module.exports = (router) => {

router.get('/appointments', (req, res) => {
if (res.locals.currentOrganisation && res.locals.currentOrganisation.appointmentsInterfaceEnabled === false) {
return res.redirect('/home')
}

const data = req.session.data

const day = 86400000 // number of milliseconds in a day
Expand Down
10 changes: 10 additions & 0 deletions app/routes/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ module.exports = router => {
const user = data.users.find((user) => user.email === email)
const from = req.query.from

if (!user) {
res.redirect('/auth/okta-sign-in')
return
}

const userOrganisationIds = user.organisations.map((organisation) => organisation.id)
const organisations = data.organisations.filter((organisation) => userOrganisationIds.includes(organisation.id) )

Expand All @@ -76,6 +81,11 @@ module.exports = router => {
const email = data.email
const user = data.users.find((user) => user.email === email)

if (!user) {
res.redirect('/auth/okta-sign-in')
return
}

if (selectedOrganisationId) {
req.session.data.currentUserId = user.id
req.session.data.currentOrganisationId = selectedOrganisationId;
Expand Down
17 changes: 17 additions & 0 deletions app/routes/explorations.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = (router) => {
router.get('/explorations', (req, res) => {
const explorationLinks = [
{
href: '/explorations/record-vaccinations-v2',
title: 'Record vaccinations v2',
description: 'Pilot area for trying alternative record vaccination journey ideas without affecting the current flow.'
}
]

res.render('explorations/index', { explorationLinks })
})

router.get('/explorations/record-vaccinations-v2', (req, res) => {
res.render('explorations/record-vaccinations-v2')
})
}
Loading