diff --git a/app/components/booking/generate-booking-pdf.tsx b/app/components/booking/generate-booking-pdf.tsx index c468b681c..f75adf48f 100644 --- a/app/components/booking/generate-booking-pdf.tsx +++ b/app/components/booking/generate-booking-pdf.tsx @@ -1,17 +1,8 @@ import { useRef, useState } from "react"; import type { Asset, Booking } from "@prisma/client"; import { Button } from "~/components/shared/button"; -import { - AlertDialog, - AlertDialogCancel, - AlertDialogContent, - AlertDialogDescription, - AlertDialogFooter, - AlertDialogHeader, - AlertDialogTitle, - AlertDialogTrigger, -} from "~/components/shared/modal"; import { tw } from "~/utils/tw"; +import { Dialog, DialogPortal } from "../layout/dialog"; import { Spinner } from "../shared/spinner"; export const GenerateBookingPdf = ({ @@ -60,69 +51,83 @@ export const GenerateBookingPdf = ({ } }; + const [isDialogOpen, setIsDialogOpen] = useState(false); + + const handleOpenDialog = () => { + setIsDialogOpen(true); + }; + + const handleCloseDialog = () => { + setIsDialogOpen(false); + }; + return ( <> - - - - - - - - Generate booking checklist for "{booking?.name}" - - - You can either preview or download the PDF. - - -
- {/** Show spinner if no iframe */} - {!iframeLoaded && ( -
- -

Generating PDF...

-
- )} - {totalAssets && ( -
-