Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kalender is beetje beter van uitzicht #281

Merged
merged 1 commit into from
May 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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