fix: double-booking on reserved slots#23947
fix: double-booking on reserved slots#23947saurabhraghuvanshii wants to merge 5 commits intocalcom:mainfrom
Conversation
|
@saurabhraghuvanshii is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
|
This PR is being marked as stale due to inactivity. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis change threads a reserved slot identifier through the booking flow and enforces reservation checks. The Booker store adds slotReservationId with a setter. Hooks (useSlots, useHandleBookEvent) read from this store and pass the value as reservedSlotUid in booking inputs. The booking input schema and the booking-to-mutation mapper now include reservedSlotUid. handleNewBooking reads reservedSlotUid, performs pre-booking checks against reserved slots (ownership or availability) when not a dry run, and deletes the reserved slot after successful booking. useSlots/useHandleBookEvent variants under platform/features are aligned to source the ID from the Booker store. Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This PR is being marked as stale due to inactivity. |
|
Thank you for the contribution! I will be closing this PR though because it has been stale and another PR #24670 will adress this issue 🙏 |
What does this PR do?
Added reservedSlotUid parameter to booking flow to validate slot ownership
Enhanced handleNewBooking to check for reserved slots before creating bookings
Integrated slot reservation ID management into Booker store for consistent state
Added automatic cleanup of reserved slots after successful booking creation
Fixes [Bug] Booking flow allows double-booking reserved slots #23938
Fixes CAL-6430
Visual Demo (For contributors especially)
A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).
Video Demo (if applicable):
Image Demo (if applicable):
Mandatory Tasks (DO NOT REMOVE)