Improve datastore about cached trip details

This commit is contained in:
2025-07-05 23:47:25 +02:00
parent 433157278d
commit 6571d053e0
4 changed files with 67 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
import { fetchJourneys } from './api.js';
import { attachLocationsSearch } from './locations-search.js';
import { addJourneyToDraftingBoard } from './drafting-board.js';
import { DataStore } from './datastore.js';
let element_journeys_search = document.querySelector("#journeys-search");
let element_from = document.querySelector("#journey-search-from");
@@ -26,6 +27,7 @@ function createJourneyElement(journey) {
let el = document.createElement("div");
for (let leg of journey.legs) {
DataStore.locations.rememberAllIfNotExist([leg.origin, leg.destination]);
el.appendChild(createJourneyLegElement(leg));
}