mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-04 05:48:11 +00:00
Poprawki w działaniu ładowania pociągów
This commit is contained in:
@@ -182,7 +182,10 @@
|
|||||||
>Na stacji</span>
|
>Na stacji</span>
|
||||||
|
|
||||||
<span style="color: #FF4646" v-else-if="timetable.stopped">Postój</span>
|
<span style="color: #FF4646" v-else-if="timetable.stopped">Postój</span>
|
||||||
<span style="color: #aaa" v-else-if="!timetable.confirmed">W drodze</span>
|
<span
|
||||||
|
style="color: #aaa"
|
||||||
|
v-else-if="!timetable.confirmed && timetable.currentStationName != stationInfo.stationName"
|
||||||
|
>W drodze</span>
|
||||||
|
|
||||||
<span
|
<span
|
||||||
style="color: red"
|
style="color: red"
|
||||||
@@ -254,8 +257,6 @@ export default class StationCard extends styleMixin {
|
|||||||
|
|
||||||
|
|
||||||
get computedScheduledTrains() {
|
get computedScheduledTrains() {
|
||||||
console.log(this.stationInfo.stationName, "test");
|
|
||||||
|
|
||||||
return this.stationInfo.scheduledTrains.sort((a, b) => {
|
return this.stationInfo.scheduledTrains.sort((a, b) => {
|
||||||
if (a.arrivalTime > b.arrivalTime) return 1;
|
if (a.arrivalTime > b.arrivalTime) return 1;
|
||||||
else if ((a.arrivalTime < b.arrivalTime)) return -1;
|
else if ((a.arrivalTime < b.arrivalTime)) return -1;
|
||||||
|
|||||||
+2
-3
@@ -131,6 +131,7 @@ export default class Store extends VuexModule {
|
|||||||
stopObj.terminatesHere = getTimestamp(point.departureTime) == 0 ? true : false;
|
stopObj.terminatesHere = getTimestamp(point.departureTime) == 0 ? true : false;
|
||||||
stopObj.confirmed = point.confirmed;
|
stopObj.confirmed = point.confirmed;
|
||||||
stopObj.stopped = point.stopped;
|
stopObj.stopped = point.stopped;
|
||||||
|
stopObj.stopTime = point.pointStopTime;
|
||||||
|
|
||||||
acc.push(stopObj);
|
acc.push(stopObj);
|
||||||
}
|
}
|
||||||
@@ -307,7 +308,7 @@ export default class Store extends VuexModule {
|
|||||||
this.trainList = updatedTrainList.reduce((acc, updatedTrain) => {
|
this.trainList = updatedTrainList.reduce((acc, updatedTrain) => {
|
||||||
const trainData = this.trainList.find(train => train.trainNo === updatedTrain.trainNo);
|
const trainData = this.trainList.find(train => train.trainNo === updatedTrain.trainNo);
|
||||||
|
|
||||||
if (trainData) acc.push({ ...updatedTrain, ...trainData });
|
if (trainData) acc.push({ ...trainData, ...updatedTrain });
|
||||||
else acc.push({ ...updatedTrain });
|
else acc.push({ ...updatedTrain });
|
||||||
|
|
||||||
return acc;
|
return acc;
|
||||||
@@ -345,8 +346,6 @@ export default class Store extends VuexModule {
|
|||||||
return acc;
|
return acc;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// console.log('gituwa');
|
|
||||||
|
|
||||||
return { ...station, scheduledTrains };
|
return { ...station, scheduledTrains };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user