Update ui/src/components/trainingReport/trainingReportForm.vue

Added a Watcher Code to clear checkboxes when a different training report is picked.
This commit is contained in:
2025-11-24 22:35:47 -06:00
parent b8bf809c14
commit 0d1788500b

View File

@@ -36,6 +36,15 @@ watch(values, (newErrors) => {
console.log(newErrors.attendees) console.log(newErrors.attendees)
}, { deep: true }) }, { deep: true })
watch(() => values.course_id, (newCourseId, oldCourseId) => {
if (!oldCourseId) return;
values.attendees.forEach(a => {
a.passed_bookwork = false;
a.passed_qual = false;
});
});
const submitForm = handleSubmit(onSubmit); const submitForm = handleSubmit(onSubmit);
function toMySQLDateTime(date: Date): string { function toMySQLDateTime(date: Date): string {