Skip to content

Commit

Permalink
kalender is beetje beter van uitzicht
Browse files Browse the repository at this point in the history
  • Loading branch information
Bendemeurichy committed May 19, 2024
1 parent b3c162b commit 6544af1
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions frontend/frontend/src/components/DeadlineCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,24 @@ function DeadlineMenu({ assignments, selectedDay }: DeadlineMenuProps) {
width={'100%'}
alignItems={'center'}
>
<Typography>
<Typography color={'text.primary'}>
{t('deadlines_on')}: {selectedDay?.format('DD/MM/YYYY')}
</Typography>
<List>
<List sx={{ width: '100%' }}>
{assignments.filter((assignment: project) => {
return dayjs(assignment.deadline).isSame(selectedDay, 'day')
}).length === 0 && (
<ListItem>
<ListItemText>
<Typography
textAlign={'center'}
color={'text.primary'}
>
{t('no_deadline') + 's'}
</Typography>
</ListItemText>
</ListItem>
)}
{assignments
.filter((assignment: project) =>
dayjs(assignment.deadline).isSame(selectedDay, 'day')
Expand All @@ -111,7 +125,14 @@ function DeadlineMenu({ assignments, selectedDay }: DeadlineMenuProps) {
<ListItem>
<ListItemButton
sx={{
border: 1,
border: 0.5,
borderColor: 'primary.main',
textAlign: 'center',
width: '100%',
borderRadius: 2,
'&:hover': {
backgroundColor: 'primary.light',
},
}}
onClick={() =>
handleProjectClick(
Expand All @@ -120,7 +141,11 @@ function DeadlineMenu({ assignments, selectedDay }: DeadlineMenuProps) {
)
}
>
<ListItemText primary={assignment.titel} />
<ListItemText>
<Typography color={'text.primary'}>
{assignment.titel}
</Typography>
</ListItemText>
</ListItemButton>
</ListItem>
))}
Expand Down

0 comments on commit 6544af1

Please sign in to comment.