diff --git a/src/pages/admin/dashboard/index.tsx b/src/pages/admin/dashboard/index.tsx index 3dfbee8..3529dc9 100644 --- a/src/pages/admin/dashboard/index.tsx +++ b/src/pages/admin/dashboard/index.tsx @@ -1,11 +1,59 @@ import { useQuery } from "@tanstack/react-query"; +import { Link } from "react-router-dom"; +import { + Receipt, + FileSearch, + ClipboardList, + CreditCard, + FileClock, + ChevronRight, +} from "lucide-react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { dashboardService, invoiceService } from "@/services"; import { Badge } from "@/components/ui/badge"; import { format } from "date-fns"; +import { cn } from "@/lib/utils"; const COLORS = ["#10b981", "#f59e0b", "#ef4444", "#3b82f6", "#8b5cf6"]; +const COMMERCE_QUICK_LINKS = [ + { + label: "Invoices", + description: "Browse, search, and manage issued invoices.", + path: "/admin/invoices", + icon: Receipt, + color: "text-slate-700", + }, + { + label: "Proforma", + description: "View and manage proforma invoices and drafts.", + path: "/admin/proforma", + icon: FileSearch, + color: "text-blue-600", + }, + { + label: "Proforma requests", + description: "Review and process incoming proforma requests.", + path: "/admin/proforma-requests", + icon: ClipboardList, + color: "text-violet-600", + }, + { + label: "Payments", + description: "Recorded payments and transaction history.", + path: "/admin/payments", + icon: CreditCard, + color: "text-emerald-600", + }, + { + label: "Payment requests", + description: "Pending and processed payment requests.", + path: "/admin/payment-requests", + icon: FileClock, + color: "text-amber-600", + }, +] as const; + export default function DashboardPage() { const { data: metrics, isLoading: metricsLoading } = useQuery({ queryKey: ["admin", "dashboard", "metrics"], @@ -35,13 +83,8 @@ export default function DashboardPage() { }).format(amount); }; - if (metricsLoading || scannedLoading || statusLoading || requestsLoading) { - return ( -
+ {item.description} +
+