Files
star-erp/resources/js/Components/Vendor/VendorDeleteDialog.tsx
2025-12-30 15:03:19 +08:00

56 lines
1.6 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 廠商刪除確認對話框
*/
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from "@/Components/ui/alert-dialog";
import type { Supplier } from "@/types/vendor";
interface VendorDeleteDialogProps {
open: boolean;
supplier: Supplier | null;
onConfirm: () => void;
onCancel: () => void;
}
export default function VendorDeleteDialog({
open,
supplier,
onConfirm,
onCancel,
}: VendorDeleteDialogProps) {
return (
<AlertDialog open={open} onOpenChange={onCancel}>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle></AlertDialogTitle>
<AlertDialogDescription>
{supplier?.name}
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel
className="gap-2 button-outlined-primary"
>
</AlertDialogCancel>
<AlertDialogAction
className="gap-2 button-filled-error"
onClick={onConfirm}
>
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
);
}