fix(practice): allow teachers to create student profiles
Teachers were only able to add students via family code (EnrollChildModal). This change shows the full AddStudentModal which allows both creating new student profiles and adding existing students via code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -297,14 +297,10 @@ export function PracticeClient({ initialPlayers, viewerId, userId }: PracticeCli
|
||||
}
|
||||
}, [promptEligibleIds, bulkEntryPrompt, showSuccess, showError])
|
||||
|
||||
// Handle add student - different modal for teachers vs parents
|
||||
// Handle add student - show create modal for both teachers and parents
|
||||
const handleAddStudent = useCallback(() => {
|
||||
if (isTeacher) {
|
||||
setShowAddByFamilyCode(true)
|
||||
} else {
|
||||
setShowAddModal(true)
|
||||
}
|
||||
}, [isTeacher])
|
||||
setShowAddModal(true)
|
||||
}, [])
|
||||
|
||||
const handleCloseAddModal = useCallback(() => {
|
||||
setShowAddModal(false)
|
||||
|
||||
Reference in New Issue
Block a user