mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-29 16:10:07 +00:00
feat(flight-live): a live boarding pass on the web, desktop and phone
The booking dialog and the phone's transport sheet show a flight's moment, both airports with planned and expected times, the route as an arc with the aircraft on it and the numbers of the flight; booking cards and day plan rows get a one-line state with a progress bar. The trip map draws the aircraft in the air on Leaflet and GL, and the admin settings carry the switch. Translated into every language.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import apiClient from './client';
|
||||
|
||||
/**
|
||||
* GET /api/trips/:tripId/flights/live: the live state of every flight leg of a
|
||||
* trip TREK can follow. The answer comes back unparsed; store/flightLiveStore.ts
|
||||
* checks it against the shared contract before anything draws it.
|
||||
*/
|
||||
export const flightLiveApi = {
|
||||
trip: (tripId: number, signal?: AbortSignal): Promise<unknown> =>
|
||||
apiClient.get(`/trips/${tripId}/flights/live`, { signal }).then((response) => response.data as unknown),
|
||||
};
|
||||
@@ -21,6 +21,8 @@ export const HANDLED_OUTSIDE_TRIP_STORE = [
|
||||
'tours:changed',
|
||||
// CW-03: store/tourVisitStore (watchTourVisits) keeps the visits store current.
|
||||
'tours:visits',
|
||||
// store/flightLiveStore (watchFlightLive, mounted by useFlightLiveSync) merges live flight states.
|
||||
'flight:live',
|
||||
// Collab — Collab/MCollab components + useTripWebSocket's collabFileSync
|
||||
'collab:note:created',
|
||||
'collab:note:updated',
|
||||
|
||||
Reference in New Issue
Block a user