import React from 'react'; import { Printer, Tag, AlertTriangle, Clock, TrendingUp, Plus, FileText, Users, UserCircle, Package, MapPin, ArrowUpRight, ArrowDownRight } from 'lucide-react'; import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "../ui/card"; import { Button } from "../ui/button"; import { Badge } from "../ui/badge"; import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, LineChart, Line, PieChart, Pie, Cell } from 'recharts'; import { ScrollArea } from "../ui/scroll-area"; // --- Mock Data --- const WEEKLY_PRINT_DATA = [ { day: 'Mon', labels: 145 }, { day: 'Tue', labels: 230 }, { day: 'Wed', labels: 185 }, { day: 'Thu', labels: 278 }, { day: 'Fri', labels: 190 }, { day: 'Sat', labels: 120 }, { day: 'Sun', labels: 85 }, ]; const CATEGORY_DATA = [ { name: 'Prep', value: 450, color: '#3b82f6' }, { name: 'Grab & Go', value: 320, color: '#10b981' }, { name: 'Catering', value: 150, color: '#f59e0b' }, { name: 'Delivery', value: 80, color: '#6366f1' }, ]; const RECENT_LABELS = [ { id: '1-251201', product: 'Chicken Breast', template: '2" Prep', user: 'Alice J.', time: '10 mins ago', status: 'active' }, { id: '1-251202', product: 'Caesar Salad', template: '3" Grab\'n\'Go', user: 'Bob S.', time: '25 mins ago', status: 'active' }, { id: '1-251203', product: 'Tomato Soup', template: '2" Prep', user: 'Charlie B.', time: '40 mins ago', status: 'expired' }, { id: '1-251204', product: 'Roast Beef', template: '2" x 2" Prep', user: 'Alice J.', time: '1 hour ago', status: 'active' }, { id: '1-251205', product: 'Iced Tea', template: 'Beverage Label', user: 'David W.', time: '1 hour ago', status: 'active' }, ]; const ACTIVE_TIMERS = [ { title: 'Coffee Station', time: '12:45', status: 'running' }, { title: 'Sanitizer Bucket', time: '04:20', status: 'warning' }, { title: 'Hot Hold Unit 1', time: '00:00', status: 'expired' }, ]; export function Dashboard() { return (
{/* Top Hierarchy / Welcome Bar */}

Dashboard Overview

Welcome back, Admin. Here's what's happening today.

{/* KPI Cards */}
{/* Main Content Grid */}
{/* Left Column (Charts) */}
{/* Print Volume Chart */} Weekly Print Volume Number of labels printed over the last 7 days
{/* Recent Labels Table */}
Recent Labels Latest printed labels across all locations
{RECENT_LABELS.map((label) => (
{label.template.substring(0, 2)}

{label.product}

{label.id} • {label.user}

{label.time} {label.status}
))}
{/* Right Column (Widgets) */}
{/* Category Distribution */} By Category
{CATEGORY_DATA.map((entry, index) => ( ))}
1000 Total
{CATEGORY_DATA.map((item) => (
{item.name}
{item.value}
))}
{/* Active Timers Widget */} Active Timers
{ACTIVE_TIMERS.map((timer, idx) => (
{timer.title}
{timer.time} {timer.status === 'running' &&
} {timer.status === 'warning' &&
} {timer.status === 'expired' &&
}
))}
); } // --- Sub Components --- function KPICard({ title, value, trend, trendUp, icon: Icon, color, bgColor }: any) { return (

{title}

{value}

{trendUp ? ( ) : ( )} {trend} vs last period
); }