chore: add handleCreateRecurringBooking prop to booker atom (#24786)

* chore: update Booker platform wrapper props

* fix: pass handle create recurring prop to useHandleBookEvent if prop present

* chore: add changesets
This commit is contained in:
Rajiv Sahal
2025-10-30 15:50:17 +00:00
committed by GitHub
parent 08c62b554e
commit e47ddf9835
3 changed files with 8 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@calcom/atoms": patch
---
This PR updates Booker atom to have a new prop called handleCreateRecurringBooking for handling recurring events.
@@ -1,6 +1,5 @@
/* eslint-disable react-hooks/exhaustive-deps */
import { useQueryClient } from "@tanstack/react-query";
import debounce from "lodash/debounce";
import { useMemo, useEffect, useCallback, useState, useRef, useContext } from "react";
import { shallow } from "zustand/shallow";
@@ -442,7 +441,7 @@ const BookerPlatformWrapperComponent = (
metadata: props.metadata ?? {},
handleBooking: props?.handleCreateBooking ?? createBooking,
handleInstantBooking: createInstantBooking,
handleRecBooking: createRecBooking,
handleRecBooking: props?.handleCreateRecurringBooking ?? createRecBooking,
locationUrl: props.locationUrl,
routingFormSearchParams,
isBookingDryRun: isBookingDryRun ?? routingParams?.isBookingDryRun,
+2
View File
@@ -3,6 +3,7 @@ import type React from "react";
import type { BookerProps } from "@calcom/features/bookings/Booker";
import type { BookerStore } from "@calcom/features/bookings/Booker/store";
import type { Timezone, VIEW_TYPE } from "@calcom/features/bookings/Booker/types";
import type { BookingCreateBody } from "@calcom/features/bookings/lib/bookingCreateBodySchema";
import type { BookingResponse } from "@calcom/platform-libraries";
import type {
ApiSuccessResponse,
@@ -57,6 +58,7 @@ export type BookerPlatformWrapperAtomProps = Omit<
rescheduleReason?: string;
} & Record<string, string | string[]>;
handleCreateBooking?: (input: UseCreateBookingInput) => void;
handleCreateRecurringBooking?: (input: BookingCreateBody[]) => void;
onCreateBookingSuccess?: (data: ApiSuccessResponse<BookingResponse>) => void;
onCreateBookingError?: (data: ApiErrorResponse | Error) => void;
onCreateRecurringBookingSuccess?: (data: ApiSuccessResponse<BookingResponse[]>) => void;