Update Saqel Platform: 2026-09-02 00:55:56

This commit is contained in:
Hamza-Ayed
2026-09-02 00:55:56 +03:00
parent 1c0cd88a98
commit f4ab43d49a
18 changed files with 409 additions and 214 deletions
@@ -25,27 +25,6 @@ class GuardianController
[$guardianId]
);
// If no children linked (for demo purposes, link up to 3 students so the multi-child UI can be tested)
if (empty($children)) {
$demoStudents = Database::select("SELECT id FROM students LIMIT 3");
if (!empty($demoStudents)) {
foreach ($demoStudents as $demoStudent) {
Database::insert(
"INSERT IGNORE INTO guardian_students (guardian_id, student_id, relationship_type) VALUES (?, ?, 'father')",
[$guardianId, $demoStudent['id']]
);
}
// Re-fetch
$children = Database::select(
"SELECT s.id, s.uuid, s.full_name, s.national_id, s.grade_level, s.stream
FROM students s
JOIN guardian_students gs ON gs.student_id = s.id
WHERE gs.guardian_id = ?",
[$guardianId]
);
}
}
$dashboardData = [];
foreach ($children as $child) {