update report list on submit
This commit is contained in:
@@ -44,8 +44,12 @@ function createTrainingReport() {
|
|||||||
sidePanel.value = sidePanelState.create;
|
sidePanel.value = sidePanelState.create;
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
async function loadTrainingReports() {
|
||||||
trainingReports.value = await getTrainingReports();
|
trainingReports.value = await getTrainingReports();
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
loadTrainingReports();
|
||||||
loaded.value = true;
|
loaded.value = true;
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@@ -132,7 +136,7 @@ onMounted(async () => {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="overflow-y-auto max-h-[70vh] mt-5 scrollbar-themed">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user