update report list on submit

This commit is contained in:
2025-11-20 11:08:57 -05:00
parent aaec72af7e
commit 23ebbe7a85

View File

@@ -44,8 +44,12 @@ function createTrainingReport() {
sidePanel.value = sidePanelState.create;
}
onMounted(async () => {
async function loadTrainingReports() {
trainingReports.value = await getTrainingReports();
}
onMounted(async () => {
loadTrainingReports();
loaded.value = true;
})
</script>
@@ -132,7 +136,7 @@ onMounted(async () => {
</button>
</div>
<div class="overflow-y-auto max-h-[70vh] mt-5 scrollbar-themed">
<TrainingReportForm class="w-full" @submit="(newID) => viewTrainingReport(newID)"></TrainingReportForm>
<TrainingReportForm class="w-full" @submit="(newID) => {viewTrainingReport(newID); loadTrainingReports()}"></TrainingReportForm>
</div>
</div>
</div>