reload scenario data on scenario switch
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch } from 'vue'
|
import { ref, onMounted, watch, inject, type Ref } from 'vue'
|
||||||
import { Panel } from 'soleprint-ui'
|
import { Panel } from 'soleprint-ui'
|
||||||
import { apiFetch } from '../config'
|
import { apiFetch } from '../config'
|
||||||
|
|
||||||
|
const scenarioVersion = inject<Ref<number>>('scenarioVersion', ref(0))
|
||||||
|
|
||||||
const activeTab = ref<'flights' | 'crew' | 'notes' | 'maintenance' | 'rebookings'>('flights')
|
const activeTab = ref<'flights' | 'crew' | 'notes' | 'maintenance' | 'rebookings'>('flights')
|
||||||
const flights = ref<any[]>([])
|
const flights = ref<any[]>([])
|
||||||
const crew = ref<any[]>([])
|
const crew = ref<any[]>([])
|
||||||
@@ -79,6 +81,7 @@ const statusColors: Record<string, string> = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(loadAll)
|
onMounted(loadAll)
|
||||||
|
watch(() => scenarioVersion.value, loadAll)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
Reference in New Issue
Block a user