diff --git a/frontend/src/components/common/StudentSelectionForm.jsx b/frontend/src/components/common/StudentSelectionForm.jsx index b3c4a05..bd2fe6b 100644 --- a/frontend/src/components/common/StudentSelectionForm.jsx +++ b/frontend/src/components/common/StudentSelectionForm.jsx @@ -14,145 +14,98 @@ export const StudentSelectionForm = ({ selectedStudentNumber, handleStudentNumberChange, }) => { - const SelectorWrapper = ({ label, children }) => ( -
- {label} - {children} -
- ) - - const ConfigurationSelect = ({ - configurations, - selectedConfigurationId, - handleConfigurationChange, - handleGroupChange, - handleStudentNumberChange, - }) => { - return ( - - ) - } - const GroupIsInConfiguration = (group, configurationId) => { return group.configurationId === configurationId } - const GroupSelect = ({ groups, selectedGroupId, handleGroupChange }) => { - return ( - - ) - } - const StudentIsInGroup = (student, group_id) => { return groups.find((g) => g.id === group_id)?.studentIds.includes(student.student_number) } - const StudentSelect = ({ - selectedGroupId, - students, - selectedStudentNumber, - handleStudentNumberChange, - }) => { - return ( - - ) - } - return (
- - - +
+ Select configuration + +
+ {selectedConfigurationId !== 0 && ( - - - +
+ Select group + +
)} + {selectedGroupId !== 0 && ( - - - +
+ Select student + +
)}