mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 02:34:21 +00:00
fix(roadtrip): keep the stay on each visit, not on the place (#3092)
A nullable day_assignments.stay_minutes holds the stay of one visit; a visit without one keeps reading the place's duration, so existing trips drive as before. REST PUT /trips/:tripId/assignments/:id/stay and the MCP tool set_assignment_stay write it with day_edit.
This commit is contained in:
@@ -390,7 +390,7 @@ Corridor results include source attribution, distance along/from the route, fail
|
||||
|
||||
Corridor searches include installed search-provider plugins. Providers receive the category and search bounds, and the host filters hits to the route. The response lists successful and failed sources; a failed provider does not discard the remaining results.
|
||||
|
||||
The via tools manage scenic detours and followed tracks. `list_day_boundaries`, `set_day_boundary` and `set_assignment_end_day` manage manual endings; `set_assignment_end_day` is a general assignment tool and is registered whether or not the addon is on. With `roadtrip_hotel_bookends` on, a boundary between two stops that a booked night separates is ignored, because the night ends the day. The Places tool `import_trip_gpx` accepts GPX XML up to one million characters, uses the standard importer and requires places:write. It imports waypoints, routes and tracks without assigning them to days; `export_trip_gpx` exports the trip. Stay durations and place-level time defaults can be cleared with null through `update_place`.
|
||||
The via tools manage scenic detours and followed tracks. `list_day_boundaries`, `set_day_boundary` and `set_assignment_end_day` manage manual endings; `set_assignment_end_day` is a general assignment tool and is registered whether or not the addon is on. With `roadtrip_hotel_bookends` on, a boundary between two stops that a booked night separates is ignored, because the night ends the day. The Places tool `import_trip_gpx` accepts GPX XML up to one million characters, uses the standard importer and requires places:write. It imports waypoints, routes and tracks without assigning them to days; `export_trip_gpx` exports the trip. Stay durations and place-level time defaults can be cleared with null through `update_place`. `set_assignment_stay` gives one visit its own stay, so a place planned twice can be stopped at once and only driven past the other time; null hands the visit back to the place's duration.
|
||||
|
||||
`get_roadtrip_hazards` takes `tripId`. It does not reroute the trip. The shared `roadtrip_show_hazards` setting controls the online map overlay.
|
||||
|
||||
|
||||
+2
-2
@@ -91,7 +91,7 @@ Every stop has a **Stay** badge. Click it to open **Time at this stop**:
|
||||
- Below it, **Arrive** and **Leave** show what the stay does to the day while you change it.
|
||||
- **No stay** clears it.
|
||||
|
||||
**The stay belongs to the place, not to one visit.** A place planned on two days has the same stay on both.
|
||||
**The stay belongs to the visit.** A place planned twice, say once to stop and once only to lead the route past it, keeps a stay for each visit: changing one leaves the other alone. A visit you never gave a stay takes the place's own, so trips planned before this keep the stays they had.
|
||||
|
||||
A stay may run past midnight. The clock carries into the next morning together with the drive from there, and the next stop moves to the card of the day it is actually reached on. With daily travel times set, the hours between one day's end time and the next day's start time count towards the stay, so a twelve hour night that begins at 20:00 is over at 08:00 the next morning.
|
||||
|
||||
@@ -106,7 +106,7 @@ A visit's **End** is the time the drive leaves it. Set it in the place form, whe
|
||||
- If the daily travel times close the day before the End comes, the stop is where that day ends: *The travel day ends before 14:00, so the drive goes on the next morning.*
|
||||
- Clicking the **Stay** badge of such a stop opens the End instead of the slider, with **Remove end time**. After that the stay is yours to choose again. The button is missing when you may not edit the stop, and when the End is stored on the place itself and another visit of the same place relies on it: removing it there would change that visit too.
|
||||
|
||||
The End belongs to one visit; the stay belongs to the place. Older trips can carry an End on the place, which then applies to its visits that have none of their own.
|
||||
The End and the stay both belong to one visit. Older trips can carry an End or a stay on the place, which then applies to its visits that have none of their own.
|
||||
|
||||
## Pinned times and the schedule
|
||||
|
||||
|
||||
Reference in New Issue
Block a user