I have a booking app where, when a customer clicks a day, they must choose a time slot (they can book as many slots as they like at once). Once one person books that time slot, I don’t want anyone else to be able to. Currently I have it setup so that, they click a date, a modal pops up with the available time slots (each slot shows conditionally based on if it’s true/false property for availability is set to true), when a customer clicks one, it turn the availability property false which then stops them or anyone else booking that slot.
The issue i’ve got is, this happens instantly when the slot is picked - if the customer didn’t finish the booking for whatever reason, that slot is still going to be false (unavailable) which wouldn’t actually be true because they didn’t finish the booking.
Does anyone have any advice?