feat: Rerouting a booking with corrected responses (#17074)

* POC working with no TS error

* cleanup

* Fix query booking

* Simplify things

* Support rerouting to different event

* self-review fixes

* Some improvements

* add more tests

* Remove members relation query

* Udits feedback

* Dont show CTAs when non-eventTypeRedirectUrl action route is chosen

---------

Co-authored-by: Udit Takkar <[email protected]>
This commit is contained in:
Hariom BalharaandUdit Takkar authored and GitHub committed 2024-10-18 17:11:50 -04:00
1 parent 4f14775a4d
commit b8d4fccbab
33 files changed
+1990 -98

No files matched your search

+10 -1
View File
@@ -90,12 +90,16 @@ type DialogContentProps = React.ComponentProps<(typeof DialogPrimitive)["Content
Icon?: IconName;
enableOverflow?: boolean;
forceOverlayWhenNoModal?: boolean;
/**
* Disables the ability to close the dialog by clicking outside of it. Could be useful when the dialog is doing something critical which might be in progress.
*/
preventCloseOnOutsideClick?: boolean;
};
// enableOverflow:- use this prop whenever content inside DialogContent could overflow and require scrollbar
export const DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps>(
(
{ children, title, Icon: icon, enableOverflow, forceOverlayWhenNoModal, type = "creation", ...props },
{ children, title, Icon: icon, enableOverflow, forceOverlayWhenNoModal, type = "creation", preventCloseOnOutsideClick, ...props },
forwardedRef
) => {
const isPlatform = useIsPlatform();
@@ -119,6 +123,11 @@ export const DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps
)}
<Content
{...props}
onPointerDownOutside={(e) => {
if (preventCloseOnOutsideClick) {
e.preventDefault();
}
}}
className={classNames(
"fadeIn bg-default scroll-bar fixed left-1/2 top-1/2 z-50 w-full max-w-[22rem] -translate-x-1/2 -translate-y-1/2 rounded-md text-left shadow-xl focus-visible:outline-none sm:align-middle",
props.size == "xl"
@@ -135,4 +135,5 @@ export const lucideIconList = new Set([
"webhook",
"x",
"zap",
"waypoints"
]);
@@ -132,6 +132,7 @@ export type IconName =
| "users"
| "venetian-mask"
| "video"
| "waypoints"
| "webhook"
| "x"
| "zap";