Route plan

A React block (a whole screen) in Beamline's Inventory app.

A day's delivery routes in the service's zone. The day at a glance: routes, routes without a driver (warning), stops running late (danger), stops done. Each route: its colour named in words (matched to its pins on a map, never its identity), team, window, driver or Unassigned, how far it has got as one filling hue, its late stops and state. Opened, its stops pair the planned arrival with the actual time, or a forecast while it runs, and say on time, early or late in minutes, in words and tone; a stop done without a recorded time says so, never zero. Once a route starts its plan is fixed and said: moving a stop changes the order and forecasts, not the plan. A route from a hub starts with loading: hub, driver, team, window and history beside the packages, whose barcodes can be corrected until loading starts and are locked after; each package loaded or missing with a reason; finishing with one missing says so, apart from a complete load. A new route takes a name, a colour, the day, a start and an end in a zone (the end after the start), start and end places, a team, and a driver or none yet; a driver is assigned later from the route's menu.

Use it for

  • A day of routes or runs where each stop has a plan and an outcome, and late work must stand out.
  • Where a plan is fixed once work starts and a loading step precedes it.

Not for

  • A live map board (the signature list's dispatch board).
  • Booking appointments (appointment-book).

Anatomy

  • header: the tool's mark, Routes, the day, the zone, New route
  • summary: routes, without a driver, stops running late, stops done
  • route: toggle row (colour, name, team, window, driver, progress, late, state; a started route's fixed plan said on its state), menu (assign or change the driver, loading)
  • stops: number, place and who, planned and actual or forecast, on time or early or late, move earlier or later on attention
  • loading sheet: facts and history beside the packages with counts, barcodes, loaded or missing; start and finish
  • new route sheet: name, colour, day, start and end, zone, from and to, team, driver

States

  • no routes, planned, loading, on the road, done; unassigned; a stop late, early, on time, failed, done without a time
  • plan fixed after the start; loading list open, locked, finished with a package missing
  • an act refused (a duplicate name, loading without a driver): said where it was asked
  • phone: stops stack their times
  • right to left: mirrored
  • reduced motion: through the tokens

Keyboard

  • Tab through the day, New route, each route's toggle and menu, the stops' move buttons and the sheets' fields

Motion

Nothing runs at rest.

Props

PropTypeDefaultDescription
routesPlanRoute[]—The day's routes (controlled).
defaultRoutesPlanRoute[]—
onRoutesChange((routes: PlanRoute[]) => void)—
onAction (required)(action: RouteAction) => Promise<PlanRoute[]>—Does one act; resolve with the routes as they now stand, reject with why nothing changed.
date (required)string—The day shown (YYYY-MM-DD).
onDateChange((date: string) => void)—
timezone (required)string—The service's zone, said above the times.
zonesstring[]—
hubs (required)string[]—
teams (required)string[]—
drivers (required)string[]—
defaultOpenstring | null—The route opened at first.
productstring—
classNamestring—Classes on the documented visual root; no override by default.
styleCSSProperties—Inline styles on the documented visual root; no overrides by default.
refRef<HTMLDivElement>—Receives the documented native target or imperative handle; omitted by default.
mapsRecord<string, RouteMap>—A map per route (by route id): the open route is drawn beside its stops. Without one the stops stand alone.

Built from

Dependencies

lucide-react

Import

import { RoutePlan, ROUTE_COLOURS } from "@beamline/route-plan";

Get it

Route plan is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent

More in Inventory

  • Stock count: A shelf counted. Count: the products on it with counted units, not counted (an empty field that changes nothing) kept apart from a counted zero, expected…
  • Inventory counts: Recurring stock counts from plan to shelf: a phone-first count of one occurrence where an untouched part reads not counted and a zero reads counted, none…
  • Goods receiving: Goods received against purchase orders and invoices. Cards grouped by purchase order or invoice, each line once whichever way (a line keeps both sources…
  • Purchase order desk: Purchase orders for stock from draft to closed. The list of orders with status (ready for review on warning, approved, ordered and partly received on…
  • Restock desk: Restocking from suppliers' own shops. Items low on stock (below the minimum on danger, at it on warning, unknown said) beside the chosen item with how…
  • Stock alerts: Alerts on stock counts and expiry dates. Counts of alerts gone off (danger) and close (warning) in the header. A table: item and type, the rule in words…
  • Inventory finder: Find stock and act on what's found. A rail of filters: name or SKU; folders with or without their subfolders (folders the person can't see said as not…
  • Item setup: Setting items up for scanning and records. Barcodes: scanned codes waiting to be linked, each with its symbology, when and who; Look it up brings a…
  • Bulk item edit: Many items corrected at once. Pick a folder, with its subfolders or not (fixed once anything is edited), up to a limit said. The items in a grid: name…
  • Kit builder: A kit (bundle) made of standalone products, and how many its parts' stock can make. Sell as a kit; the parts in one kit with units per kit, removable…
  • Serial allocation: A receipt line's serial numbers. Serials generated from a first serial and how many (its digits counted up, padding kept; a first serial without digits…
  • Stock moves: Where stock went, and moving it. The ledger lists movements newest first: moves on info, stock added on success, stock taken out on warning; each with…
  • Scan station: A warehouse scanner, phone-first. Home: one scan field that also takes typing (and says so when the scanner isn't connected), each code named as what it…
  • Pack station: A packing bench. Scanner, scale and printer each said, on the warning tone when away. Find the shipment by scanning or typing its number (none found…
  • Shipment split: An order's lines split across shipments. A table of lines with what was ordered and a column per shipment (new ones marked); a line already shipped can't…
  • Job materials: Materials sent out to jobs and pick lists. Jobs: the list (draft, active on info, completed on success) beside the chosen job with its site, dates (the…
  • Service tasks: A fleet shop's maintenance setup. Tasks: active and archived, searchable, main tasks and their subtasks told apart in words, archiving refused while…
  • Owner records: Who a customer is and what they own, at the front desk. New customer: name, phone and email checked as typed against existing customers; each likely…
  • Sample storage: Where physical items are kept (rooms, freezers, shelves, racks, boxes) and acting on several at once. The storage tree is browsed apart from moving: Move…
  • Sample ledger: Materials used in a record and the containers they came from, plus pooling. Subtracting a used amount writes a stock movement with its unit and the…

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.