diff --git a/modules/customer-invoices/src/web/proformas/ui/blocks/proforma-delete-dialog.tsx b/modules/customer-invoices/src/web/proformas/ui/blocks/proforma-delete-dialog.tsx deleted file mode 100644 index 0f0a2bd7..00000000 --- a/modules/customer-invoices/src/web/proformas/ui/blocks/proforma-delete-dialog.tsx +++ /dev/null @@ -1,85 +0,0 @@ -import { - AlertDialog, - AlertDialogAction, - AlertDialogCancel, - AlertDialogContent, - AlertDialogDescription, - AlertDialogFooter, - AlertDialogHeader, - AlertDialogTitle, - Spinner, -} from "@repo/shadcn-ui/components"; -import { useState } from "react"; - -interface IssueInvoiceDialogProps { - open: boolean; - onOpenChange: (open: boolean) => void; - proformaId: number; - proformaReference: string; -} - -export function ProformaDeleteDialog({ - open, - onOpenChange, - proformaId, - proformaReference, -}: IssueInvoiceDialogProps) { - const [isSubmitting, setIsSubmitting] = useState(false); - - const handleDelete = async () => { - setIsSubmitting(true); - - /*try { - const result = await issueInvoiceFromProforma(proformaId); - - if (result.success) { - toast({ - title: "Factura emitida", - description: `Se ha emitido la factura #${result.invoiceId} desde la proforma.`, - }); - onOpenChange(false); - } else { - throw new Error(result.error); - } - } catch (error) { - toast({ - title: "Error", - description: error instanceof Error ? error.message : "Error al emitir la factura", - variant: "destructive", - }); - } finally { - setIsSubmitting(false); - }*/ - }; - - return ( - - - - ¿Eliminar proforma? - - Esta acción no se puede deshacer. La proforma será eliminada permanentemente. - - - - Cancelar - proformaId && handleDelete()} - > - {isSubmitting ? ( - <> - - Eliminando... - - ) : ( - "Eliminar proforma" - )} - Eliminar - - - - - ); -}