Display searched journey on drafting board
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user