first commit
This commit is contained in:
30
resources/js/Components/Inventory/InventoryStats.tsx
Normal file
30
resources/js/Components/Inventory/InventoryStats.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* 庫存統計元件
|
||||
* 顯示庫存總覽統計資訊
|
||||
*/
|
||||
|
||||
import { AlertTriangle } from "lucide-react";
|
||||
import StatsCard from "@/Components/shared/StatsCard";
|
||||
|
||||
interface InventoryStatsProps {
|
||||
totalItems: number;
|
||||
totalQuantity: number;
|
||||
lowStockItems: number;
|
||||
}
|
||||
|
||||
export default function InventoryStats({
|
||||
totalItems,
|
||||
totalQuantity,
|
||||
lowStockItems,
|
||||
}: InventoryStatsProps) {
|
||||
return (
|
||||
<div className="max-w-sm">
|
||||
<StatsCard
|
||||
label="庫存警告"
|
||||
value={`${lowStockItems} 項`}
|
||||
icon={AlertTriangle}
|
||||
valueClassName={lowStockItems > 0 ? "text-red-600" : "text-green-600"}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user