gerenciamento e criação de turmas junto de correções na tela de professores
This commit is contained in:
@@ -6,6 +6,47 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- **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
|
||||
- Automatic generation of 6-character unique class codes (A-Z, 0-9)
|
||||
- Firestore integration saving class data (name, teacherId, code, timestamp)
|
||||
- Visual feedback with loading indicator and success/error messages
|
||||
|
||||
- **Classes List Display (ETAPA 2)** - Teachers can now view their created classes
|
||||
- New "As Minhas Turmas" section in Teacher Dashboard
|
||||
- Real-time StreamBuilder to fetch classes from Firestore
|
||||
- **CORREÇÃO**: O erro anterior foi tentar usar `GridView` horizontal para um layout que exige colunas fixas
|
||||
- **SOLUÇÃO**: Usar `ListView.builder` com `scrollDirection: Axis.horizontal`
|
||||
- Cada item do ListView é uma `Column` contendo 2 cards (índice * 2 e índice * 2 + 1)
|
||||
- Cards mantêm exatamente o mesmo tamanho e estilo da lista vertical original
|
||||
- Layout: Card 1, 3, 5... (top row) | Card 2, 4, 6... (bottom row)
|
||||
- Scroll horizontal para visualizar todas as turmas
|
||||
- Visual cards showing class name and access code
|
||||
- Empty state message when no classes exist
|
||||
- Loading state with CircularProgressIndicator
|
||||
|
||||
### Fixed
|
||||
- **Unified Quick Action Cards Text Style**
|
||||
- "Upload Conteúdo" and "Criar Quiz" cards now match "Criar Turma" text alignment
|
||||
- All cards use `Column` with `crossAxisAlignment: CrossAxisAlignment.start` for text section
|
||||
- Subtitle text supports 2 lines with `maxLines: 2` and `height: 1.2`
|
||||
- Consistent typography: title fontSize 16, subtitle fontSize 12
|
||||
- "Criar Quiz" subtitle changed to "Avaliações interativas"
|
||||
|
||||
- **Pixel Overflow in Classes List Widget**
|
||||
- **Causa**: Tentativa de usar `GridView` horizontal para layout de colunas fixas
|
||||
- **Solução**: Substituir por `ListView.builder` com `scrollDirection: Axis.horizontal`
|
||||
- Cada item do ListView é uma `Column` com 2 cards (índice * 2 e índice * 2 + 1)
|
||||
- Cards mantêm tamanho original da lista vertical (sem constraints artificiais)
|
||||
- Altura do SizedBox: 280 pixels (suficiente para 2 cards + spacing)
|
||||
|
||||
- **Pixel Overflow in Teacher Dashboard Cards**
|
||||
- Replaced fixed height constraints with flexible `BoxConstraints(minHeight: 135, maxHeight: 160)`
|
||||
- Fixed overflow issues in "Upload Conteúdo" and "Criar Turma" cards
|
||||
- Cards now properly adapt to different screen sizes and content
|
||||
|
||||
### Planned Features
|
||||
- Voice interaction capabilities
|
||||
- Advanced analytics dashboard
|
||||
|
||||
@@ -404,6 +404,43 @@ This document tracks the overall progress of the AI Study Assistant project deve
|
||||
|
||||
### **Last 24 Hours:**
|
||||
|
||||
- ✅ **ETAPA 2: Classes List Display** - Teachers can now view their created classes
|
||||
- New `TeacherClassesListWidget` component
|
||||
- "As Minhas Turmas" section added to Teacher Dashboard
|
||||
- Real-time Firestore stream with `StreamBuilder`
|
||||
- Query: `.where('teacherId', isEqualTo: currentUser.uid).orderBy('createdAt', descending: true)`
|
||||
- **CORREÇÃO**: O erro anterior foi tentar usar `GridView` horizontal para um layout que exige colunas fixas de 2 cards
|
||||
- **SOLUÇÃO**: Usar `ListView.builder` com `scrollDirection: Axis.horizontal`
|
||||
- Cada item do ListView é uma `Column` com 2 cards (índice * 2 e índice * 2 + 1)
|
||||
- Cards mantêm exatamente o mesmo tamanho da lista vertical original
|
||||
- Layout: Card 1, 3, 5... (top row) | Card 2, 4, 6... (bottom row)
|
||||
- Scroll horizontal para visualizar todas as turmas
|
||||
- Padding entre colunas: 12 pixels
|
||||
- Altura do SizedBox: 280 pixels (suficiente para 2 cards + spacing)
|
||||
- Empty state: "Ainda não criaste nenhuma turma."
|
||||
- Loading state with `CircularProgressIndicator`
|
||||
- Cards styled with white background, rounded corners, and subtle shadow
|
||||
|
||||
- ✅ **Fixed Pixel Overflow Issues** - Teacher Dashboard cards
|
||||
- Replaced fixed `height: 150` with `BoxConstraints(minHeight: 135, maxHeight: 160)`
|
||||
- Fixed overflow in "Criar Turma" card
|
||||
- Fixed overflow in "Upload Conteúdo" card
|
||||
- Cards now adapt better to different screen sizes
|
||||
|
||||
- ✅ **Unified Quick Action Cards Text Style**
|
||||
- "Upload Conteúdo" and "Criar Quiz" cards now have same text alignment as "Criar Turma"
|
||||
- All cards use `Column` with `crossAxisAlignment: CrossAxisAlignment.start` for text
|
||||
- Subtitle text now supports 2 lines with `maxLines: 2` and proper line height (1.2)
|
||||
- Consistent fontSize (16 for title, 12 for subtitle) across all cards
|
||||
- "Criar Quiz" subtitle updated to "Avaliações interativas" for better description
|
||||
|
||||
- ✅ **ETAPA 1: Class Creation Feature** - Teacher can now create classes
|
||||
- Added "Criar Turma" button in Teacher Dashboard
|
||||
- Dialog for entering class name
|
||||
- Auto-generates 6-character random code (A-Z, 0-9)
|
||||
- Saves to Firestore `classes` collection with name, teacherId, code, createdAt
|
||||
- Success/error feedback via SnackBar
|
||||
|
||||
- ✅ Fixed dashboard overflow issue in QuickAccessWidget
|
||||
|
||||
- ✅ Implemented responsive layout with IntrinsicHeight and Flexible
|
||||
|
||||
Reference in New Issue
Block a user