mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-25 22:27:32 +00:00
fix(calendar): a booking linked to a plan stop gets its zone and is exported once
The calendar feed and the .ics export wrote a restaurant booking linked to a plan stop twice, and the booking's copy without a time zone: - The zone of a booking came only from its own place. A booking whose place is its linked stop (reservations.assignment_id) had none, so its DTSTART and DTEND went out as floating times and calendar apps placed them in the device's zone, an hour early for a London lunch read in Paris. The zone now comes from the booking's place, then its linked stop's place, then the zone all stops of its day or of the trip agree on. Transports keep their endpoint zones and still float when those are unknown, since either end can be in another zone. - The stop and its booking were both emitted (trek-assign-<id> and trek-res-<id>). As for hotels, a stop whose booking yields a timed event on the same day is no longer emitted on its own; the booking event takes over the stop's place as LOCATION, its notes and, when it has none, its end. A booking without a clock, on another day, or still staged leaves the stop as it was, so no event is lost. The VTIMEZONE builder moved unchanged into calendar-timezones.helpers.ts to keep the service under the size cap. Closes #3150
This commit is contained in:
@@ -136,8 +136,8 @@ export interface CalendarReservationRow extends ReservationAllColumnsRow {
|
||||
type CalendarReservationKyselyDB = Pick<DB, 'reservations' | 'places' | 'day_accommodations' | 'days'>;
|
||||
|
||||
/**
|
||||
* CL4 (`CalendarService.buildTripCalendar`'s assignment read, for every dated
|
||||
* day at once) — `SELECT da.*, p.name as place_name, p.address as
|
||||
* CL4 (`CalendarService.buildTripCalendar`'s assignment read, for every day
|
||||
* of the trip at once, undated ones for a linked booking's zone) — `SELECT da.*, p.name as place_name, p.address as
|
||||
* place_address, p.lat as place_lat, p.lng as place_lng, COALESCE(da.stay_minutes,
|
||||
* p.duration_minutes) as place_duration_minutes, COALESCE(da.assignment_time, p.place_time) as
|
||||
* effective_time, COALESCE(da.assignment_end_time, p.end_time) as
|
||||
|
||||
Reference in New Issue
Block a user