Skip to main content

Vehicles

Vehicles lists and updates vehicle operational data used by transport rounds, mileage checks, load capacity, and availability. Transport creation should use current vehicle status rather than stale list data.

App Entry Points

AppTarget
MobileVehicleList
POS Terminalvehicle -> VehicleDetailForm

Workflow

Data Rules

Status Update Flow

ActionRule
Search/listPagination is normalized and duplicate plates are removed before display.
StatusOnly UNCHECKED, READY, and NOT_READY are persisted by the UI.
SaveCalls updateVehicleStatus; do not mutate the list optimistically without checking the server response.
MileageMileage balance is read during transport start/finish and is not edited by this status form.
Transport selectionNon-ready status must be checked again when selecting the vehicle because list data may be stale.
RuleBehavior
List sourcegetVehicles({ page, search }) from common services.
DedupeTerminal split list dedupes by licensePlate.
Status normalizationUnknown status defaults to READY; explicit UNCHECKED and NOT_READY are preserved.
MileagegetVehicleMileage supports mileage checks around transport operations.
Transport dependencyTransport header uses license plate/driver data and should respect readiness.

Permissions And Guards

TopicBehavior
Terminal menu keyvehicle
deptCode menu set-2, 1, 2, 3, 4, 7, 29, 21, 8, 9, 27
Branch ruleUses the same permission family as employee/operations access.
Operational guardDo not assign unavailable vehicles to active transport rounds.

Mobile vs POS Terminal

TopicMobilePOS Terminal
NavigationVehicleListHomeScreen split-pane menu key vehicle
DetailList-centered vehicle viewVehicleDetailForm
Status editVehicle list/detail actionsDetail form actions
Transport useSelected in transport flowUsed by TransportDetailForm

Developer Handoff Map

AreaCode
Mobile listapps/mobile/src/screens/vehicleStack/vehicleListScreen/index.tsx
Terminal detailapps/pos-terminal/src/screens/HomeScreen/VehicleDetailForm.tsx
Common servicegetVehicles, updateVehicleStatus, getVehicleMileage in services/common.ts
Transport dependencyTransportDetailForm.tsx