Add cancelled field to event slots

Make it possible to represent one slot out of a multi-slot event being
cancelled by adding a field for it in the slot, in addition to the
existing field on the event itself.
This commit is contained in:
Hornwitser 2025-09-06 15:54:58 +02:00
parent d006be251c
commit 9a46ea5af0
4 changed files with 15 additions and 2 deletions

View file

@ -28,8 +28,8 @@ function fixtureClientSchedule(multiSlot = false) {
),
];
const eventSlots = idMap([
new ClientScheduleEventSlot(1, false, false, 1, now, now.plus({ hours: 1 }), new Set([left.id]), new Set(), 0),
new ClientScheduleEventSlot(2, false, false, multiSlot ? 1 : 2, now, now.plus({ hours: 2 }), new Set([right.id]), new Set(), 0),
new ClientScheduleEventSlot(1, false, false, 1, now, now.plus({ hours: 1 }), new Set([left.id]), false, new Set(), 0),
new ClientScheduleEventSlot(2, false, false, multiSlot ? 1 : 2, now, now.plus({ hours: 2 }), new Set([right.id]), false, new Set(), 0),
]);
const red = new ClientScheduleRole(1, now, false, "Red", "Is a color.");
@ -277,6 +277,7 @@ describe("class ClientSchedule", () => {
now,
now.plus({ hours: 3 }),
new Set(),
false,
new Set(),
0,
);