diff --git a/app/assets/stylesheets/vendor/nhsuk-frontend/overrides/_index.scss b/app/assets/stylesheets/vendor/nhsuk-frontend/overrides/_index.scss index e1d890e23..c658e465b 100644 --- a/app/assets/stylesheets/vendor/nhsuk-frontend/overrides/_index.scss +++ b/app/assets/stylesheets/vendor/nhsuk-frontend/overrides/_index.scss @@ -1,4 +1,3 @@ @forward "card"; @forward "details"; @forward "summary-list"; -@forward "tables"; diff --git a/app/assets/stylesheets/vendor/nhsuk-frontend/overrides/_tables.scss b/app/assets/stylesheets/vendor/nhsuk-frontend/overrides/_tables.scss deleted file mode 100644 index 823ca1f5b..000000000 --- a/app/assets/stylesheets/vendor/nhsuk-frontend/overrides/_tables.scss +++ /dev/null @@ -1,4 +0,0 @@ -// Don’t show a grey background when hovering over table rows -.nhsuk-table__row:hover { - background: none; -} diff --git a/app/controllers/school.js b/app/controllers/school.js index 8deeeb5d7..3e1e4b485 100644 --- a/app/controllers/school.js +++ b/app/controllers/school.js @@ -60,7 +60,7 @@ export const schoolController = { } // Filter by phase - if (phase) { + if (phase && phase !== 'none') { results = results.filter((school) => school.phase === phase) } diff --git a/app/controllers/session.js b/app/controllers/session.js index c5289cff0..47bf61e15 100644 --- a/app/controllers/session.js +++ b/app/controllers/session.js @@ -819,26 +819,30 @@ export const sessionController = { ) // Find patients to invite to clinic - const patientSessionsForClinic = session.patientSessionsForClinic.map( + const patientUuidsForClinic = session.patientSessionsForClinic.map( (patient) => patient.uuid ) - // Move patients to clinic if (clinic) { - for (const patientSession of patientSessionsForClinic) { - const patient = Patient.findOne(patientSession.patient_uuid, data) - patientSession.removeFromSession({ - createdBy_uid: account.uid - }) - patient.addToSession(patientSession.session) - Patient.update(patientSession.patient_uuid, {}, data) + // Move patients to clinic + for (const patientUuid of patientUuidsForClinic) { + const patientSession = PatientSession.findOne(patientUuid, data) + + if (patientSession) { + patientSession.removeFromSession({ + createdBy_uid: account.uid + }) + patientSession.patient.addToSession(patientSession.session) + + Patient.update(patientSession.patient_uuid, {}, data) + } } } request.flash( 'success', __mf(`session.inviteToClinic.success`, { - count: patientSessionsForClinic.length + count: patientUuidsForClinic.length }) ) diff --git a/app/views/school/list.njk b/app/views/school/list.njk index e6530fcf1..36df03841 100644 --- a/app/views/school/list.njk +++ b/app/views/school/list.njk @@ -36,7 +36,7 @@ } }, small: true, - items: enumItems(SchoolPhase), + items: radioFilterItems(SchoolPhase, data.phase), decorate: "phase" }) }}