mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
Naprawiono liczbę rozkładów dla scenerii
This commit is contained in:
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<span class="schedules">
|
<span class="schedules">
|
||||||
<img :src="timetableIcon" alt="icon-timetable" />
|
<img :src="timetableIcon" alt="icon-timetable" />
|
||||||
<span v-if="stationInfo.scheduledTrains">
|
<span>
|
||||||
<span style="color: #eee">{{
|
<span style="color: #eee">{{
|
||||||
stationInfo.scheduledTrains.length
|
stationInfo.scheduledTrains.length
|
||||||
}}</span>
|
}}</span>
|
||||||
|
|||||||
@@ -18,7 +18,11 @@
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
class="checkpoints"
|
class="checkpoints"
|
||||||
v-if="stationInfo && stationInfo.online && stationInfo.checkpoints"
|
v-if="
|
||||||
|
stationInfo &&
|
||||||
|
stationInfo.scheduledTrains.length > 0 &&
|
||||||
|
stationInfo.checkpoints
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="checkpoint_item btn--text"
|
class="checkpoint_item btn--text"
|
||||||
@@ -31,9 +35,9 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="timetable-item loading" v-if="dataStatus == 0">{{
|
<span class="timetable-item loading" v-if="dataStatus == 0">
|
||||||
$t("app.loading")
|
{{ $t("app.loading") }}
|
||||||
}}</span>
|
</span>
|
||||||
|
|
||||||
<span
|
<span
|
||||||
class="timetable-item empty"
|
class="timetable-item empty"
|
||||||
@@ -203,7 +207,7 @@ export default defineComponent({
|
|||||||
methods: {
|
methods: {
|
||||||
loadSelectedOption() {
|
loadSelectedOption() {
|
||||||
if (!this.stationInfo) return;
|
if (!this.stationInfo) return;
|
||||||
if (!this.stationInfo.checkpoints) return;
|
if (this.stationInfo.checkpoints.length == 0) return;
|
||||||
if (this.selectedCheckpoint != "") return;
|
if (this.selectedCheckpoint != "") return;
|
||||||
|
|
||||||
this.selectedCheckpoint = this.stationInfo.checkpoints[0].checkpointName;
|
this.selectedCheckpoint = this.stationInfo.checkpoints[0].checkpointName;
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import Train from "./Train";
|
|
||||||
import ScheduledTrain from "./ScheduledTrain";
|
import ScheduledTrain from "./ScheduledTrain";
|
||||||
|
|
||||||
export default interface Station {
|
export default interface Station {
|
||||||
@@ -37,12 +36,10 @@ export default interface Station {
|
|||||||
twoWay: { catenary: number; noCatenary: number };
|
twoWay: { catenary: number; noCatenary: number };
|
||||||
};
|
};
|
||||||
|
|
||||||
checkpoints:
|
checkpoints: {
|
||||||
| {
|
checkpointName: string;
|
||||||
checkpointName: string;
|
scheduledTrains: ScheduledTrain[];
|
||||||
scheduledTrains: ScheduledTrain[];
|
}[];
|
||||||
}[]
|
|
||||||
| null;
|
|
||||||
|
|
||||||
stops: string[] | null;
|
stops: string[] | null;
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -264,7 +264,7 @@ export const store = createStore<State>({
|
|||||||
noCatenary: station[13] as number
|
noCatenary: station[13] as number
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
checkpoints: station[14] ? (station[14] as string[]).map(sub => ({ checkpointName: sub, scheduledTrains: [] })) : null,
|
checkpoints: station[14] ? (station[14] as string[]).map(sub => ({ checkpointName: sub, scheduledTrains: [] })) : [],
|
||||||
stops: station[15] as string[],
|
stops: station[15] as string[],
|
||||||
|
|
||||||
default: station[16] as boolean,
|
default: station[16] as boolean,
|
||||||
@@ -385,9 +385,11 @@ export const store = createStore<State>({
|
|||||||
if (stopName.includes(stationName) && !stop.stopName.includes("po.") && !stop.stopName.includes("podg.")) return true;
|
if (stopName.includes(stationName) && !stop.stopName.includes("po.") && !stop.stopName.includes("podg.")) return true;
|
||||||
if (stationName.includes(stopName) && !stop.stopName.includes("po.") && !stop.stopName.includes("podg.")) return true;
|
if (stationName.includes(stopName) && !stop.stopName.includes("po.") && !stop.stopName.includes("podg.")) return true;
|
||||||
if (stopName.includes("podg.") && stopName.split(", podg.")[0] && stationName.includes(stopName.split(", podg.")[0])) return true;
|
if (stopName.includes("podg.") && stopName.split(", podg.")[0] && stationName.includes(stopName.split(", podg.")[0])) return true;
|
||||||
|
// if (stationName)
|
||||||
// if (station.stops && station.stops.includes(stop.stopNameRAW)) return true;
|
// if (station.stops && station.stops.includes(stop.stopNameRAW)) return true;
|
||||||
|
|
||||||
|
if (station.checkpoints.length > 0 && station.checkpoints.some(cp => cp.checkpointName.includes(stop.stopNameRAW))) return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user