Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9e0f6b1
Emptying out and prepping the basic journey views
Demotive Sep 3, 2026
2a42a97
I can't remember what I did but it was useful
Demotive Sep 3, 2026
384e03e
Add dummy BSO name to all primary navs
Demotive Sep 7, 2026
88932af
Add dummy BSO name to all primary navs
Demotive Sep 7, 2026
179adc1
using dummy BSO for create clinic
Demotive Sep 7, 2026
c904f5c
STEP POINT: allow selection of templates (copilot assisted)
Demotive Sep 7, 2026
bb9c7d0
Ability to remove templates. Some content layout tweaks to table cells
Demotive Sep 7, 2026
dde54ea
Controversially removing schedule names from prototype
Demotive Sep 7, 2026
6f1b227
Fix progress bar gradient renders in -webkit- by separating the selec…
Demotive Sep 16, 2026
ffb6a2e
Allow 2 digit year entry, prepending '20'
Demotive Sep 16, 2026
51bc319
Catch and play specific errors for impossible dates
Demotive Sep 16, 2026
be63c13
Remove shift-select functionality from table cells. Let's test without.
Demotive Sep 16, 2026
94b03d1
Prevent schedules from overlapping
Demotive Sep 16, 2026
019a70d
Adding 1 word to the template preview modal content
Demotive Sep 16, 2026
1f0ef77
Ready to test label, just for fun
Demotive Sep 16, 2026
dfcd930
Sketching in a clinic level capacity summary
Demotive Sep 18, 2026
4de4dd9
Carry 'true' slot and held numbers through. Capacity summary updates …
Demotive Sep 18, 2026
1062fd1
Building out the dummy in-progress clinic view
Demotive Sep 18, 2026
fef0bff
A cheeky global nav testout
Demotive Sep 21, 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
40 changes: 19 additions & 21 deletions app/assets/javascript/calendar-table-actions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
var lastSelectedCell = null;
var selectableCells = Array.from(document.querySelectorAll('.calendar-table td:not(.calendar-table-no-data)'));

function clearSelectedDays() {
document.querySelectorAll('.calendar-table td.--date-selected').forEach(function (cell) {
cell.classList.remove('--date-selected');
Expand Down Expand Up @@ -59,7 +56,6 @@
clickedScheduleName.textContent = isAlreadySelected ? 'Select schedule' : 'Deselect schedule';
}

lastSelectedCell = clickedStartCell;
return;
}

Expand All @@ -71,25 +67,27 @@
return;
}

if (event.shiftKey && lastSelectedCell) {
var startIndex = selectableCells.indexOf(lastSelectedCell);
var endIndex = selectableCells.indexOf(cell);

if (startIndex !== -1 && endIndex !== -1) {
var rangeStart = Math.min(startIndex, endIndex);
var rangeEnd = Math.max(startIndex, endIndex);

for (var index = rangeStart; index <= rangeEnd; index++) {
selectableCells[index].classList.add('--date-selected');
}
}
} else {
cell.classList.toggle('--date-selected');
}

lastSelectedCell = cell;
cell.classList.toggle('--date-selected');
});

table.classList.add('--js-enabled');
});

var selectDaysForm = document.getElementById('select-days-form');

if (selectDaysForm) {
selectDaysForm.addEventListener('submit', function () {
selectDaysForm.querySelectorAll('input[name="selectedDays"]').forEach(function (input) {
input.remove();
});

document.querySelectorAll('.calendar-table td.--date-selected[data-date]').forEach(function (cell) {
var input = document.createElement('input');
input.type = 'hidden';
input.name = 'selectedDays';
input.value = cell.getAttribute('data-date');
selectDaysForm.appendChild(input);
});
});
}

7 changes: 7 additions & 0 deletions app/assets/sass/components/_calendar-table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
text-wrap: nowrap;
}
}

.--schedule-end {
position: relative;
border-right-color: nhsuk-colour("grey-2");
Expand Down Expand Up @@ -109,6 +110,12 @@
margin-bottom: nhsuk-spacing(2);
}

.--template-name {
display: block;
padding: nhsuk-spacing(1);
margin-top: nhsuk-spacing(2);
}

///
///
///
Expand Down
18 changes: 18 additions & 0 deletions app/assets/sass/components/_clinic-capacity-summary.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@use "nhsuk-frontend/dist/nhsuk/core" as *;

