feat: skip confirm step in booker (#18773)

* feat: skip confirm step

* better naming

* disable on loading

* feat: added cloudflare turnstile captcha to booker

* Update Booker.tsx

* Update AvailableTimeSlots.tsx

* made optional to fix type errors

* Update Booker.tsx

* Update getBookingResponsesSchema.ts

* Update Booker.tsx

* fixed failing tests

* added tests

* fix: fixed failing embed tests
This commit is contained in:
Somay Chauhan authored and GitHub committed 2025-01-29 12:56:23 -03:00
1 parent ac8b4a2861
commit be1b9d1a79
10 files changed
+251 -114

No files matched your search

@@ -39,7 +39,7 @@ export const useHandleBookEvent = ({
routingFormSearchParams,
}: UseHandleBookingProps) => {
const setFormValues = useBookerStore((state) => state.setFormValues);
const timeslot = useBookerStore((state) => state.selectedTimeslot);
const storeTimeSlot = useBookerStore((state) => state.selectedTimeslot);
const duration = useBookerStore((state) => state.selectedDuration);
const { timezone } = useBookerTime();
const rescheduleUid = useBookerStore((state) => state.rescheduleUid);
@@ -55,8 +55,9 @@ export const useHandleBookEvent = ({
const crmOwnerRecordType = useBookerStore((state) => state.crmOwnerRecordType);
const crmAppSlug = useBookerStore((state) => state.crmAppSlug);
const handleBookEvent = () => {
const handleBookEvent = (inputTimeSlot?: string) => {
const values = bookingForm.getValues();
const timeslot = inputTimeSlot ?? storeTimeSlot;
if (timeslot) {
// Clears form values stored in store, so old values won't stick around.
setFormValues({});