diff --git a/resources/js/Pages/Production/Recipe/Index.tsx b/resources/js/Pages/Production/Recipe/Index.tsx index db0a79f..e5c27dd 100644 --- a/resources/js/Pages/Production/Recipe/Index.tsx +++ b/resources/js/Pages/Production/Recipe/Index.tsx @@ -14,6 +14,18 @@ import { Input } from "@/Components/ui/input"; import { Label } from "@/Components/ui/label"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/Components/ui/table"; import { Badge } from "@/Components/ui/badge"; +import { Can } from "@/Components/Permission/Can"; +import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, + AlertDialogTrigger, +} from "@/Components/ui/alert-dialog"; interface Recipe { id: number; @@ -207,25 +219,50 @@ export default function RecipeIndex({ recipes, filters }: Props) {
- - - - + + + + + + + + + + + + + + 確認刪除 + + 確定要刪除配方「{recipe.name}」嗎?此操作無法復原。 + + + + 取消 + handleDelete(recipe.id)} + className="bg-red-600 hover:bg-red-700" + > + 刪除 + + + + +