feat: 統一全系統頁面標題樣式、優化側邊欄與實作角色成員查看功能

This commit is contained in:
2026-01-13 17:00:58 +08:00
parent 6600cde3bc
commit f18fb169f3
33 changed files with 938 additions and 472 deletions

View File

@@ -27,6 +27,7 @@ import { Badge } from "@/Components/ui/badge";
import { WarehouseInventory } from "@/types/warehouse";
import { getSafetyStockStatus } from "@/utils/inventory";
import { formatDate } from "@/utils/format";
import { Can } from "@/Components/Permission/Can";
interface InventoryTableProps {
inventories: WarehouseInventory[];
@@ -280,15 +281,17 @@ export default function InventoryTable({
>
<Eye className="h-4 w-4" />
</Button>
<Button
variant="outline"
size="sm"
onClick={() => onDelete(item.id)}
title="刪除"
className="button-outlined-error"
>
<Trash2 className="h-4 w-4" />
</Button>
<Can permission="inventory.delete">
<Button
variant="outline"
size="sm"
onClick={() => onDelete(item.id)}
title="刪除"
className="button-outlined-error"
>
<Trash2 className="h-4 w-4" />
</Button>
</Can>
</div>
</TableCell>
</TableRow>