I would like to be able to have multiple bookings in the same time slot. For example, a massage place may book 2 customers in the same time slot because they might have 2 masseuses or more available at that time. How will I create this availability function on Bubble?
Hi there, @poopdeckapp… one way you could go is when a booking is made, only allow the booking if the count of a search for bookings in the same slot is less than 2. Without knowing anything else about your app, it’s hard to get more specific than that, so if you want to provide more details and some screenshots, maybe someone will have a better suggestion for you.
Hope this helps.
Best…
Mike
@poopdeckapp Hi there, may I ask if you came up with a solution for this? If so, how did you approach this?
Hey Mark,
Yes, I was able to find a solution for this. Let’s use my massage place example above.
- The massage place will have its own Business Hours data type availability
- The two masseuse will have their own User Hours data type
- You can create a Blocked Days/Range data type as well for users or the business itself
From here, I can count the number of User Hours that intersect with a given timeslot in a repeating group and subtract the number of intersecting Blocked Days/Range if any — create an RG that will search User Hours that intersect with the given cell inside the cell.
Hope that helps