mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
Nawigacja
This commit is contained in:
@@ -21,12 +21,14 @@
|
|||||||
|
|
||||||
<i18n-t keypath="journal.timetable-stats-longest" tag="p">
|
<i18n-t keypath="journal.timetable-stats-longest" tag="p">
|
||||||
<template #id>
|
<template #id>
|
||||||
<router-link :to="`/journal/timetables?timetableId=${data.stats.timetableId}`">{{
|
<router-link :to="`/journal/timetables?timetableId=${data.stats.timetableId}`">
|
||||||
data.stats.timetableId
|
<b>{{ data.stats.timetableId }}</b>
|
||||||
}}</router-link>
|
</router-link>
|
||||||
</template>
|
</template>
|
||||||
<template #author>
|
<template #author>
|
||||||
<b>{{ data.stats.timetableAuthor }}</b>
|
<router-link :to="`/journal/dispatchers?dispatcherName=${data.stats.timetableAuthor}`">
|
||||||
|
<b>{{ data.stats.timetableAuthor }}</b>
|
||||||
|
</router-link>
|
||||||
</template>
|
</template>
|
||||||
<template #driver>
|
<template #driver>
|
||||||
<b>{{ data.stats.timetableDriver }}</b>
|
<b>{{ data.stats.timetableDriver }}</b>
|
||||||
@@ -38,7 +40,9 @@
|
|||||||
|
|
||||||
<i18n-t keypath="journal.timetable-stats-most-active" tag="p">
|
<i18n-t keypath="journal.timetable-stats-most-active" tag="p">
|
||||||
<template #dispatcher>
|
<template #dispatcher>
|
||||||
<b>{{ data.stats.dispatcherName }}</b>
|
<router-link :to="`/journal/dispatchers?dispatcherName=${data.stats.dispatcherName}`">
|
||||||
|
<b>{{ data.stats.dispatcherName }}</b>
|
||||||
|
</router-link>
|
||||||
</template>
|
</template>
|
||||||
<template #count>
|
<template #count>
|
||||||
<b class="text--primary">
|
<b class="text--primary">
|
||||||
@@ -55,7 +59,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { onBeforeRouteUpdate, useRouter } from 'vue-router';
|
|
||||||
import { DataStatus } from '../../scripts/enums/DataStatus';
|
import { DataStatus } from '../../scripts/enums/DataStatus';
|
||||||
import { ITimetablesDailyStats, ITimetablesDailyStatsResponse } from '../../scripts/interfaces/api/StatsAPIData';
|
import { ITimetablesDailyStats, ITimetablesDailyStatsResponse } from '../../scripts/interfaces/api/StatsAPIData';
|
||||||
import { URLs } from '../../scripts/utils/apiURLs';
|
import { URLs } from '../../scripts/utils/apiURLs';
|
||||||
|
|||||||
@@ -136,11 +136,10 @@ export default defineComponent({
|
|||||||
|
|
||||||
// Handle route updates for route-links
|
// Handle route updates for route-links
|
||||||
beforeRouteUpdate(to, from) {
|
beforeRouteUpdate(to, from) {
|
||||||
const timetableId = to.query['timetableId']?.toString();
|
const { timetableId, driverName } = to.query;
|
||||||
|
|
||||||
if (!timetableId) return;
|
if (timetableId) this.searchersValues['search-train'] = `#${timetableId}`;
|
||||||
|
|
||||||
this.searchersValues['search-train'] = `#${timetableId}`;
|
|
||||||
this.searchHistory();
|
this.searchHistory();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user