Poprawiono wygląd widoku pociągów; dodano progress bar

This commit is contained in:
2022-05-17 13:27:21 +02:00
parent 5ecaaaa253
commit 28cb9f3471
3 changed files with 31 additions and 6 deletions
+4
View File
@@ -63,6 +63,10 @@ export default defineComponent({
.join(' > ');
},
currentDistance(stops: TrainStop[]) {
return stops.filter(stop => stop.confirmed).slice(-1)[0]?.stopDistance || 0;
},
confirmedPercentage(stops: TrainStop[]) {
return ((stops.filter((stop) => stop.confirmed).length / stops.length) * 100).toFixed(0);
},