import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout'; import { Link, Head } from '@inertiajs/react'; import { cn } from "@/lib/utils"; import { Package, Users, ShoppingCart, Warehouse as WarehouseIcon, AlertTriangle, Clock, TrendingUp, ChevronRight } from 'lucide-react'; interface Stats { productsCount: number; vendorsCount: number; purchaseOrdersCount: number; warehousesCount: number; totalInventoryValue: number; pendingOrdersCount: number; lowStockCount: number; } interface Props { stats: Stats; } export default function Dashboard({ stats }: Props) { const cardData = [ { label: '商品總數', value: stats.productsCount, icon: , description: '目前系統中的商品種類', color: 'bg-[#01ab83]/10', }, { label: '合作廠商', value: stats.vendorsCount, icon: , description: '已建立資料的供應商', color: 'bg-blue-50', }, { label: '採購單據', value: stats.purchaseOrdersCount, icon: , description: '歷年累計採購單數量', color: 'bg-purple-50', }, { label: '倉庫站點', value: stats.warehousesCount, icon: , description: '目前營運中的倉庫環境', color: 'bg-orange-50', }, ]; const alertData = [ { label: '待處理採購單', value: stats.pendingOrdersCount, icon: , status: stats.pendingOrdersCount > 0 ? 'warning' : 'normal', }, { label: '低庫存警示', value: stats.lowStockCount, icon: , status: stats.lowStockCount > 0 ? 'error' : 'normal', }, ]; return (

系統總覽

歡迎回來,這是您的甜點店 ERP 營運數據概況。

{/* 主要數據卡片 */}
{cardData.map((card, index) => (
{card.icon}
統計中

{card.label}

{card.value}

{card.description}

))}
{/* 警示與通知 */}

即時動態

{alertData.map((alert, index) => (
{alert.icon}

{alert.label}

需立即查看

{alert.value}
))}

系統提示

目前系統運行正常。如有任何問題,請聯絡開發團隊獲取支援。

{/* 快速捷徑 */}

快速操作

商品管理

查看並編輯所有商品資料與單位換算。

即刻前往

採購單管理

處理進貨、追蹤採購進度與管理單據。

即刻前往

廠商管理

管理供應商聯絡資訊與供貨清單。

即刻前往

倉庫與庫存

管理入庫、庫存水位與基礎設施。

即刻前往
); }