fix: Rewrite getConversations query to guarantee all students appear for teacher without complex join dependencies

This commit is contained in:
Hamza-Ayed
2026-08-27 11:48:42 +03:00
parent e1a75e71ab
commit 9e9417f937
2 changed files with 59 additions and 60 deletions
+10
View File
@@ -671,9 +671,19 @@ class TeacherPortal
const data = await res.json();
if (res.ok && data.status === 'success') {
renderConversations(data.data);
} else {
console.warn('Load convs returned:', data);
const container = document.getElementById('conv_list_container');
if (container) {
container.innerHTML = '<div style="padding: 20px; text-align: center; color: var(--text-muted); font-size: 12px;">' + (data.message || 'لا توجد محادثات نشطة') + '</div>';
}
}
} catch (e) {
console.error('Load convs error:', e);
const container = document.getElementById('conv_list_container');
if (container) {
container.innerHTML = '<div style="padding: 20px; text-align: center; color: #F87171; font-size: 12px;">تعذر تحميل المحادثات (خطأ في الاتصال)</div>';
}
}
}