import React from 'react'; import { Link } from 'react-router-dom'; import { MapIcon, WrenchScrewdriverIcon, BeakerIcon, CalendarDaysIcon, ClockIcon, CloudIcon, PlusIcon, } from '@heroicons/react/24/outline'; import { useAuth } from '../../hooks/useAuth'; const Dashboard = () => { const { user } = useAuth(); const quickActions = [ { name: 'Add Property', href: '/properties', icon: MapIcon, description: 'Set up a new lawn area', color: 'bg-blue-500', }, { name: 'Plan Application', href: '/applications/plan', icon: CalendarDaysIcon, description: 'Schedule a treatment', color: 'bg-green-500', }, { name: 'Add Equipment', href: '/equipment', icon: WrenchScrewdriverIcon, description: 'Register new equipment', color: 'bg-purple-500', }, { name: 'Log Application', href: '/applications/log', icon: ClockIcon, description: 'Record completed work', color: 'bg-orange-500', }, ]; const stats = [ { name: 'Properties', value: '3', change: '+1', changeType: 'positive', icon: MapIcon, }, { name: 'This Month\'s Applications', value: '12', change: '+4', changeType: 'positive', icon: CalendarDaysIcon, }, { name: 'Equipment Items', value: '8', change: '+2', changeType: 'positive', icon: WrenchScrewdriverIcon, }, { name: 'Products Used', value: '15', change: '+3', changeType: 'positive', icon: BeakerIcon, }, ]; const recentActivity = [ { id: 1, type: 'application', title: 'Applied fertilizer to Front Yard', property: 'Main Property', date: '2 hours ago', status: 'completed', }, { id: 2, type: 'plan', title: 'Scheduled weed control treatment', property: 'Back Yard', date: 'Tomorrow at 9:00 AM', status: 'planned', }, { id: 3, type: 'equipment', title: 'Added new broadcast spreader', property: null, date: '3 days ago', status: 'completed', }, ]; const upcomingTasks = [ { id: 1, title: 'Pre-emergent herbicide application', property: 'Main Property - Front Yard', date: 'March 15, 2024', weather: 'Partly cloudy, 65°F', priority: 'high', }, { id: 2, title: 'Spring fertilizer application', property: 'Side Property - Back Lawn', date: 'March 20, 2024', weather: 'Sunny, 72°F', priority: 'medium', }, ]; return (
{/* Header */}

Welcome back, {user?.firstName}!

Here's what's happening with your lawn care today.

{/* Stats Grid */}
{stats.map((stat) => (

{stat.name}

{stat.value}

{stat.change}
))}
{/* Quick Actions */}

Quick Actions

Get started with common tasks

{quickActions.map((action) => (

{action.name}

{action.description}

))}
{/* Recent Activity & Upcoming Tasks */}
{/* Recent Activity */}

Recent Activity

View all
{recentActivity.map((activity) => (

{activity.title}

{activity.property && (

{activity.property}

)}

{activity.date}

))}
{/* Upcoming Tasks */}

Upcoming Tasks

View all
{upcomingTasks.map((task) => (

{task.title}

{task.property}

{task.date}
{task.weather}
{task.priority}
))}
{/* Weather Widget */}

Today's Weather

Detailed forecast

72°F

Partly cloudy

Wind: 5 mph
Humidity: 45%

✓ Good conditions for lawn applications today

); }; export default Dashboard;