mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 21:38:13 +00:00
chore(journal): added synching detailed timetable data with basic
This commit is contained in:
@@ -138,7 +138,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, defineComponent, onActivated, onMounted, ref, watch } from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import { RouteLocationRaw } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
@@ -167,15 +167,6 @@ const currentHistoryIndex = ref(0);
|
||||
|
||||
const timetableDetails = ref<API.TimetableHistory.Data | null>(null);
|
||||
|
||||
watch(
|
||||
computed(() => props.showExtraInfo),
|
||||
(state) => {
|
||||
if (state == true) {
|
||||
fetchTimetableDetails();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
const stockHistory = computed(() => {
|
||||
return (
|
||||
timetableDetails.value?.stockHistory
|
||||
@@ -231,8 +222,12 @@ async function fetchTimetableDetails() {
|
||||
}
|
||||
}
|
||||
|
||||
function toggleExtraInfo() {
|
||||
emits('toggleExtraInfo', props.timetableId);
|
||||
async function toggleExtraInfo() {
|
||||
if (props.showExtraInfo == false) {
|
||||
await fetchTimetableDetails();
|
||||
}
|
||||
|
||||
emits('toggleExtraInfo', timetableDetails.value);
|
||||
}
|
||||
|
||||
function copyStockToClipboard() {
|
||||
|
||||
Reference in New Issue
Block a user