File tree Expand file tree Collapse file tree
hwproj.front/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';
3636import SwitchAccessShortcutIcon from '@mui/icons-material/SwitchAccessShortcut' ;
3737import Lodash from "lodash" ;
3838import { CourseUnitType } from "@/components/Files/CourseUnitType" ;
39+ import GroupIcon from '@mui/icons-material/Group' ;
3940
4041interface 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 ! ) }
Original file line number Diff line number Diff 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 ! } />
You can’t perform that action at this time.
0 commit comments