feat(product): 恢復並實作商品起停用狀態功能,包含表單開關與列表顯示
This commit is contained in:
@@ -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)}>
|
||||
|
||||
Reference in New Issue
Block a user