add class progress and fix endpoints
This commit is contained in:
@@ -162,7 +162,7 @@ class StudentDirectoryService
|
||||
];
|
||||
}
|
||||
|
||||
public function listStudents(?string $schoolYear = null): array
|
||||
public function listStudents(?string $schoolYear = null, ?array $parentIds = null): array
|
||||
{
|
||||
$context = $this->configService->context();
|
||||
$selectedYear = $schoolYear ?: (string) ($context['school_year'] ?? '');
|
||||
@@ -189,6 +189,7 @@ class StudentDirectoryService
|
||||
'school_year',
|
||||
])
|
||||
->when($selectedYear !== '', fn ($q) => $q->where('school_year', $selectedYear))
|
||||
->when(!empty($parentIds), fn ($q) => $q->whereIn('parent_id', $parentIds))
|
||||
->orderBy('lastname')
|
||||
->orderBy('firstname')
|
||||
->get()
|
||||
|
||||
Reference in New Issue
Block a user