Deliveries
Where: Operations → Deliveries · Sales → Orders → order → Shipments
How a delivery runs
- The buyer drops a pin. When a buyer accepts a quote for delivery or checks out, the address form carries a map: they search a place, tap the map or use their phone's location, and the pin (with gate or landmark notes) travels with the order.
- You create the shipment on the order's Shipments tab as before, then press Delivery on the row to enter the driver's name and phone, the vehicle and, if you know it, an ETA. The destination is the buyer's pin unless you set another. Two links appear: Copy driver link and Copy tracking link.
- The driver opens their link on a phone. It shows the stop, a Navigate button, and one-tap milestones: Start delivery (the shipment moves to shipped, stock is fulfilled and the buyer is told it is on its way), Share my location (sends a GPS fix every few seconds; the road ETA and the route line refresh about once a minute), Nearly there, Delivered with the receiver's name, or Could not deliver with a reason.
- The buyer follows along on their order page (Track delivery) or the tracking link, which works without signing in and can be forwarded to a site foreman: driver's name, live position, ETA, route and each milestone. It never shows the driver's phone number.
Notifications go to the buyer at dispatch, when the driver is nearly there and on delivery; a failed attempt alerts staff with shipment permissions.
Photo proof of delivery
A name at the door can be argued with later; a photograph of the goods where they were left usually settles it. On the driver's link, Take a photo opens the phone's camera, and the picture is attached to that stop — up to six per delivery, five MB each. When a delivery cannot be completed, Photograph the problem records what stopped it (a locked gate, damaged goods, the wrong address) alongside the reason.
The buyer sees the photos on their tracking page under Proof of delivery, and staff see thumbnails in the Proof column of the order's Shipments tab. The driver's position is stored with the photo when they are sharing their location, so a picture can be placed at a point on the map.
When a delivery runs late
Nobody watches the board all afternoon, so the system watches it instead. Every twenty minutes it looks for deliveries that are out but overdue — past their ETA by more than 45 minutes, or dispatched over four hours ago with no position reported — and notifies everyone with shipment permissions, naming the customers and drivers involved. It is one alert per store, at most once every four hours, so a bad afternoon does not become a stream of notifications.
A run that is on time and reporting its position never triggers it, and neither does one that has already been delivered.
The board
Operations → Deliveries lists every shipment not yet delivered or returned, soonest ETA first, with the driver, destination, ETA and when the last position came in. No position for 30 min counts drivers who are on the road but have gone quiet. The two icons on each row copy the driver link and the buyer's tracking link.
Runs: one driver, several drops
A van going out with six deliveries is one run, not six shipments that happen to share a vehicle. On Operations → Deliveries, tick the stops going together and press Group into a run: name it, set the driver, phone and vehicle, the day, and where the van starts from. The place you type is remembered, so the next run only needs the driver.
Plan by road asks the routing server for the shortest way round those stops from your yard, writes that order back and gives each stop an ETA spread across the drive. The run does not return to the yard — a van finishes where it finishes, and planning a return leg would order the stops for a journey nobody makes. The run then shows its total distance and driving time.
Send out dispatches every stop on the run at once: stock is fulfilled, each buyer is told their order is on its way, and each still has their own tracking link. The driver gets one link per stop as before. Finish closes the run.
A run needs a starting point to be planned; without one it can still be created and sent out, the stops just keep the order you picked them in.
The buyer's page updates itself
The tracking page no longer asks the server every fifteen seconds whether anything changed — the van's position, the ETA and each milestone are pushed to it as they happen, so the marker moves while the buyer watches. If a network or proxy will not hold the connection open, the page quietly falls back to checking every fifteen seconds, exactly as before; nobody sees an error either way.
Seeing the afternoon on one map
Show on a map puts every van we have a position for and every drop we know the pin of on one picture: drivers as amber dots, destinations as pins. Hovering names the customer and the driver; clicking one tells you its order, driver and ETA. The map only loads when you open it, so the rest of the console stays as quick as it was.
Addresses buyers have used before
The first time a buyer pins a site it takes a minute — search, tap the map, note the gate. After that the saved address carries the exact spot, and the delivery form offers it as “Deliver to a place you have used before”: one tap fills the address, the pin and the driver's note. A buyer with three sites picks between them instead of re-pinning each order, and the driver gets the same coordinates every time.
Maps and routing
Maps use OpenStreetMap tiles, place search uses Nominatim and road ETAs come from OSRM — all open source. The defaults point at the public servers, which suit a pilot; for production volume set NUXT_PUBLIC_MAP_TILES, NUXT_PUBLIC_GEOCODER and ROUTER_URL to self-hosted instances.