feat: plan trip

This commit is contained in:
2026-07-13 18:22:58 +02:00
parent 9a97bf6088
commit 69ec5436f8
11 changed files with 228 additions and 28 deletions
+6
View File
@@ -1,6 +1,7 @@
import type {
Feature,
FeatureCollection,
LineString,
MultiLineString,
Point,
} from "geojson";
@@ -12,12 +13,17 @@ export const useMresoStore = defineStore("mresoStore", {
clusters: {} as FeatureCollection<Point>,
stops: {} as FeatureCollection<Point>,
selectedRouteIds: [] as string[],
selectedTrips: [] as Feature<LineString>[],
}),
actions: {
async fetchData(options: { signal?: AbortSignal } = {}) {
[this.routes, this.lines, this.clusters, this.stops] = await Promise.all([
$fetch<Route[]>("/routes.json", options),
$fetch<FeatureCollection<MultiLineString>>("/lines.json", options),
// $fetch<FeatureCollection<MultiLineString>>(
// "/trajets presque clean.geojson",
// options,
// ),
$fetch<FeatureCollection<Point>>("/clusters.json", options),
$fetch<FeatureCollection<Point>>("/stops.json", options),
]);