From 36676cbc6d164cefaf91223a558ce04f4d313611 Mon Sep 17 00:00:00 2001 From: Donkoko Date: Tue, 4 Jun 2024 14:59:31 +0300 Subject: [PATCH] fixed merge conflicts --- .../booking/generate-booking-pdf.tsx | 145 +++++++++--------- app/components/layout/dialog.tsx | 4 + app/modules/booking/pdf-helpers.ts | 6 +- ...bookingId.generate-pdf.$fileName[.pdf].tsx | 14 +- 4 files changed, 85 insertions(+), 84 deletions(-) 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 && ( -
-