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:
Thomas Hallock
2025-12-29 16:44:53 -06:00
parent de39ab52cc
commit 5fee1297e1

View File

@@ -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)