tela de verificação de turma, possibilidade de alunos entrarem em turmas
This commit is contained in:
@@ -7,6 +7,43 @@
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- **Student Classes List (ETAPA 5)** - Students can now view their enrolled classes on the home page
|
||||
- New `StudentClassesListWidget` at `/lib/features/dashboard/presentation/widgets/student_classes_list_widget.dart`
|
||||
- Query: `.collection('enrollments').where('studentId', isEqualTo: currentUser.uid).orderBy('joinedAt', descending: true)`
|
||||
- For each enrollment, fetches corresponding class document from `classes` collection using `classId`
|
||||
- Layout: Same horizontal 2-row scroll pattern as `TeacherClassesListWidget`
|
||||
- Cards display: Class name + Class code
|
||||
- Loading state: `CircularProgressIndicator` (centered in card while loading class data)
|
||||
- Empty state: Text "Ainda não entraste em nenhuma turma."
|
||||
- Widget inserted in `StudentDashboardPage` after QuickAccessWidget
|
||||
- Visual design: White cards (#FFFFFF), teal icon background (#82C9BD with 10% opacity), rounded corners (16px), subtle shadows
|
||||
- Title: "As Minhas Turmas" (same style as teacher dashboard)
|
||||
- System now bidirectional: Teachers see students, Students see classes
|
||||
|
||||
- **Join Class Feature (ETAPA 4)** - Students can now join classes using class codes
|
||||
- New `JoinClassPage` screen at `/lib/features/classes/presentation/pages/join_class_page.dart`
|
||||
- TextField for entering 6-character class code (uppercase, centered, letter-spacing)
|
||||
- "Entrar na Turma" button with loading state and visual feedback
|
||||
- Firestore query: `.collection('classes').where('code', isEqualTo: enteredCode).limit(1)`
|
||||
- Validation: checks if code exists, if student already enrolled
|
||||
- On success: creates document in `enrollments` collection with `classId`, `studentId`, `studentName`, `joinedAt`
|
||||
- Success feedback: green SnackBar "Entraste na turma com sucesso!"
|
||||
- Error feedback: red SnackBar for invalid code, duplicate enrollment, or auth errors
|
||||
- Auto-returns to student home after successful join
|
||||
- Visual design: teal AppBar (#82C9BD), centered icon, clean input field with rounded corners
|
||||
- New "Entrar numa Turma" card in Student Dashboard Quick Access section
|
||||
- Card design: horizontal layout with `Icons.group_add`, white background, rounded corners
|
||||
|
||||
- **Class Students View (ETAPA 3)** - Teachers can now view enrolled students in each class
|
||||
- New `ClassStudentsPage` screen at `/lib/features/classes/presentation/pages/class_students_page.dart`
|
||||
- StreamBuilder query on `enrollments` collection with filter by `classId`
|
||||
- ListTile layout showing student name and join date
|
||||
- Loading state with `CircularProgressIndicator`
|
||||
- Empty state message when no students enrolled
|
||||
- Date formatting using `intl` package (dd/MM/yyyy format)
|
||||
- Consistent styling with existing app design (teal colors, rounded cards)
|
||||
- Navigation via `MaterialPageRoute` from class card tap
|
||||
|
||||
- **Class Creation Feature (ETAPA 1)** - Teachers can now create classes from the dashboard
|
||||
- New "Criar Turma" button in Teacher Dashboard Quick Actions
|
||||
- Simple dialog interface for entering class name
|
||||
|
||||
Reference in New Issue
Block a user