fix(mobile): booking routes on the phone map follow the day they run on

A booking switched on with "On map" stayed drawn on every day of the
phone's plan map, so a flight from the first day crossed the map of the
third, although a day chip frames one day and drops the other days' pins.
The plan map now draws such a booking only on the days it runs on, the
arrival day of an overnight one included, and the all-days view still
shows every booking that is switched on. The switch itself stays
trip-wide, and the desktop, collections and the road trip stage draw
exactly as before.

"On map" in a booking's sheet now reads as on only where the plan map
draws the route. From any other day a tap takes the map to the booking's
day, switching the route on when it is off, instead of hiding a route
that is not drawn there anyway.

The phone settings also gain the "Always show booking routes" switch the
desktop already had. As on the desktop it sets the default for trips not
yet touched on this device, so a trip where a route was switched on or
off by hand keeps that choice.
This commit is contained in:
Maurice
2026-09-22 21:09:51 +02:00
parent 1a8d5a3dd9
commit 93dddaa4af
13 changed files with 424 additions and 15 deletions
@@ -386,6 +386,10 @@ export default function MMapArea({ planner, shell }: MMapAreaProps) {
// ride's leg carries no geometry, so without this the road ended at the
// departure terminal and picked up again at the arrival with nothing between.
visibleConnectionIds={onStage ? planner.roadtripConnections : planner.visibleConnections}
// The plan map shows one day, so a booking switched on for another day stays off
// it until that day is picked, or the whole trip is. The switch itself is still
// trip-wide. The stage keeps its seamed rides whatever day they were booked on.
scopeConnectionsToDay={!onStage}
// Transport overlay tap → the mobile transport detail sheet (desktop
// routes this through mapTransportDetail into the day sidebar instead).
onReservationClick={(rid: number) => shell.openSheet('transport', { reservationId: rid })}