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:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user