Skip to content

Commit 03b1cf9

Browse files
committed
wip
1 parent 0e7d930 commit 03b1cf9

2 files changed

Lines changed: 20 additions & 7 deletions

File tree

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';
3636
import SwitchAccessShortcutIcon from '@mui/icons-material/SwitchAccessShortcut';
3737
import Lodash from "lodash";
3838
import {CourseUnitType} from "@/components/Files/CourseUnitType";
39+
import GroupIcon from '@mui/icons-material/Group';
3940

4041
interface ICourseExperimentalProps {
4142
homeworks: HomeworkViewModel[]
@@ -573,13 +574,17 @@ export const CourseExperimental: FC<ICourseExperimentalProps> = (props) => {
573574
}
574575
}))
575576
}}>
576-
<Typography variant="h6" style={{fontSize: 18}} align={"center"}
577-
color={x.isDeferred
578-
? "textSecondary"
579-
: x.tags!.includes(TestTag) ? "primary" : "textPrimary"}>
580-
{isMentor && renderHomeworkStatus(x)}
581-
{x.title}{getTip(x)}
582-
</Typography>
577+
<Stack direction={"column"} alignItems={"center"}>
578+
{x.groupId && <GroupIcon fontSize={"small"}
579+
color={x.isDeferred ? "disabled" : x.tags!.includes(TestTag) ? "primary" : "action"}/>}
580+
<Typography variant="h6" style={{fontSize: 18}} align={"center"}
581+
color={x.isDeferred
582+
? "textSecondary"
583+
: x.tags!.includes(TestTag) ? "primary" : "textPrimary"}>
584+
{isMentor && renderHomeworkStatus(x)}
585+
{x.title}{getTip(x)}
586+
</Typography>
587+
</Stack>
583588
{x.isDeferred && !x.publicationDateNotSet &&
584589
<Typography style={{fontSize: "14px"}} align={"center"}>
585590
{"🕘 " + renderDate(x.publicationDate!) + " " + renderTime(x.publicationDate!)}

hwproj.front/src/components/Homeworks/CourseHomeworkExperimental.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ const CourseHomeworkExperimental: FC<{
455455
const tasksCount = homework.tasks!.length
456456
const [showEditMode, setShowEditMode] = useState(false)
457457
const [editMode, setEditMode] = useState(false)
458+
const group = props.groups.find(g => g.id === homework.groupId)
458459

459460
useEffect(() => {
460461
setEditMode(props.initialEditMode)
@@ -514,6 +515,13 @@ const CourseHomeworkExperimental: FC<{
514515
</Stack>
515516
</Grid>}
516517
</Grid>
518+
{group &&
519+
<Typography variant="body1" style={{color: "#454545"}} gutterBottom>
520+
<Stack direction={"row"} alignItems={"center"} spacing={1}>
521+
<GroupIcon fontSize={"small"}/>
522+
<div>{group.name}</div>
523+
</Stack>
524+
</Typography>}
517525
<Divider style={{marginTop: 15, marginBottom: 15}}/>
518526
<Typography component="div" style={{color: "#454545"}} gutterBottom variant="body1">
519527
<MarkdownPreview value={homework.description!}/>

0 commit comments

Comments
 (0)