Skip to content

VSN-2810/feat(preparation-planning): wire map sidebar to live API with lazy trip loading

abdellatif elkerbani a demandé de fusionner feature/VSN-2810 vers develop
  • Add fetchPlanningCircuitsMapTree (GET /map/circuits-tree) and fetchPlanningTripsByIds (POST /trips/by-ids) for the map panel.
  • Replace mock getTripsForDate with lazy fetch:
    • Load the lean preparation → circuit → tripIds tree once per date.
    • Fetch full trip DTOs (geometry + stops) only for the picked row, cached by preparedTripId; auto-focus first trip on circuit select.
  • Reset selection + cache + req-ids on date/mode/tab change with notistack toasts and dev-only console.error for fetch failures.
  • Drivers/non-affected map modes use fetchPlanningTripsForDrivers / fetchPlanningUnassignedTrips instead of the mock dataset.
  • Render driver-home marker (driverHomeLat/Lng) and per-trip stroke color cycling through STROKE_PALETTE by index.
  • Normalize routeGeometryEncoded via extractRouteGeometry to handle both legacy encoded polyline strings and the ORS shortest-path object returned by the backend.
  • Swap usager map icon to usager-location.svg; add driver-location.svg.
  • Add PreparationPlanningMapTreeDTO + driverHomeLat/Lng to shared types.

Rapports de requête de fusion