diff --git a/src/App.tsx b/src/App.tsx index a720938..aa75372 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -35,6 +35,9 @@ import InvoiceDetail from "./pages/dashboard/InvoiceDetail"; import HotelManagement from "./pages/dashboard/HotelManagement"; import RestaurantPOS from "./pages/dashboard/RestaurantPOS"; import Personalization from "./pages/dashboard/Personalization"; +import Security from "./pages/dashboard/Security"; +import VehicleManagement from "./pages/dashboard/VehicleManagement"; +import Sustainability from "./pages/dashboard/Sustainability"; // Hotel pages import HotelRooms from "./pages/dashboard/hotel/Rooms"; import HotelCheckIn from "./pages/dashboard/hotel/CheckIn"; @@ -257,6 +260,30 @@ const AppRouter = () => ( } /> + + + + + + } /> + + + + + + + } /> + + + + + + + } /> + diff --git a/src/components/DashboardLayout.tsx b/src/components/DashboardLayout.tsx index 97f84aa..744000f 100644 --- a/src/components/DashboardLayout.tsx +++ b/src/components/DashboardLayout.tsx @@ -53,7 +53,8 @@ import { Map, Shield, Radio, - Sparkles + Sparkles, + Leaf } from 'lucide-react'; const DashboardLayout = ({ children }: { children: React.ReactNode }) => { @@ -155,6 +156,9 @@ const DashboardLayout = ({ children }: { children: React.ReactNode }) => { ] }, { icon: Brain, label: 'Personalization', path: '/dashboard/personalization' }, + { icon: Shield, label: 'Security', path: '/dashboard/security' }, + { icon: Car, label: 'Vehicle Management', path: '/dashboard/vehicle-management' }, + { icon: Leaf, label: 'Sustainability', path: '/dashboard/sustainability' }, { icon: Wallet, label: 'Wallet', path: '/dashboard/wallet' }, { icon: MessageSquare, label: 'Message', path: '/dashboard/messages', badge: '2' }, ]; diff --git a/src/components/security/AccessControl.tsx b/src/components/security/AccessControl.tsx new file mode 100644 index 0000000..914ce02 --- /dev/null +++ b/src/components/security/AccessControl.tsx @@ -0,0 +1,151 @@ +import React from 'react'; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; +import { Badge } from '@/components/ui/badge'; +import { Button } from '@/components/ui/button'; +import { Input } from '@/components/ui/input'; +import { Users, Lock, Key, Shield, Search, Plus } from 'lucide-react'; + +const mockRoles = [ + { id: 1, name: 'Super Admin', users: 2, permissions: 100, color: 'red' }, + { id: 2, name: 'Admin', users: 8, permissions: 85, color: 'orange' }, + { id: 3, name: 'Manager', users: 24, permissions: 60, color: 'blue' }, + { id: 4, name: 'Staff', users: 156, permissions: 35, color: 'green' }, + { id: 5, name: 'Guest', users: 489, permissions: 10, color: 'gray' } +]; + +const mockPermissions = [ + { module: 'User Management', read: true, write: true, delete: true }, + { module: 'Content Management', read: true, write: true, delete: false }, + { module: 'Financial Reports', read: true, write: false, delete: false }, + { module: 'System Settings', read: true, write: true, delete: true } +]; + +const AccessControl = () => { + return ( +
+
+ + + Total Users + + + +
679
+

Active accounts

+
+
+ + + + Roles + + + +
5
+

Permission groups

+
+
+ + + + Active Sessions + + + +
342
+

Currently logged in

+
+
+ + + + Failed Logins + + + +
23
+

Last 24 hours

