Cars: drag the Information rows into the order you want
The rows on a car's Information tab now take a drag: they reorder as the
pointer crosses them and the arrangement saves on drop — or on dragend,
since a row released in the gap between rows never produces a drop and
would otherwise revert on the next load. Same native drag events as the
garage, so also pointer-only, and it needs write access.
The order belongs to the car, like the choice of which rows show at all,
so everyone it is shared with sees the same page. It is stored as the
full list of the 14 keys, hidden rows included: a row switched off and
back on returns to where it was rather than to the end. A key the stored
arrangement doesn't mention — a row added in a later release — follows
the arranged ones, the same rule the garage uses for a car added since
the last drag.
fieldOrder rides on the existing PUT /api/cars/{id}/view, which writes
only the lists it is given, so a drag never has to resend what is hidden.
A partial arrangement is accepted; an invented key is still a 400, which
is why normalizeHidden is now normalizeKeys — it validates an order as
well as a switched-off set.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
049da69c83
commit
bc798dae49
@@ -100,6 +100,10 @@ Config (`server/.env`, copy from `.env.example`):
|
||||
the same page; setting it needs write access. Stored as the *hidden* sets, so
|
||||
anything added in a later release is on by default, and the Information tab
|
||||
itself can't be switched off.
|
||||
- **Arranging the Information rows** — the rows on a car's Information tab drag
|
||||
into any order, saved on drop. Also a property of the car, and it covers the
|
||||
hidden rows too, so switching one back on returns it to where it was. Same
|
||||
native drag events as the garage, so also pointer-only.
|
||||
- **Car detail** — all car spec fields (engine / transmission / differential oil,
|
||||
brake fluid, coolant, VIN, fuel type, …) plus tabbed histories, each with an
|
||||
optional file attachment and add/edit/delete gated by your access level:
|
||||
|
||||
Reference in New Issue
Block a user