fix(tours): time a run's stages at its pace and leave a ride's stages untimed

A multi-day run's stages took a share of the foot router's time while the
run itself is timed at the runner's pace, so the stages did not add up to
the run. A ride has no time at all, so its stages have none either.
This commit is contained in:
Maurice
2026-10-20 16:38:42 +02:00
parent f4750352e6
commit ae726ed370
6 changed files with 72 additions and 12 deletions
@@ -552,7 +552,7 @@ export function useTourPlanner({ tripId, active = true, onSaved, canEdit: editPe
: null, [effectiveSpeedKmh, isPaddle, paddleSpeedInvalid, portageSpeedKmh, routedLegLengths])
const stages = useTourStages({
waypoints, line: routeCurrent ? (enrichedGeometry ?? route) : null, tourType, routerSeconds: durationSeconds,
paddle: stagePaddle, commit: commitWaypoints, mayEdit: mayEditPoints,
paddle: stagePaddle, runPaceSecondsPerKm, commit: commitWaypoints, mayEdit: mayEditPoints,
draftKey: `${editingPlaceId ?? 'new'}:${newDraftGeneration}`,
lost: stageLoss,
})