diff --git a/lib/components/state-resources/get-available-diary-slots/index.js b/lib/components/state-resources/get-available-diary-slots/index.js index ba7d190..f478744 100644 --- a/lib/components/state-resources/get-available-diary-slots/index.js +++ b/lib/components/state-resources/get-available-diary-slots/index.js @@ -28,7 +28,8 @@ module.exports = class GetAvailableDiarySlots { Object.values(availableTimes).forEach((timeSlot, index) => { Object.values(entries).forEach(booking => { - if (timeSlot[0] === moment(booking.startDateTime).format('HH:mm:ss')) { + const d = event.date.split('T')[0] + 'T' + timeSlot[0] + if (moment(d).isSame(moment(booking.startDateTime))) { timeSlot[1]++ if (timeSlot[1] >= diary.slots.maxConcurrency) remove.push(index) }