Display searched journey on drafting board

This commit is contained in:
2025-06-18 19:42:23 +02:00
parent 597884f5dd
commit 8e3c440d70
3 changed files with 135 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
import { fetchJourneys } from './api.js';
import { attachLocationsSearch } from './locations-search.js';
import { addJourneyToDraftingBoard } from './drafting-board.js';
let element_journeys_search = document.querySelector("#journeys-search");
let element_from = document.querySelector("#journey-search-from");
@@ -28,6 +29,10 @@ function createJourneyElement(journey) {
el.appendChild(createJourneyLegElement(leg));
}
el.addEventListener("click", event => {
addJourneyToDraftingBoard(journey);
});
return el;
}