últimas mudanças

This commit is contained in:
2026-06-11 23:59:58 +01:00
parent 3533d3436b
commit 34d7ae8afc
4 changed files with 248 additions and 206 deletions

View File

@@ -41,12 +41,14 @@ class _SignupPageState extends State<SignupPage> {
Future<void> _loadAvailableClasses() async {
setState(() => _isLoadingClasses = true);
try {
print('DEBUG: Loading school_classes from Firestore');
final snapshot = await FirebaseFirestore.instance
.collection('school_classes')
.where('active', isEqualTo: true)
.orderBy('year')
.orderBy('section')
.get();
print('DEBUG: Loaded ${snapshot.docs.length} school classes');
setState(() {
_availableClasses = snapshot.docs.map((doc) {
final data = doc.data();
@@ -55,6 +57,7 @@ class _SignupPageState extends State<SignupPage> {
_isLoadingClasses = false;
});
} catch (e) {
print('DEBUG: Error loading school_classes: $e');
setState(() => _isLoadingClasses = false);
}
}