mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-30 00:20:07 +00:00
4796615439
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.
12 lines
483 B
TypeScript
12 lines
483 B
TypeScript
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),
|
|
};
|