Locations
Это содержимое пока не доступно на вашем языке.
A location is a physical (or logical) place where a car sits — your Korea yard, the Libya unloading dock, an in-transit slot, your sold-cars history bucket. Locations are operator-curated per company; there’s no platform-wide list.
Two axes for cars
Section titled “Two axes for cars”A car has two orthogonal location-like dimensions:
| Dimension | What it is | When it changes |
|---|---|---|
locationId | Physical place. FK to car_locations. | Operator sets manually (inline dropdown on Cars page). Auto-set on arrival from container’s destinationLocationId. |
status | Lifecycle phase. Enum. | Server-derived from named actions. See Status workflow. |
A car can be arrived status + Korea Yard location (it arrived back at origin for re-sale), or purchased status + In Transit location (you’re moving it to a different yard). The two don’t have to align.
Status buckets
Section titled “Status buckets”For locations, status maps to one of four buckets:
| Status | Bucket |
|---|---|
purchased | purchased |
shipped | shipped |
arrived | arrived |
sold_locally / sold_import | sold |
cancelled | (no bucket — won’t show location picker) |
Each location is configured for which buckets it applies to. A “Korea Yard” location might only apply to purchased, while “In Transit Pacific” only applies to shipped. The inline location dropdown filters options by the car’s current bucket.
Per-location ACL (when enforced)
Section titled “Per-location ACL (when enforced)”Locations are also the action-ACL primitive for cars. Each role gets per-location flags:
canSee— see cars at this location incars.list.canEdit— edit cars at this location (inline pencil, costs, etc.).canMoveOut— initiate a location change away from here.canReceive— accept a location change to here.canSell— issue an invoice for a car currently at this location.
A Korea sales rep bound only to “Korea Yard” can’t see, edit, or sell cars at the Libya yard — even if they have cars:edit = true at the section level. Container booking with a destination location requires canReceive on the target.
Inactive locations
Section titled “Inactive locations”You can deactivate a location instead of deleting it (preserves historical references). Inactive locations stay visible in dropdowns only on cars where they’re still the selected value — they don’t pollute the picker for new cars.