chore(journal): added synching detailed timetable data with basic

This commit is contained in:
2026-02-17 02:17:32 +01:00
parent 329c85b858
commit 7f315b549e
4 changed files with 50 additions and 33 deletions
@@ -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() {