Skip to content

Commit 19e56de

Browse files
committed
feat: print students without group on hover
1 parent 46970a1 commit 19e56de

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

hwproj.front/src/components/Courses/Course.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
Menu,
2222
MenuItem,
2323
Stack,
24+
Tooltip,
2425
Typography
2526
} from "@mui/material";
2627
import {CourseExperimental} from "./CourseExperimental";
@@ -316,9 +317,20 @@ const Course: React.FC = () => {
316317
</Grid>
317318
</Grid>
318319
{isCourseMentor && groups.length > 0 && studentsWithoutGroup.length > 0 &&
319-
<Alert severity="info" style={{marginBottom: 15}}>
320-
Студентов, не записанных в группу: {studentsWithoutGroup.length}
321-
</Alert>
320+
<Tooltip
321+
title={
322+
<Box sx={{margin: 0, fontSize: '0.875rem'}}>
323+
{studentsWithoutGroup.map(s => (
324+
<div key={s.userId}>{`${s.surname ?? ""} ${s.name ?? ""} / ${s.email ?? ""}`.trim()}</div>
325+
))}
326+
</Box>
327+
}
328+
arrow
329+
>
330+
<Alert severity="info" style={{marginBottom: 15, cursor: 'pointer'}}>
331+
Студентов, не записанных в группу: {studentsWithoutGroup.length}
332+
</Alert>
333+
</Tooltip>
322334
}
323335
<Tabs
324336
style={{marginBottom: 10}}

0 commit comments

Comments
 (0)