Skip to main content
Documentation In ProgressThis section is currently being developed.

Overview

Driver Management (/fleet/drivers) provides comprehensive tools for managing fleet drivers including profiles, Hours of Service (HOS) tracking, and load assignments.

Key Features

  • Driver Table - Searchable, sortable list with filters for status, dispatcher, and more
  • HOS Tracking - Real-time Hours of Service data with color-coded warnings
  • Driver Profiles - Editable profile information (contact, license, preferences)
  • Tractor/Trailer Associations - View assigned equipment via movements data
  • URL Sync - Deep linking support for search and driver selection

API Endpoints

REST Endpoints

MethodEndpointDescription
GET/api/drivers/currentFetch all current drivers from McLeod
GET/api/drivers/profilesFetch editable driver profiles
PUT/api/drivers/profile/{id}Update a driver’s profile
GET/api/drivers/hos/available-timeFetch HOS (Hours of Service) data
GET/locations/currentFetch vehicle locations for associations
GET/api/movements?limit=500Fetch movements for driver-load associations

SSE Streams (Real-time)

EndpointEvent TypeDescription
/api/drivers/streamdriver_updateReal-time driver status updates
All endpoints are prefixed with the Tracking Backend URL (NEXT_PUBLIC_TRACKING_BACKEND_URL).

Files

  • pages/fleet/drivers.tsx - Driver management page
  • components/DriverManagement.tsx - Main driver management component
  • components/AddDriverModal.tsx - Add new driver modal
  • components/EditDriverModal.tsx - Edit driver modal
  • components/EnhancedDriverDetailsModal.tsx - Detailed driver info modal
  • components/fleet/HOSBadge.tsx - HOS status badge
  • components/fleet/DriversTable.tsx - Drivers table component
  • components/fleet/DriverQuickActions.tsx - Quick action buttons
  • components/fleet/UpcomingLoadsPanel.tsx - Driver’s upcoming loads
  • components/hooks/useDriverManagement.ts - Driver CRUD and data mapping
  • components/hooks/useHOSData.ts - Hours of Service data
  • components/hooks/useFleetUrlSync.ts - URL synchronization
  • lib/services/drivers.ts - Driver API service
  • types/driver.ts - Driver interface definitions

Full documentation with component details, props, and usage examples coming soon.