fix: Slot reservation in new booker#9769
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Thank you for following the naming conventions! 🙏 |
| useEffect(() => { | ||
| reserveSlot(); | ||
| const interval = setInterval(reserveSlot, parseInt(MINUTES_TO_BOOK) * 60 * 1000 - 2000); | ||
| return () => { | ||
| if (eventType) { | ||
| releaseSlotMutation.mutate(); | ||
| clearInterval(interval); | ||
| } | ||
| }; | ||
| // eslint-disable-next-line react-hooks/exhaustive-deps | ||
| }, [eventType]); |
There was a problem hiding this comment.
reserve the slot on the booking form mount, and release on unmount the component
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
joeauyeung
left a comment
There was a problem hiding this comment.
@roae reserving slots should be disabled for seated events except for the last seat. Here's a link to what I've done. Could you address this in your PR?
https://github.com/calcom/cal.com/pull/9778/files#r1240959003
Hey @joeauyeung I believe this is how it works, when select an available slot in an seated event the number of available seats should decrease |
We found that the reserve system was creating bugs with seats when multiple people tried signing up. For example, a customer sent an email blast about an event. This caused a big spike in people trying to sign up for the booking, but the reserve system was blocking multiple people trying to book the event at the same time even though there were seats available. I think if there are multiple seats available we don't need to reserve that slot. |
Ok!, I get it |
|
@roae @joeauyeung I'm seeing a different text from what the screenshot in the description has. Could you please confirm which one is correct? |
Hey @ericrommel both are correct, My screenshot show text in spanish |
@roae, I'm talking about the numbers there. Your screenshot shows "2 seats available" and my one shows "2 / 3 seats available". |
yes there are differences in the translation. |
ericrommel
left a comment
There was a problem hiding this comment.
Everything looks great from my tests.
## What does this PR do? Bring back the slot reservation sistem to the new booker ## Type of change <!-- Please delete bullets that are not relevant. --> - Bug fix (non-breaking change which fixes an issue) ## How should this be tested? <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> ### Seated event - [x] Open the new booker in an event with seats - [x] Select an available slot - [x] Open the same event and date in other browser, the seat should be already reserved. - [x] In the first browser come back to the slots views or close the booking form - [x] In the second browser reload the booking page, the reserved slot should be realeased. ### No seated event - [x] Open the new booker - [x] Select an available slot - [x] Open the same event and date in other browser, the seat should be disabled ## Mandatory Tasks - [x] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.





What does this PR do?
Bring back the slot reservation sistem to the new booker
Type of change
How should this be tested?
Seated event
No seated event
Mandatory Tasks