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

Overview

PTA (Predicted Time Available) (/fleet/pta) provides a visual timeline for tracking driver availability, scheduled loads, and predicted availability windows.

Key Features

  • Weekly Timeline Grid - Visual calendar showing driver availability across 7 days
  • Load Blocks - Active and scheduled loads displayed as timeline blocks
  • PTA Markers - Automatic calculation of availability (2 hours after delivery)
  • Dispatcher Grouping - Drivers grouped by assigned dispatcher
  • Movement Details - Click loads to view route maps and stop details
  • Anomaly Detection - Highlights data issues like overlapping movements

API Endpoints

REST Endpoints

MethodEndpointDescription
GET/api/movements?limit=500Fetch all movements for timeline display
GET/api/drivers/currentFetch driver data for timeline rows
GET/api/drivers/profilesFetch driver profiles (dispatcher assignments)
All endpoints are prefixed with the Tracking Backend URL (NEXT_PUBLIC_TRACKING_BACKEND_URL).

Files

  • pages/fleet/pta.tsx - PTA page
  • components/PredictedTimeAvailable.tsx - Main PTA timeline component
  • components/MovementCardMap.tsx - Movement route map popup
  • components/hooks/useDriverManagement.ts - Driver data for timeline
  • components/hooks/useUnifiedFleetData.ts - Vehicle/trailer associations
  • types/tracking.ts - Movement and MovementStop types
  • types/movement.ts - Movement interface definitions

PTA Logic

The PTA (Predicted Time Available) is automatically calculated as 2 hours after the scheduled drop-off time of a driver’s last movement.
Full documentation with component details, props, and usage examples coming soon.