To support recurrences and easily resolve conflicting events, we need to support storing multiple events at the same time in the same room. The first event scheduled will be booked as normal. However each subsequent event overlapping that first event will be flagged as conflicting. This will give the user a chance to see the context of their conflicting event and resolve it directly from the normal event view without having to worry about losing their work at any point in the process.
POST /events/:event_id/bookings
This route will no longer fail if the booking you are creating overlaps with another already scheduled. The booking will be serialized with a conflict
attribute that is computed when the request is made, showing which events are confirmed and which are in conflict.
POST /bookings/search
Bookings will be returned with conflict
attributes for you to display.
GET /conflicting_bookings/:booking_id
Use this route to retrieve a list of bookings that are scheduled at the same time in the same room. Each booking will be shown just as they are in the POST /bookings/search
route, including the conflict
attribute.
POST /bookings/:booking_id/reschedule
When changing the start
, end
, or room-id
of a booking, the conflict
attribute may change allowing a now previously scheduled event to take the old spot as the new valid booking.