feat(tours): a city walk's arrivals and opening hours for the day it is on, at each stop in the planner and the detail (CW-02, CW-04)

A city walk now shows, at each stop, when the walk gets there, until when
the stay lasts, and what the stop's opening hours say about that visit. The
same lines appear under each stop row in the planner and under each stop in
the walk's detail, in the user's 12 or 24 hour format. A conflict names the
stop, the arrival, the end of the stay and the hours it was checked against,
for instance "Lenbachhaus closes at 18:00, during the stay from 17:20 to
18:20 (open 10:00 to 18:00)", in the warning colour. Nothing is changed by
these hints: no stop, order or route moves.

The times belong to one day the walk is on. Opened from a day of the plan,
the detail keeps that day, and checking stops off stays bound to it.
Opened otherwise, and in the planner, a small pill above the stops names
the day and its start, and the walk's other days can be picked from it; it
starts on the first day with a start time. The pick is only what is looked
at and is never saved, and another day never takes over the times quietly.
Without a day, a date or a start time the line says what is missing and no
arrival is shown. TREK keeps no time zone on a trip, so start, arrivals and
opening hours are all read as the local time of the plan, and an arrival
after midnight is said to be on the next day without being checked.

Opening hours come from the trip place a stop stands for, as the travellers
entered them, and otherwise from OpenStreetMap; a pill at each stop names
the source, and a notice says the hours are a hint to check. A stop without
hours stays unknown and is never shown as open, hours that are not in a
plain form are shown as written, and an arrival that is only a lower bound,
because a stay before it is not entered yet, is not judged unless no later
arrival could escape the conflict. A trip place that a stop stands for also
gives the stop its name before "Stop N".

The arrival at a stop is found where the route passes it in the walk's
order, so the end of a loop and a stop passed on the way out and back get
the right time. The rules live once in the shared package, for the server
to give the same answers. The walk's detail reads its stops again after a
save, its own or a teammate's.
This commit is contained in:
Maurice
2026-10-20 03:22:11 +00:00
parent 0d7e3ceb3d
commit 2203ff3a2e
48 changed files with 2476 additions and 397 deletions
+23 -3
View File
@@ -531,12 +531,32 @@ const tours: TranslationStrings = {
'tours.walk.themeReason': 'Suggerito per {theme}',
'tours.walk.arrival': 'Arrivo verso le {time}',
'tours.walk.arrivalAtLeast': 'Arrivo non prima delle {time}',
'tours.walk.hours.closed': 'Chiuso alle {arrival} secondo gli orari',
'tours.walk.hours.closes': 'Arrivo {arrival}, sosta fino alle {leave}, ma chiude alle {closes}',
'tours.walk.hours.closed': '{name} è chiuso alle {arrival}, la sosta durerebbe fino alle {leave}; aperto {window}',
'tours.walk.hours.closes':
'{name} chiude alle {closes}, durante la sosta dalle {arrival} alle {leave} (aperto {window})',
'tours.walk.hours.unread': 'Orari non interpretati qui: {text}',
'tours.walk.hours.source':
"Orari come riportati su OpenStreetMap, rispetto all'arrivo stimato; verifica prima di andare. Una tappa senza orari è sconosciuta, non aperta.",
"Orari da OpenStreetMap o dai tuoi luoghi, confrontati con l'arrivo stimato nell'ora locale del piano; verifica prima di andare. Una tappa senza orari è sconosciuta, non aperta.",
'tours.walk.hours.noStart': 'Dai un orario al percorso in questo giorno per vedere arrivi e orari.',
'tours.walk.day.label': 'Orari per',
'tours.walk.day.start': '{day}, partenza alle {time}',
'tours.walk.day.noStart': '{day}, senza orario di partenza',
'tours.walk.hours.noDate': 'Questo giorno non ha una data, quindi arrivi e orari di apertura sono omessi.',
'tours.walk.hours.noDay':
'Metti il percorso in un giorno con un orario di partenza per vedere arrivi e orari di apertura.',
'tours.walk.hours.closedNoStay': '{name} è chiuso alle {arrival}; aperto {window}',
'tours.walk.hours.closedAllDay': '{name} è chiuso tutto il giorno in questa data',
'tours.walk.hours.open': 'Aperto {window}',
'tours.walk.hours.window': 'dalle {from} alle {to}',
'tours.walk.hours.uncertain': 'Orari non verificati: manca ancora la sosta di una tappa precedente.',
'tours.walk.arrivalNextDay':
'Arrivo verso le {time} del giorno dopo; gli orari non vengono verificati oltre la mezzanotte.',
'tours.walk.arrivalStay': 'Arrivo verso le {arrival}, sosta fino alle {leave}',
'tours.walk.arrivalStayAtLeast': 'Arrivo non prima delle {arrival}, sosta fino alle {leave} o oltre',
'tours.walk.hours.sourceOsm': 'OpenStreetMap',
'tours.walk.hours.sourcePlace': 'Luogo del viaggio',
'tours.walk.hours.sourceOsmHint': 'Trovato con la tappa su OpenStreetMap; potrebbe non essere aggiornato.',
'tours.walk.hours.sourcePlaceHint': 'Inserito per questo luogo del viaggio.',
'tours.poi.categoriesNone': 'Nessuna categoria scelta',
'tours.poi.categoriesMore': '{first} +{more}',
'tours.planner.tourType': 'Tipo di tour',