feat: booker atom prevent event type success redirect (#19573)
This commit is contained in:
@@ -25,6 +25,7 @@ export const BookerEmbed = (
|
||||
hostsLimit?: BookerPlatformWrapperAtomPropsForTeam["hostsLimit"];
|
||||
metadata?: BookerPlatformWrapperAtomPropsForTeam["metadata"];
|
||||
handleCreateBooking?: BookerPlatformWrapperAtomPropsForTeam["handleCreateBooking"];
|
||||
preventEventTypeRedirect?: BookerPlatformWrapperAtomPropsForTeam["preventEventTypeRedirect"];
|
||||
}
|
||||
| (BookerPlatformWrapperAtomPropsForIndividual & {
|
||||
organizationId?: undefined;
|
||||
|
||||
@@ -82,6 +82,7 @@ export type BookerPlatformWrapperAtomProps = Omit<
|
||||
bannerUrl?: string;
|
||||
onDryRunSuccess?: () => void;
|
||||
hostsLimit?: number;
|
||||
preventEventTypeRedirect?: boolean;
|
||||
};
|
||||
|
||||
type VIEW_TYPE = keyof typeof BookerLayouts;
|
||||
@@ -109,6 +110,7 @@ export const BookerPlatformWrapper = (
|
||||
teamMemberEmail,
|
||||
crmAppSlug,
|
||||
crmOwnerRecordType,
|
||||
preventEventTypeRedirect,
|
||||
} = props;
|
||||
const layout = BookerLayouts[view];
|
||||
|
||||
@@ -357,7 +359,7 @@ export const BookerPlatformWrapper = (
|
||||
schedule.refetch();
|
||||
props.onCreateBookingSuccess?.(data);
|
||||
|
||||
if (!!event.data?.successRedirectUrl) {
|
||||
if (!preventEventTypeRedirect && !!event.data?.successRedirectUrl) {
|
||||
window.location.href = event.data.successRedirectUrl;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -57,6 +57,7 @@ export const Router = React.memo(
|
||||
| "hostsLimit"
|
||||
| "metadata"
|
||||
| "handleCreateBooking"
|
||||
| "preventEventTypeRedirect"
|
||||
>;
|
||||
renderLoader?: (isLoading?: boolean) => ReactElement | ReactElement[];
|
||||
}) => {
|
||||
|
||||
Reference in New Issue
Block a user