Skip to content

Commit

Permalink
fix: an attempted fix
Browse files Browse the repository at this point in the history
  • Loading branch information
meenahoda committed Oct 11, 2018
1 parent d7c2edc commit dcfa609
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit dcfa609

Please sign in to comment.