import React from "react"; import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { MapPin, TrendingUp, AlertTriangle, CheckCircle2, Clock, Users } from "lucide-react"; import { Button } from "@/components/ui/button"; import { useNavigate } from "react-router-dom"; import { createPageUrl } from "@/utils"; import { LineChart, Line, BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer, AreaChart, Area } from 'recharts'; import PageHeader from "../components/common/PageHeader"; const coverageData = [ { hub: 'San Jose', coverage: 97, incidents: 0, satisfaction: 4.9 }, { hub: 'San Francisco', coverage: 92, incidents: 1, satisfaction: 4.7 }, { hub: 'Oakland', coverage: 89, incidents: 2, satisfaction: 4.5 }, { hub: 'Sacramento', coverage: 95, incidents: 1, satisfaction: 4.8 }, ]; const demandForecast = [ { week: 'Week 1', predicted: 120, actual: 118 }, { week: 'Week 2', predicted: 135, actual: 140 }, { week: 'Week 3', predicted: 145, actual: 142 }, { week: 'Week 4', predicted: 160, actual: null }, { week: 'Week 5', predicted: 155, actual: null }, ]; const incidents = [ { id: 1, type: 'Late Arrival', hub: 'San Francisco', staff: 'John Doe', severity: 'low', time: '2 hours ago' }, { id: 2, type: 'No Show', hub: 'Oakland', staff: 'Jane Smith', severity: 'high', time: '5 hours ago' }, ]; const feedbackData = [ { client: 'Tech Corp', rating: 5, comment: 'Excellent service, very professional staff', date: '2 days ago' }, { client: 'Event Solutions', rating: 4, comment: 'Good overall, minor scheduling issues', date: '3 days ago' }, { client: 'Premier Events', rating: 5, comment: 'Outstanding performance, will book again', date: '1 week ago' }, ]; export default function OperatorDashboard() { const navigate = useNavigate(); return (
Coverage Rate
94%
Active Incidents
2
Client Satisfaction
4.8
Forecast Accuracy
91%
Coverage: {hub.coverage}%
Incidents
{hub.incidents}
Satisfaction
{hub.satisfaction}/5.0
Forecast accuracy: 91% based on historical data
Hub: {incident.hub}
Staff: {incident.staff}
{feedback.comment}