Skip to content

Commit

Permalink
no trip warning
Browse files Browse the repository at this point in the history
  • Loading branch information
cankurttekin committed Sep 26, 2024
1 parent eab12e4 commit 89427f3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ async function fetchTrips() {
});
}
if (!found) {
//document.getElementById("status").innerHTML = ''
document.getElementById("status").innerHTML += '.';
}
}
Expand Down Expand Up @@ -240,7 +239,7 @@ async function prefetchForHours() {
updateHourDropdown(response.seferSorgulamaSonucList);
} else {
const hourContainer = document.getElementById('hourChoices');
hourContainer.innerHTML = "Station pair does not have any available trip.<br/>Check your preferences and try again.";
hourContainer.innerHTML = "Couldn't find any trip on the given route.";
}
}

Expand All @@ -254,7 +253,7 @@ function updateHourDropdown(trips) {
const arrivalTime = new Date(trips.inisTarih).toTimeString().substring(0, 5);
const tripTime = departureTime + " - " + arrivalTime;
return tripTime
}).sort((a, b) => a.localeCompare(b)); // Sort times
}).sort((a, b) => a.localeCompare(b));

[...new Set(times)].forEach(time => {
const checkbox = document.createElement('input');
Expand Down

0 comments on commit 89427f3

Please sign in to comment.