Skip to content

implement sophisticated bookings collision detection #25

@txwkx

Description

@txwkx

bookings collection consists of objects of type:

{
   roomId: ObjectId
   date: ISODate
   timeslots []: array of Strings
}

The startTime and endTime arrays are filtered versions of INTERVALS:

axios.get(`http://localhost:8008/api/bookings/${room}/${date}`)
        .then(res => {
          const bookings = res.data[0].timeslots;
          if(bookings) {
             INTERVALS = INTERVALS.filter(el => bookings.indexOf(el) < 0);
          }
        });
}

Issue:
Find a solution how to handle overlapping booking time slots.
Select a meeting from 8:30 to 11:00 while 9:00 - 10:30 is booked.

  • Update the timeslots array per day once a new meeting is created

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions