Commit graph

6 commits

Author SHA1 Message Date
kianiadee
74f1ef268f feat(markers): department-colour square + arrow for vehicles active within 24h
High-level fleet-activity read: parked vehicles (reported within 24h) now take
their cost-centre colour as a SQUARE (same 32px as the circle) with the heading
arrow, instead of a flat grey circle. Moving-now stays a coloured circle; only
offline (>24h silent) stays grey. Verified per-state: active=circle, parked=
square+arrow, offline=grey circle.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 10:18:25 +03:00
kianiadee
2237757369 docs: document filters (plate A→Z, cost centre, assigned city, time) + zoom-scaled markers
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 10:09:52 +03:00
kianiadee
b930582dc8 feat(filters): sort number plates A→Z + add assigned-city filter
- Number-plate dropdown now sorted alphabetically (natural/numeric, placeholder
  pinned), re-sorted as live-discovered plates are added.
- New 'Assigned city' filter: populated from the API + live feed, filters the
  live map instantly (with cost centre + plate), auto-fills from a picked
  vehicle, and is passed to the trips query (assigned_city).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 23:23:57 +03:00
kianiadee
135253d37d feat(live): zoom-relative marker sizing + live plate/cost-centre filtering
- Markers now scale with zoom (--veh-scale, ~0.42 at z5 → 1.20 at z14) via a
  transform on .veh-inner, so they no longer bloat at country zoom; pins stay
  anchored on their coordinate (verified 0px drift).
- Selecting a plate or cost centre now filters the LIVE markers immediately and
  recomputes the header KPIs (previously the filter card only fed Show trips, so
  selections didn't reflect on the live map). Time period still applies to trips.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 23:01:30 +03:00
kianiadee
50163536e3 fix(markers): stop wiping MapLibre's marker class (markers stacked in flow)
Re-setting el.className each render dropped the maplibregl-marker class
(position:absolute), so live markers fell into document flow and stacked
+32px each — vehicles drifted south, worse when zoomed out, dragging their
plate labels with them. Use classList (preserve maplibregl-marker) and wrap
pin+plate in a .veh-inner positioning context so a class change can't reflow.

Verified: every marker now projects to dX=0,dY=0 on its coordinate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 22:45:41 +03:00
kianiadee
3d420fa82e feat: FleetNow merged live+trips map SPA (nginx/Coolify)
Single-file MapLibre SPA merging live vehicle positions and historical
trips into one console. Reads the existing dashboard read-API
(fleetapi.rahamafresh.com); served as a static nginx image for Coolify.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 21:56:01 +03:00