fix: dropdown kelas ganda — scope forActiveAcademicYear (hanya TA aktif), ikuti filter TA di index; berlaku juga untuk form siswa, import, keluar, mutasi, prestasi, self-service
This commit is contained in:
@@ -27,6 +27,7 @@ class StudentSyncController extends Controller
|
||||
'academicYear:id,name,start_year,end_year,is_active',
|
||||
'department:id,code,name,description,is_active',
|
||||
'classRoom:id,academic_year_id,department_id,name,level,is_active',
|
||||
'parents:id,student_id,relation_type,name,nik,phone_number,is_alive',
|
||||
])
|
||||
->orderBy('full_name')
|
||||
->get([
|
||||
@@ -99,6 +100,17 @@ class StudentSyncController extends Controller
|
||||
'email' => $student->email,
|
||||
'photo_path' => $student->photo_path,
|
||||
'notes' => $student->notes,
|
||||
'parents' => $student->parents
|
||||
->where('is_alive', true)
|
||||
->values()
|
||||
->map(fn ($p) => [
|
||||
'id' => $p->id,
|
||||
'relation' => $p->relation_type,
|
||||
'name' => $p->name,
|
||||
'nik' => $p->nik,
|
||||
'phone_number' => $p->phone_number,
|
||||
])
|
||||
->all(),
|
||||
'updated_at' => $student->updated_at?->toISOString(),
|
||||
];
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user