diff --git a/backend/templates/directeur.html b/backend/templates/directeur.html index 74c0add..a13bf8d 100644 --- a/backend/templates/directeur.html +++ b/backend/templates/directeur.html @@ -301,6 +301,20 @@ +
+ +
+ + + + + + + + + +
+
@@ -513,8 +527,9 @@ function applyFilters() { if (!overviewData) return; const vakFilter = document.getElementById('filterVak').value; const teacherFilter = document.getElementById('filterTeacher').value; - const statusFilter = document.getElementById('filterStatus').value; - const search = document.getElementById('filterSearch').value.toLowerCase(); + const statusFilter = document.getElementById('filterStatus').value; + const search = document.getElementById('filterSearch').value.toLowerCase(); + const leeftijdFilter = [...document.querySelectorAll('.leeftijd-checkbox input:checked')].map(cb => cb.value); const shownTeachers = teacherFilter === 'all' ? overviewData.teachers @@ -535,6 +550,7 @@ function applyFilters() { shownVakken.forEach(vakId => { (allGoals[vakId] || []).forEach(goal => { if (search && !`${goal.goNr} ${goal.inhoud}`.toLowerCase().includes(search)) return; + if (leeftijdFilter.length > 0 && !leeftijdFilter.some(l => (goal.leeftijden||[]).includes(l))) return; const statussen = shownTeachers.map(t => { return overviewData.assessments_by_teacher[t.id]?.[vakId]?.[goal.id] || '';