Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
88b3ab4
Emptying out and prepping the basic journey views
Demotive Sep 3, 2026
8893412
I can't remember what I did but it was useful
Demotive Sep 3, 2026
f74283f
Add dummy BSO name to all primary navs
Demotive Sep 7, 2026
e81af86
Add dummy BSO name to all primary navs
Demotive Sep 7, 2026
e708346
using dummy BSO for create clinic
Demotive Sep 7, 2026
843a2e5
STEP POINT: allow selection of templates (copilot assisted)
Demotive Sep 7, 2026
5c2d4b5
Ability to remove templates. Some content layout tweaks to table cells
Demotive Sep 7, 2026
9b7b1d1
Controversially removing schedule names from prototype
Demotive Sep 7, 2026
4a7ccbd
Fix progress bar gradient renders in -webkit- by separating the selec…
Demotive Sep 16, 2026
59c2218
Allow 2 digit year entry, prepending '20'
Demotive Sep 16, 2026
11a7936
Catch and play specific errors for impossible dates
Demotive Sep 16, 2026
e2965bf
Remove shift-select functionality from table cells. Let's test without.
Demotive Sep 16, 2026
b1866c9
Prevent schedules from overlapping
Demotive Sep 16, 2026
a121dab
Adding 1 word to the template preview modal content
Demotive Sep 16, 2026
c7294eb
Ready to test label, just for fun
Demotive Sep 16, 2026
c210dda
Sketching in a clinic level capacity summary
Demotive Sep 18, 2026
a18a3fc
Carry 'true' slot and held numbers through. Capacity summary updates …
Demotive Sep 18, 2026
09a70d0
Building out the dummy in-progress clinic view
Demotive Sep 18, 2026
986c470
A cheeky global nav testout
Demotive Sep 21, 2026
ba774a5
Change totalAppointmentsBooked to totalSlotsBooked
Demotive Sep 25, 2026
1b4adae
Side quest into combo tags
Demotive Sep 25, 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);
}
}
22 changes: 22 additions & 0 deletions app/assets/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,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 @@ -106,6 +107,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 Expand Up @@ -178,3 +197,6 @@ a {
.nhsuk-grid-column-one-fifth {
@include nhsuk-grid-column(one-fifth);
}
.app-tag--attached {
margin-right: -1px;
}
1 change: 0 additions & 1 deletion app/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
module.exports = {
// Service name
serviceName: 'Run breast screening in England',

// 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