Skip to content

Commit 79ef2f5

Browse files
committed
wip
1 parent 047a05b commit 79ef2f5

1 file changed

Lines changed: 0 additions & 23 deletions

File tree

hwproj.front/src/components/Common/GroupSelector.tsx

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@ import {
44
TextField,
55
Autocomplete,
66
Button,
7-
Dialog,
8-
DialogTitle,
9-
DialogContent,
10-
DialogActions,
117
Stack,
12-
Alert,
13-
AlertTitle,
148
CircularProgress,
159
Chip
1610
} from "@mui/material";
@@ -32,8 +26,6 @@ interface GroupSelectorProps {
3226
const GroupSelector: FC<GroupSelectorProps> = (props) => {
3327
const groups = [{id: -1, name: ""}, {id: undefined, name: "Все студенты"}, ...(props.groups || [])]
3428
const selectedGroup = groups.find(g => g.id == props.selectedGroupId)
35-
36-
const [isDialogOpen, setIsDialogOpen] = useState(false);
3729
const [formState, setFormState] = useState<{
3830
name: string,
3931
memberIds: string[]
@@ -57,20 +49,6 @@ const GroupSelector: FC<GroupSelectorProps> = (props) => {
5749
return props.courseStudents.filter((cm) => !studentsInGroups.includes(cm.userId))
5850
}, [groups, props.courseStudents]);
5951

60-
const handleOpenEditDialog = () => {
61-
setFormState({
62-
name: selectedGroup?.name || "",
63-
memberIds: selectedGroup?.studentsIds || []
64-
})
65-
setIsDialogOpen(true)
66-
}
67-
68-
const handleCloseEditDialog = () => {
69-
if (isSubmitting) return;
70-
setIsDialogOpen(false);
71-
setIsError(false);
72-
}
73-
7452
const handleSubmitEdit = async () => {
7553
setIsSubmitting(true);
7654
try {
@@ -97,7 +75,6 @@ const GroupSelector: FC<GroupSelectorProps> = (props) => {
9775
props.onGroupsUpdate();
9876
props.onGroupIdChange(groupId);
9977
}
100-
setIsDialogOpen(false);
10178
} catch (error) {
10279
console.error('Failed to update group:', error);
10380
setIsError(true);

0 commit comments

Comments
 (0)