.app-clinic-capacity-summary {
@include nhsuk-responsive-margin(4, "bottom");

.nhsuk-table__body {
display: flex;
}
.nhsuk-table__header:not(:last-child) {
@include nhsuk-responsive-padding(1, "right");
border: 0;
}
.nhsuk-table__cell {
@include nhsuk-responsive-padding(5, "right");
border: 0;
}

}
24 changes: 17 additions & 7 deletions app/assets/sass/components/_progress-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,34 +55,44 @@
min-width: 0;
}
}
.app-progress-bar::-webkit-progress-bar {
::-webkit-progress-bar {
background: #fff;
}
.app-progress-bar::-moz-progress-bar {
background: #fff;
}

.app-progress-bar.--generic::-webkit-progress-value,
.app-progress-bar.--generic::-webkit-progress-value {
background: var(--generic-chart-hatch);
}
.app-progress-bar.--generic::-moz-progress-bar {
background: var(--generic-chart-hatch);
}

.app-progress-bar.--standard::-webkit-progress-value,
.app-progress-bar.--standard::-webkit-progress-value {
background: var(--standard-chart-hatch);
}
.app-progress-bar.--standard::-moz-progress-bar {
background: var(--standard-chart-hatch);
}

.app-progress-bar.--special::-webkit-progress-value,
.app-progress-bar.--special::-webkit-progress-value {
background: var(--special-chart-hatch);
}
.app-progress-bar.--special::-moz-progress-bar {
background: var(--special-chart-hatch);
}

.app-progress-bar.--ceased::-webkit-progress-value,
.app-progress-bar.--ceased::-webkit-progress-value {
background: var(--ceased-chart-hatch);
}
.app-progress-bar.--ceased::-moz-progress-bar {
background: var(--ceased-chart-hatch);
}

.app-progress-bar.--vhr::-webkit-progress-value,
.app-progress-bar.--vhr::-webkit-progress-value {
background: var(--vhr-chart-hatch);
}
.app-progress-bar.--vhr::-moz-progress-bar {
background: var(--vhr-chart-hatch);
}
}
19 changes: 19 additions & 0 deletions app/assets/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
// https://github.com/NHSDigital/manage-breast-screening-prototype

@forward "components/calendar-table";
@forward "components/clinic-capacity-summary";
@forward "components/clinic-level-breadcrumbs";
@forward "components/grid-extensions";
@forward "components/inline-detailed-search";
Expand All @@ -42,6 +43,24 @@ a {
@extend .nhsuk-link--no-visited-state;
}

// Makes a <button> look and behave like the .panel-item links it sits alongside
.app-link-button {
display: block;
width: 100%;
padding: 0;
border: 0;
background: none;
text-align: left;
font: inherit;
color: $nhsuk-link-colour;
cursor: pointer;

&:hover {
color: nhsuk-shade($nhsuk-link-colour, 20%);
text-decoration: underline;
}
}

.app-card-editable {
display: flex;
justify-content: space-between;
Expand Down
3 changes: 1 addition & 2 deletions app/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

module.exports = {
// Service name
serviceName: 'Cohort to clinic prototype',

serviceName: "Cohort to clinic prototype",
// Port to run the prototype on locally
port: 3000
}
8 changes: 6 additions & 2 deletions app/data/session-data-defaults.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const participants = require('./participants')

// currently just for the September Test "clickthru"
module.exports = {
participants,
stagedCount: 0,
Expand All @@ -14,5 +13,10 @@ module.exports = {
clinicLength: "1 day",
clinicCapacityPercentBooked: "0",
clinicCapacityAvailable: "10",
clinicCapacityTotal: "10"
clinicCapacityTotal: "10",
createCapacityFromZero: {
schedules: [],
selectedDays: [],
dayTemplates: {}
}
}
33 changes: 33 additions & 0 deletions app/locals.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,39 @@ module.exports = function(req, res, next) {
//
// req.locals.organisationName = 'NHS'

res.locals.bsoName = "Mereford and Wensley Breast Screening Service"
res.locals.bsoCode = "MW01"
res.locals.staticBaseUnit = "Mereford and Wensley Screening Centre"
res.locals.staticLocationShort = "Mereford and Wensley District Hospital"
res.locals.mobileUnits = [
"Davison",
"Drummond",
"Dunlop",
"Garrud",
"Howey",
"Kenney",
"Lenton",
"Pankhurst"
]
res.locals.locationsShort = [
"Brookfield Sports Pavilion",
"East Mereford Community Hub",
"Kingsmead Swimming Centre",
"Mereford Central",
"Mereford Civic Centre",
"Mereford Library",
"Mereford Showground",
"Northgate Food Hall",
"Riverside Sports Centre",
"South Mereford",
"Wensley Community Hospital",
"Wensley Cross",
"Wensley Leisure Centre",
"Wensley Park",
"Wensley Town Hall",
"West Wensley Foodstore"
]

next()
}

Loading
Loading