feat: 補齊生產管理與進貨單權限、功能實作及 UI 優化
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
import { useState, useEffect } from "react";
|
||||
import { Plus, Factory, Search, RotateCcw, Eye, Pencil } from 'lucide-react';
|
||||
import { Plus, Factory, Search, RotateCcw, Eye, Pencil, Trash2 } from 'lucide-react';
|
||||
import { Button } from "@/Components/ui/button";
|
||||
import AuthenticatedLayout from "@/Layouts/AuthenticatedLayout";
|
||||
import { Head, router, Link } from "@inertiajs/react";
|
||||
@@ -266,6 +266,21 @@ export default function ProductionIndex({ productionOrders, filters }: Props) {
|
||||
</Button>
|
||||
</Link>
|
||||
</Can>
|
||||
<Can permission="production_orders.delete">
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="button-outlined-error"
|
||||
title="刪除"
|
||||
onClick={() => {
|
||||
if (confirm('確定要刪除此生產工單嗎?')) {
|
||||
router.delete(route('production-orders.destroy', order.id));
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Trash2 className="h-4 w-4" />
|
||||
</Button>
|
||||
</Can>
|
||||
</div>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
@@ -298,6 +313,6 @@ export default function ProductionIndex({ productionOrders, filters }: Props) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</AuthenticatedLayout>
|
||||
</AuthenticatedLayout >
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user