@@ -93,16 +89,11 @@
|
-
- {{ $t(`status.${station.onlineInfo.statusID}`) }}
- {{
- station.onlineInfo.statusID == 'online' ? timestampToString(station.onlineInfo.statusTimestamp) : ''
- }}
-
-
-
- {{ $t('status.free') }}
-
+
|
@@ -253,6 +244,7 @@ import { useStationFiltersStore } from '../../store/stationFiltersStore';
import { useStore } from '../../store/store';
import Loading from '../Global/Loading.vue';
import { HeadIdsTypes, headIconsIds, headIds } from '../../scripts/data/stationHeaderNames';
+import StationStatusBadge from '../Global/StationStatusBadge.vue';
export default defineComponent({
props: {
@@ -262,7 +254,7 @@ export default defineComponent({
},
},
- components: { Loading },
+ components: { Loading, StationStatusBadge },
mixins: [styleMixin, dateMixin, stationInfoMixin, returnBtnMixin, imageMixin],
data: () => ({
diff --git a/src/components/TrainsView/TrainInfo.vue b/src/components/TrainsView/TrainInfo.vue
index 5f9d3c8..829c87f 100644
--- a/src/components/TrainsView/TrainInfo.vue
+++ b/src/components/TrainsView/TrainInfo.vue
@@ -1,5 +1,5 @@
-
+
@@ -216,10 +186,10 @@ export default defineComponent({
async addHistoryData() {
this.scrollDataLoaded = false;
- const countFrom = this.historyList.length;
+ this.countFromIndex = this.historyList.length;
const responseData: DispatcherHistory[] = await (
- await axios.get(`${DISPATCHERS_API_URL}?${this.currentQuery}&countFrom=${countFrom}`)
+ await axios.get(`${DISPATCHERS_API_URL}?${this.currentQuery}&countFrom=${this.countFromIndex}`)
).data;
if (!responseData) return;
@@ -233,7 +203,7 @@ export default defineComponent({
this.scrollDataLoaded = true;
},
- async fetchHistoryData() {
+ async fetchHistoryData(reset = false) {
const queries: string[] = [];
const dispatcher = this.searchersValues['search-dispatcher'].trim();
@@ -247,7 +217,7 @@ export default defineComponent({
if (station) queries.push(`stationName=${station}`);
if (timestampFrom && timestampTo) queries.push(`timestampFrom=${timestampFrom}`, `timestampTo=${timestampTo}`);
- // Z API: const SORT_TYPES = ['allStopsCount', 'endDate', 'beginDate', 'routeDistance'];
+ // API: const SORT_TYPES = ['allStopsCount', 'endDate', 'beginDate', 'routeDistance'];
if (this.sorterActive.id == 'timestampFrom') queries.push('sortBy=timestampFrom');
else if (this.sorterActive.id == 'duration') queries.push('sortBy=currentDuration');
else queries.push('sortBy=timestampFrom');
@@ -260,6 +230,8 @@ export default defineComponent({
this.currentQueryArray = queries;
try {
+ if (reset) this.dataStatus = DataStatus.Loading;
+
const responseData: DispatcherHistory[] = await (
await axios.get(`${DISPATCHERS_API_URL}?${this.currentQuery}`)
).data;
diff --git a/src/views/JournalTimetables.vue b/src/views/JournalTimetables.vue
index 2cc28a5..48f0048 100644
--- a/src/views/JournalTimetables.vue
+++ b/src/views/JournalTimetables.vue
@@ -21,38 +21,13 @@
-
-
-
- {{ $t('app.offline') }}
-
-
-
-
-
- {{ $t('app.error') }}
-
-
-
- {{ $t('app.no-result') }}
-
-
-
-
-
-
-
-
-
-
- {{ $t('journal.no-further-data') }}
- {{ $t('journal.loading-further-data') }}
+
diff --git a/src/views/StationsView.vue b/src/views/StationsView.vue
index b9d2f73..6aa73ed 100644
--- a/src/views/StationsView.vue
+++ b/src/views/StationsView.vue
@@ -14,7 +14,6 @@
|