Skip to content

Commit 3685b72

Browse files
committed
wip
1 parent 1a69c9f commit 3685b72

1 file changed

Lines changed: 2 additions & 46 deletions

File tree

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

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ interface GroupSelectorProps {
3030
}
3131

3232
const GroupSelector: FC<GroupSelectorProps> = (props) => {
33-
const groups = [{id: -1, name: "Новая группа"}, {id: undefined, name: "Все студенты"}, ...(props.groups || [])]
33+
const groups = [{id: -1, name: ""}, {id: undefined, name: "Все студенты"}, ...(props.groups || [])]
3434
const selectedGroup = groups.find(g => g.id === props.selectedGroupId)
3535

3636
const [isDialogOpen, setIsDialogOpen] = useState(false);
@@ -137,7 +137,7 @@ const GroupSelector: FC<GroupSelectorProps> = (props) => {
137137
<TextField
138138
{...params}
139139
label="Группа"
140-
placeholder="Выберите группу"
140+
placeholder="Введите название группы"
141141
variant="outlined"
142142
/>
143143
)}
@@ -200,50 +200,6 @@ const GroupSelector: FC<GroupSelectorProps> = (props) => {
200200
</Button>
201201
</Stack>
202202
</Grid>}
203-
<Dialog
204-
fullWidth
205-
maxWidth="sm"
206-
open={isDialogOpen}
207-
onClose={handleCloseEditDialog}
208-
>
209-
<DialogTitle>
210-
{selectedGroup ? "Редактировать группу" : "Создать группу"}
211-
</DialogTitle>
212-
<DialogContent>
213-
{isError && (
214-
<Alert severity="error" style={{marginBottom: 16}}>
215-
<AlertTitle>Ошибка</AlertTitle>
216-
Не удалось {selectedGroup ? "создать" : "обновить"} группу. Попробуйте позже.
217-
</Alert>
218-
)}
219-
<Grid container spacing={2} style={{marginTop: 4}}>
220-
<Grid item xs={12}>
221-
<TextField
222-
fullWidth
223-
required
224-
label="Название группы"
225-
value={formState.name}
226-
onChange={(e) => {
227-
setFormState(prev => ({
228-
...prev,
229-
name: e.target.value
230-
}))
231-
}}
232-
disabled={isSubmitting || props.choiceDisabled}
233-
/>
234-
</Grid>
235-
</Grid>
236-
</DialogContent>
237-
<DialogActions>
238-
<Button
239-
onClick={handleCloseEditDialog}
240-
color="inherit"
241-
disabled={isSubmitting}
242-
>
243-
Отменить
244-
</Button>
245-
</DialogActions>
246-
</Dialog>
247203
</Grid>)
248204
}
249205

0 commit comments

Comments
 (0)