feat(transport): support multi-leg (layover) flights in the booking form

A flight booking can now hold an ordered chain of airports (e.g. FRA -> BER ->
HND) instead of a single departure/arrival pair. The route is entered as a list
of waypoints with a '+ add stop' button; each stop carries its own arrival and
departure time plus the airline/flight number of the segment leaving it, while
the whole booking keeps one price.

Stored without a schema change: the existing reservation_endpoints rows carry the
ordered waypoints (from/stop/to by sequence) and a metadata.legs array holds the
per-leg detail. Top-level metadata (departure_airport/arrival_airport/airline/
flight_number) mirrors the first and last leg, so a single-leg flight persists
exactly as before and legacy readers keep working.
This commit is contained in:
Maurice
2026-06-11 15:38:48 +02:00
parent 3c040fab11
commit 219ba78219
3 changed files with 335 additions and 105 deletions
+5
View File
@@ -27,6 +27,11 @@ const reservations: TranslationStrings = {
'reservations.meta.flightNumber': 'Flight No.',
'reservations.meta.from': 'From',
'reservations.meta.to': 'To',
'reservations.layover.route': 'Route',
'reservations.layover.stop': 'Stop',
'reservations.layover.addStop': 'Add stop',
'reservations.layover.connection': 'Connection',
'reservations.layover.layover': 'Layover',
'reservations.needsReview': 'Review',
'reservations.needsReviewHint':
'Airport could not be matched automatically — please confirm the location.',