+
+
+
+ + + +
+
+ User Roles + Manage user roles and permissions +
+ +
+
+ +
+ {mockRoles.map((role) => ( +
+
+
+ +
+
+

{role.name}

+

{role.users} users • {role.permissions}% permissions

+
+
+ +
+ ))} +
+
+
+ + + + Permission Matrix + View and manage module permissions + + +
+ + + + + + + + + + + {mockPermissions.map((perm, idx) => ( + + + + + + + ))} + +
ModuleReadWriteDelete
{perm.module} + + {perm.read ? '✓' : '✗'} + + + + {perm.write ? '✓' : '✗'} + + + + {perm.delete ? '✓' : '✗'} + +
+
+
+
+
+ ); +}; + +export default AccessControl; diff --git a/src/components/security/AuditLogs.tsx b/src/components/security/AuditLogs.tsx new file mode 100644 index 0000000..d4f8370 --- /dev/null +++ b/src/components/security/AuditLogs.tsx @@ -0,0 +1,175 @@ +import React from 'react'; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; +import { Badge } from '@/components/ui/badge'; +import { Button } from '@/components/ui/button'; +import { Input } from '@/components/ui/input'; +import { FileText, Download, Search, Filter } from 'lucide-react'; + +const mockLogs = [ + { + id: 1, + action: 'User Login', + user: 'admin@karibeo.com', + ip: '192.168.1.100', + timestamp: '2025-10-10 15:23:45', + status: 'success', + details: 'Successful authentication via password' + }, + { + id: 2, + action: 'Permission Changed', + user: 'manager@karibeo.com', + ip: '192.168.1.105', + timestamp: '2025-10-10 14:45:12', + status: 'success', + details: 'Updated role permissions for Staff group' + }, + { + id: 3, + action: 'Failed Login', + user: 'unknown@example.com', + ip: '45.123.67.89', + timestamp: '2025-10-10 14:15:03', + status: 'failed', + details: 'Invalid credentials - 3rd attempt' + }, + { + id: 4, + action: 'Data Export', + user: 'analyst@karibeo.com', + ip: '192.168.1.110', + timestamp: '2025-10-10 13:30:22', + status: 'success', + details: 'Exported user analytics report' + }, + { + id: 5, + action: 'System Settings', + user: 'admin@karibeo.com', + ip: '192.168.1.100', + timestamp: '2025-10-10 12:18:55', + status: 'success', + details: 'Modified security policies' + }, + { + id: 6, + action: 'User Deletion', + user: 'admin@karibeo.com', + ip: '192.168.1.100', + timestamp: '2025-10-10 11:45:30', + status: 'success', + details: 'Deleted inactive user account' + } +]; + +const AuditLogs = () => { + const getStatusColor = (status: string) => { + return status === 'success' + ? 'bg-green-100 text-green-800' + : 'bg-red-100 text-red-800'; + }; + + return ( +
+ + +
+
+ System Audit Logs + Complete history of system activities and changes +
+
+ + +
+
+
+ +
+
+ + +
+
+ +
+ {mockLogs.map((log) => ( +
+
+
+
+ +
+
+
+

{log.action}

+ + {log.status} + +
+

{log.details}

+
+ {log.user} + IP: {log.ip} + {log.timestamp} +
+
+
+ +
+
+ ))} +
+
+
+ +
+ + + Total Events + + + +
12,489
+

Last 30 days

+
+
+ + + + Failed Actions + + + +
87
+

Requiring attention

+
+
+ + + + Storage Used + + + +
2.4 GB
+

Of 10 GB limit

+
+
+
+
+ ); +}; + +export default AuditLogs; diff --git a/src/components/security/ComplianceMonitor.tsx b/src/components/security/ComplianceMonitor.tsx new file mode 100644 index 0000000..413f401 --- /dev/null +++ b/src/components/security/ComplianceMonitor.tsx @@ -0,0 +1,150 @@ +import React from 'react'; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; +import { Badge } from '@/components/ui/badge'; +import { Button } from '@/components/ui/button'; +import { Progress } from '@/components/ui/progress'; +import { CheckCircle, AlertTriangle, FileText, Shield } from 'lucide-react'; + +const complianceStandards = [ + { name: 'GDPR', status: 'compliant', score: 98, lastAudit: '2025-09-15' }, + { name: 'PCI DSS', status: 'compliant', score: 95, lastAudit: '2025-09-20' }, + { name: 'ISO 27001', status: 'compliant', score: 92, lastAudit: '2025-08-30' }, + { name: 'SOC 2', status: 'review', score: 88, lastAudit: '2025-09-10' } +]; + +const requirements = [ + { category: 'Data Protection', completed: 24, total: 25, priority: 'high' }, + { category: 'Access Management', completed: 18, total: 20, priority: 'high' }, + { category: 'Encryption', completed: 15, total: 15, priority: 'critical' }, + { category: 'Incident Response', completed: 10, total: 12, priority: 'medium' }, + { category: 'Documentation', completed: 8, total: 10, priority: 'low' } +]; + +const ComplianceMonitor = () => { + const getStatusColor = (status: string) => { + return status === 'compliant' + ? 'bg-green-100 text-green-800' + : 'bg-yellow-100 text-yellow-800'; + }; + + const getPriorityColor = (priority: string) => { + switch (priority) { + case 'critical': return 'text-red-600'; + case 'high': return 'text-orange-600'; + case 'medium': return 'text-yellow-600'; + default: return 'text-blue-600'; + } + }; + + return ( +
+
+ + + Overall Score + + + +
93%
+

Excellent compliance

+
+
+ + + + Standards + + + +
4
+

Active certifications

+
+
+ + + + Open Issues + + + +
7
+

Require attention

+
+
+ + + + Last Audit + + + +
15
+

Days ago

+
+
+
+ + + + Compliance Standards + Status of regulatory compliance standards + + +
+ {complianceStandards.map((standard) => ( +
+
+
+

{standard.name}

+ + {standard.status} + +
+ + Last audit: {standard.lastAudit} + +
+
+
+ Compliance Score + {standard.score}% +
+ +
+
+ ))} +
+
+
+ + + + Compliance Requirements + Progress on compliance requirements by category + + +
+ {requirements.map((req) => ( +
+
+
+

{req.category}

+ + {req.priority} + +
+ + {req.completed} of {req.total} + +
+ +
+ ))} +
+
+
+
+ ); +}; + +export default ComplianceMonitor; diff --git a/src/components/security/ThreatDetection.tsx b/src/components/security/ThreatDetection.tsx new file mode 100644 index 0000000..7302b89 --- /dev/null +++ b/src/components/security/ThreatDetection.tsx @@ -0,0 +1,160 @@ +import React from 'react'; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; +import { Badge } from '@/components/ui/badge'; +import { Button } from '@/components/ui/button'; +import { AlertTriangle, Shield, Activity, Eye, RefreshCw } from 'lucide-react'; + +const mockThreats = [ + { + id: 1, + type: 'SQL Injection Attempt', + severity: 'high', + ip: '192.168.1.105', + timestamp: '2025-10-10 14:32:11', + status: 'blocked', + description: 'Attempted SQL injection on login form' + }, + { + id: 2, + type: 'Brute Force Attack', + severity: 'critical', + ip: '45.123.67.89', + timestamp: '2025-10-10 14:15:03', + status: 'monitoring', + description: 'Multiple failed login attempts detected' + }, + { + id: 3, + type: 'XSS Attack', + severity: 'medium', + ip: '172.16.0.42', + timestamp: '2025-10-10 13:45:22', + status: 'blocked', + description: 'Cross-site scripting attempt in comment section' + }, + { + id: 4, + type: 'DDoS Pattern', + severity: 'high', + ip: '203.45.12.78', + timestamp: '2025-10-10 12:22:15', + status: 'mitigated', + description: 'Unusual traffic spike detected and throttled' + } +]; + +const ThreatDetection = () => { + const getSeverityColor = (severity: string) => { + switch (severity) { + case 'critical': return 'bg-red-100 text-red-800 border-red-300'; + case 'high': return 'bg-orange-100 text-orange-800 border-orange-300'; + case 'medium': return 'bg-yellow-100 text-yellow-800 border-yellow-300'; + default: return 'bg-blue-100 text-blue-800 border-blue-300'; + } + }; + + const getStatusColor = (status: string) => { + switch (status) { + case 'blocked': return 'bg-green-100 text-green-800'; + case 'monitoring': return 'bg-blue-100 text-blue-800'; + case 'mitigated': return 'bg-purple-100 text-purple-800'; + default: return 'bg-gray-100 text-gray-800'; + } + }; + + return ( +
+
+ + + Active Threats + + + +
24
+

+3 in last hour

+
+
+ + + + Blocked Attacks + + + +
1,847
+

Last 24 hours

+
+
+ + + + Security Score + + + +
94%
+

Excellent protection

+
+
+ + + + Monitoring + + + +
Active
+

Real-time protection

+
+
+
+ + + +
+
+ Recent Threats + Latest security incidents and threats detected +
+ +
+
+ +
+ {mockThreats.map((threat) => ( +
+
+
+
+

{threat.type}

+ + {threat.severity} + + + {threat.status} + +
+

{threat.description}

+
+ IP: {threat.ip} + {threat.timestamp} +
+
+ +
+
+ ))} +
+
+
+
+ ); +}; + +export default ThreatDetection; diff --git a/src/components/sustainability/CarbonFootprint.tsx b/src/components/sustainability/CarbonFootprint.tsx new file mode 100644 index 0000000..a968778 --- /dev/null +++ b/src/components/sustainability/CarbonFootprint.tsx @@ -0,0 +1,98 @@ +import React from 'react'; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; +import { Badge } from '@/components/ui/badge'; +import { Progress } from '@/components/ui/progress'; +import { TrendingDown, Leaf, Factory, Zap } from 'lucide-react'; + +const CarbonFootprint = () => { + return ( +
+
+ + + Total Emissions + + + +
1,247 tons
+

CO2 this year

+
+
+ + + + Reduction + + + +
-18%
+

From last year

+
+
+ + + + Offset + + + +
340 tons
+

27% offset

+
+
+ + + + Goal Progress + + + +
72%
+

On track

+
+
+
+ + + + Emissions by Source + Breakdown of carbon emissions + + +
+
+
+ Transportation + 624 tons (50%) +
+ +
+
+
+ Energy + 374 tons (30%) +
+ +
+
+
+ Operations + 187 tons (15%) +
+ +
+
+
+ Other + 62 tons (5%) +
+ +
+
+
+
+
+ ); +}; + +export default CarbonFootprint; diff --git a/src/components/sustainability/EnergyManagement.tsx b/src/components/sustainability/EnergyManagement.tsx new file mode 100644 index 0000000..b6407a0 --- /dev/null +++ b/src/components/sustainability/EnergyManagement.tsx @@ -0,0 +1,83 @@ +import React from 'react'; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; +import { Progress } from '@/components/ui/progress'; +import { Zap, Sun, Wind, Battery } from 'lucide-react'; + +const EnergyManagement = () => { + return ( +
+
+ + + Total Usage + + + +
45,230 kWh
+

This month

+
+
+ + + + Solar Energy + + + +
12,450 kWh
+

27% of total

+
+
+ + + + Wind Energy + + + +
8,120 kWh
+

18% of total

+
+
+ + + + Efficiency + + + +
+12%
+

Improvement

+
+
+
+ + + + Energy Sources + Breakdown of energy consumption by source + + +
+
+
+ Renewable + 20,570 kWh (45%) +
+ +
+
+
+ Grid + 24,660 kWh (55%) +
+ +
+
+
+
+
+ ); +}; + +export default EnergyManagement; diff --git a/src/components/sustainability/SustainabilityGoals.tsx b/src/components/sustainability/SustainabilityGoals.tsx new file mode 100644 index 0000000..c0f2f5d --- /dev/null +++ b/src/components/sustainability/SustainabilityGoals.tsx @@ -0,0 +1,108 @@ +import React from 'react'; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; +import { Badge } from '@/components/ui/badge'; +import { Progress } from '@/components/ui/progress'; +import { Target, CheckCircle, Clock, TrendingUp } from 'lucide-react'; + +const goals = [ + { id: 1, title: 'Reduce Carbon Emissions by 25%', progress: 72, status: 'on-track', deadline: '2025-12-31' }, + { id: 2, title: 'Achieve 50% Renewable Energy', progress: 45, status: 'on-track', deadline: '2025-12-31' }, + { id: 3, title: 'Zero Waste to Landfill', progress: 93, status: 'ahead', deadline: '2026-06-30' }, + { id: 4, title: 'Water Consumption -30%', progress: 38, status: 'at-risk', deadline: '2025-12-31' } +]; + +const SustainabilityGoals = () => { + const getStatusColor = (status: string) => { + switch (status) { + case 'ahead': return 'bg-green-100 text-green-800'; + case 'on-track': return 'bg-blue-100 text-blue-800'; + case 'at-risk': return 'bg-yellow-100 text-yellow-800'; + default: return 'bg-gray-100 text-gray-800'; + } + }; + + return ( +
+
+ + + Active Goals + + + +
4
+

In progress

+
+
+ + + + Completed + + + +
8
+

Goals achieved

+
+
+ + + + On Track + + + +
75%
+

Success rate

+
+
+ + + + At Risk + + + +
1
+

Needs attention

+
+
+
+ + + + Sustainability Goals + Track progress towards environmental targets + + +
+ {goals.map((goal) => ( +
+
+
+

{goal.title}

+ + {goal.status} + +
+ + Due: {goal.deadline} + +
+
+
+ Progress + {goal.progress}% +
+ +
+
+ ))} +
+
+
+
+ ); +}; + +export default SustainabilityGoals; diff --git a/src/components/sustainability/WasteTracking.tsx b/src/components/sustainability/WasteTracking.tsx new file mode 100644 index 0000000..8b308c1 --- /dev/null +++ b/src/components/sustainability/WasteTracking.tsx @@ -0,0 +1,90 @@ +import React from 'react'; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; +import { Progress } from '@/components/ui/progress'; +import { Trash2, Recycle, TrendingUp, Package } from 'lucide-react'; + +const WasteTracking = () => { + return ( +
+
+ + + Total Waste + + + +
2,340 kg
+

This month

+
+
+ + + + Recycled + + + +
1,755 kg
+

75% recycling rate

+
+
+ + + + Composted + + + +
420 kg
+

18% of total

+
+
+ + + + Improvement + + + +
+8%
+

From last month

+
+
+
+ + + + Waste Management + Distribution of waste by type + + +
+
+
+ Recyclable + 1,755 kg (75%) +
+ +
+
+
+ Organic + 420 kg (18%) +
+ +
+
+
+ Landfill + 165 kg (7%) +
+ +
+
+
+
+
+ ); +}; + +export default WasteTracking; diff --git a/src/components/vehicles/DriverManagement.tsx b/src/components/vehicles/DriverManagement.tsx new file mode 100644 index 0000000..4f3156f --- /dev/null +++ b/src/components/vehicles/DriverManagement.tsx @@ -0,0 +1,116 @@ +import React from 'react'; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; +import { Badge } from '@/components/ui/badge'; +import { Button } from '@/components/ui/button'; +import { Users, Star, AlertTriangle, Award, TrendingUp } from 'lucide-react'; + +const mockDrivers = [ + { id: 1, name: 'Carlos Martinez', status: 'active', rating: 4.9, trips: 245, vehicle: 'V001' }, + { id: 2, name: 'Maria Rodriguez', status: 'active', rating: 4.8, trips: 198, vehicle: 'V005' }, + { id: 3, name: 'Juan Perez', status: 'off-duty', rating: 4.7, trips: 312, vehicle: '-' }, + { id: 4, name: 'Ana Garcia', status: 'active', rating: 5.0, trips: 156, vehicle: 'V002' } +]; + +const DriverManagement = () => { + const getStatusColor = (status: string) => { + return status === 'active' + ? 'bg-green-100 text-green-800' + : 'bg-gray-100 text-gray-800'; + }; + + return ( +
+
+ + + Total Drivers + + + +
48
+

Registered drivers

+
+
+ + + + Active Now + + + +
32
+

Currently driving

+
+
+ + + + Avg Rating + + + +
4.8
+

Out of 5.0

+
+
+ + + + Top Performer + + + +
Ana G.
+

5.0 rating

+
+
+
+ + + +
+
+ Driver List + Manage your driver team +
+ +
+
+ +
+ {mockDrivers.map((driver) => ( +
+
+
+
+ +
+
+
+

{driver.name}

+ + {driver.status} + +
+
+ + + {driver.rating} + + {driver.trips} trips + Vehicle: {driver.vehicle} +
+
+
+ +
+
+ ))} +
+
+
+
+ ); +}; + +export default DriverManagement; diff --git a/src/components/vehicles/FleetOverview.tsx b/src/components/vehicles/FleetOverview.tsx new file mode 100644 index 0000000..b4273d3 --- /dev/null +++ b/src/components/vehicles/FleetOverview.tsx @@ -0,0 +1,120 @@ +import React from 'react'; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; +import { Badge } from '@/components/ui/badge'; +import { Button } from '@/components/ui/button'; +import { Car, TrendingUp, AlertTriangle, Wrench, MapPin, DollarSign } from 'lucide-react'; + +const mockVehicles = [ + { id: 'V001', model: 'Toyota Camry 2023', status: 'active', location: 'Downtown', fuel: 85, mileage: 45230 }, + { id: 'V002', model: 'Honda Accord 2022', status: 'active', location: 'Airport', fuel: 92, mileage: 38450 }, + { id: 'V003', model: 'Tesla Model 3', status: 'charging', location: 'Station A', fuel: 45, mileage: 22100 }, + { id: 'V004', model: 'Ford Explorer 2023', status: 'maintenance', location: 'Service Center', fuel: 30, mileage: 52780 }, + { id: 'V005', model: 'Chevrolet Suburban', status: 'active', location: 'Hotel Zone', fuel: 78, mileage: 31250 } +]; + +const FleetOverview = () => { + const getStatusColor = (status: string) => { + switch (status) { + case 'active': return 'bg-green-100 text-green-800'; + case 'charging': return 'bg-blue-100 text-blue-800'; + case 'maintenance': return 'bg-orange-100 text-orange-800'; + default: return 'bg-gray-100 text-gray-800'; + } + }; + + return ( +
+
+ + + Total Vehicles + + + +
54
+

Active fleet

+
+
+ + + + In Service + + + +
48
+

89% availability

+
+
+ + + + Maintenance + + + +
6
+

Due this week

+
+
+ + + + Monthly Cost + + + +
$8,450
+

-5% from last month

+
+
+
+ + + +
+
+ Active Vehicles + Real-time fleet status +
+ +
+
+ +
+ {mockVehicles.map((vehicle) => ( +
+
+
+
+ +
+
+
+

{vehicle.model}

+ + {vehicle.status} + +
+
+ + + {vehicle.location} + + Fuel: {vehicle.fuel}% + {vehicle.mileage.toLocaleString()} mi +
+
+
+ +
+
+ ))} +
+
+
+
+ ); +}; + +export default FleetOverview; diff --git a/src/components/vehicles/MaintenanceSchedule.tsx b/src/components/vehicles/MaintenanceSchedule.tsx new file mode 100644 index 0000000..a810c65 --- /dev/null +++ b/src/components/vehicles/MaintenanceSchedule.tsx @@ -0,0 +1,126 @@ +import React from 'react'; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; +import { Badge } from '@/components/ui/badge'; +import { Button } from '@/components/ui/button'; +import { Wrench, Calendar, AlertTriangle, CheckCircle } from 'lucide-react'; + +const mockMaintenance = [ + { id: 1, vehicle: 'V004 - Ford Explorer', type: 'Oil Change', status: 'scheduled', date: '2025-10-12', priority: 'medium' }, + { id: 2, vehicle: 'V007 - Tesla Model S', type: 'Tire Rotation', status: 'overdue', date: '2025-10-08', priority: 'high' }, + { id: 3, vehicle: 'V012 - Honda CR-V', type: 'Brake Inspection', status: 'scheduled', date: '2025-10-15', priority: 'high' }, + { id: 4, vehicle: 'V003 - Tesla Model 3', type: 'Battery Check', status: 'completed', date: '2025-10-09', priority: 'low' } +]; + +const MaintenanceSchedule = () => { + const getStatusColor = (status: string) => { + switch (status) { + case 'completed': return 'bg-green-100 text-green-800'; + case 'scheduled': return 'bg-blue-100 text-blue-800'; + case 'overdue': return 'bg-red-100 text-red-800'; + default: return 'bg-gray-100 text-gray-800'; + } + }; + + const getPriorityColor = (priority: string) => { + switch (priority) { + case 'high': return 'bg-red-100 text-red-800'; + case 'medium': return 'bg-yellow-100 text-yellow-800'; + default: return 'bg-blue-100 text-blue-800'; + } + }; + + return ( +
+
+ + + Scheduled + + + +
12
+

This month

+
+
+ + + + Overdue + + + +
3
+

Requires attention

+
+
+ + + + Completed + + + +
45
+

This month

+
+
+ + + + Total Cost + + + +
$2,340
+

This month

+
+
+
+ + + +
+
+ Maintenance Schedule + Upcoming and recent maintenance activities +
+ +
+
+ +
+ {mockMaintenance.map((item) => ( +
+
+
+
+ +
+
+
+

{item.type}

+ + {item.status} + + + {item.priority} + +
+
+ {item.vehicle} + {item.date} +
+
+
+ +
+
+ ))} +
+
+
+
+ ); +}; + +export default MaintenanceSchedule; diff --git a/src/components/vehicles/VehicleTracking.tsx b/src/components/vehicles/VehicleTracking.tsx new file mode 100644 index 0000000..c531ffe --- /dev/null +++ b/src/components/vehicles/VehicleTracking.tsx @@ -0,0 +1,63 @@ +import React from 'react'; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; +import { Badge } from '@/components/ui/badge'; +import { MapPin, Navigation, Clock, Activity } from 'lucide-react'; + +const VehicleTracking = () => { + return ( +
+ + + Live Vehicle Tracking + Real-time GPS tracking of your fleet + + +
+
+ +

Map integration would be displayed here

+

Showing real-time location of all vehicles

+
+
+
+
+ +
+ + + Active Routes + + + +
32
+

Currently in transit

+
+
+ + + + Avg Speed + + + +
45 mph
+

Fleet average

+
+
+ + + + ETA + + + +
18 min
+

Nearest vehicle

+
+
+
+
+ ); +}; + +export default VehicleTracking; diff --git a/src/pages/dashboard/Security.tsx b/src/pages/dashboard/Security.tsx new file mode 100644 index 0000000..9b2cc4b --- /dev/null +++ b/src/pages/dashboard/Security.tsx @@ -0,0 +1,52 @@ +import React, { useState } from 'react'; +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; +import ThreatDetection from '@/components/security/ThreatDetection'; +import AccessControl from '@/components/security/AccessControl'; +import AuditLogs from '@/components/security/AuditLogs'; +import ComplianceMonitor from '@/components/security/ComplianceMonitor'; +import { Shield } from 'lucide-react'; + +const Security = () => { + const [activeTab, setActiveTab] = useState('threats'); + + return ( +
+
+
+ +
+

Security Center

+

Monitor and manage system security

+
+
+ + + + Threat Detection + Access Control + Audit Logs + Compliance + + + + + + + + + + + + + + + + + + +
+
+ ); +}; + +export default Security; diff --git a/src/pages/dashboard/Sustainability.tsx b/src/pages/dashboard/Sustainability.tsx new file mode 100644 index 0000000..258193e --- /dev/null +++ b/src/pages/dashboard/Sustainability.tsx @@ -0,0 +1,52 @@ +import React, { useState } from 'react'; +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; +import CarbonFootprint from '@/components/sustainability/CarbonFootprint'; +import EnergyManagement from '@/components/sustainability/EnergyManagement'; +import WasteTracking from '@/components/sustainability/WasteTracking'; +import SustainabilityGoals from '@/components/sustainability/SustainabilityGoals'; +import { Leaf } from 'lucide-react'; + +const Sustainability = () => { + const [activeTab, setActiveTab] = useState('carbon'); + + return ( +
+
+
+ +
+

Sustainability Dashboard

+

Track and improve environmental impact

+
+
+ + + + Carbon Footprint + Energy + Waste + Goals + + + + + + + + + + + + + + + + + + +
+
+ ); +}; + +export default Sustainability; diff --git a/src/pages/dashboard/VehicleManagement.tsx b/src/pages/dashboard/VehicleManagement.tsx new file mode 100644 index 0000000..3837e79 --- /dev/null +++ b/src/pages/dashboard/VehicleManagement.tsx @@ -0,0 +1,52 @@ +import React, { useState } from 'react'; +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; +import FleetOverview from '@/components/vehicles/FleetOverview'; +import VehicleTracking from '@/components/vehicles/VehicleTracking'; +import MaintenanceSchedule from '@/components/vehicles/MaintenanceSchedule'; +import DriverManagement from '@/components/vehicles/DriverManagement'; +import { Car } from 'lucide-react'; + +const VehicleManagement = () => { + const [activeTab, setActiveTab] = useState('fleet'); + + return ( +
+
+
+ +
+

Vehicle Management

+

Monitor and manage your fleet

+
+
+ + + + Fleet Overview + Tracking + Maintenance + Drivers + + + + + + + + + + + + + + + + + + +
+
+ ); +}; + +export default VehicleManagement;