update report list on submit
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user