feat(product): 恢復並實作商品起停用狀態功能,包含表單開關與列表顯示

This commit is contained in:
2026-02-05 16:15:06 +08:00
parent 196fec3120
commit 24aed44cd3
5 changed files with 35 additions and 4 deletions

View File

@@ -98,6 +98,7 @@ export default function ProductTable({
<TableHead></TableHead>
<TableHead className="w-[200px]"></TableHead>
<TableHead></TableHead>
<TableHead className="text-center"></TableHead>
<TableHead className="text-center"></TableHead>
</TableRow>
</TableHeader>
@@ -160,6 +161,13 @@ export default function ProductTable({
<TableCell>
<span className="text-sm text-gray-600">{product.location || '-'}</span>
</TableCell>
<TableCell className="text-center">
{product.is_active ? (
<Badge className="bg-green-100 text-green-700 hover:bg-green-100 border-none"></Badge>
) : (
<Badge variant="secondary" className="bg-gray-100 text-gray-500 hover:bg-gray-100 border-none"></Badge>
)}
</TableCell>
<TableCell className="text-center">
<div className="flex justify-center gap-2">
<Link href={route("products.show", product.id)}>