Live monitoring
The Monitoring page is the dispatch center during business hours β letting Dispatchers track realtime vehicle positions, trip progress, and react quickly to issues.

Page layoutβ
| Area | Content |
|---|---|
| Map (center) | All running vehicles on one Leaflet/OSM map |
| Trip list (right) | Card per trip: vehicle, driver, progress, ETA |
| Filters (top) | Filter by date, status, depot |
Map markersβ
Each vehicle = a colored marker on the map:
| Color | Meaning |
|---|---|
| π’ Green | Running on planned route (IN_PROGRESS) |
| π΅ Blue | Just started (LOADING / just left depot) |
| π Orange | Returning to depot (RETURNING) |
| π΄ Red | Route deviation β alert! |
| β« Gray | Lost GPS signal > 5 minutes |
Click a marker for a detail popup: driver, vehicle code, next stop, current speed, last update time.
Realtime GPSβ
The mobile driver app pushes location to the server every 30 seconds while a trip is active. On the map:
- Marker = current position
- Dashed line = planned route (per plan)
- Solid line = actual route (drawn from historical GPS points)
The system automatically compares actual GPS vs the dashed planned route. If deviation exceeds 200m for 3 consecutive samples β marker turns π΄ + notification fires.
Common causes: driver took a different road (traffic, avoidance), wrong address, or needs verification.
Trip detailβ
Click a trip card on the right or a map marker β opens detail panel:
- Vehicle + driver info (with click-to-call phone)
- Stop list with status:
- β³ Not yet arrived
- π Currently at
- β Completed (with POD photos)
- β Failed (with reason + photo)
- Progress: X/N stops delivered
- Actual total km vs planned
- COD collected: total cash + per-stop detail
Trip statusβ
ASSIGNED β(driver confirms)β> DRIVER_CONFIRMED
β
ββ(starts)β> LOADING β> IN_PROGRESS β> RETURNING β> COMPLETED
β
ββ(issue)β> CANCELLED
Dispatcher actionsβ
1. Call the driverβ
Click the phone number in the card β opens dialer on PC (requires softphone) or copy the number.
2. Send in-app messageβ
Click π¬ on the trip β type text β driver gets notification on the app.
3. Mark a stop as failedβ
When the driver can't be reached, the Dispatcher can mark on their behalf:
- Click stop β "Mark failed" β choose reason (customer absent, wrong address, rejected...)
4. Close trip earlyβ
For serious incidents:
- Click "End trip" β moves to
CANCELLED - System writes Audit Log
- Undelivered orders return to
OPEN(awaiting re-planning)
Filtersβ
- Date: defaults to today
- Status: tick statuses to view
- Origin depot: filter by parent depot
- Has alert: show only trips with deviation / GPS loss
Nextβ
- Incident handling β When a driver reports a problem