correções nas turmas e disciplinas

This commit is contained in:
2026-05-16 14:37:27 +01:00
parent 2775205f9e
commit ba4bb7de88
2 changed files with 22 additions and 3 deletions

View File

@@ -90,6 +90,20 @@ class AuthService {
}
}
/// Ler schoolClassId do aluno na Firestore (turma escolar definida no registo)
static Future<String?> getStudentSchoolClassId(String uid) async {
try {
final doc = await _firestore.collection('users').doc(uid).get();
if (doc.exists) {
return doc.data()?['schoolClassId'] as String?;
}
return null;
} catch (e) {
print('DEBUG: Erro ao ler schoolClassId: $e');
return null;
}
}
/// Ler role do usuário na Firestore
static Future<String?> getUserRole(String uid) async {
try {