reload scenario data on scenario switch

This commit is contained in:
2026-04-16 16:46:48 -03:00
parent a8e55a4a8d
commit df43c58028

View File

@@ -1,8 +1,10 @@
<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 { apiFetch } from '../config'
const scenarioVersion = inject<Ref<number>>('scenarioVersion', ref(0))
const activeTab = ref<'flights' | 'crew' | 'notes' | 'maintenance' | 'rebookings'>('flights')
const flights = ref<any[]>([])
const crew = ref<any[]>([])
@@ -79,6 +81,7 @@ const statusColors: Record<string, string> = {
}
onMounted(loadAll)
watch(() => scenarioVersion.value, loadAll)
</script>
<template>