Skip to content

Commit

Permalink
Merge pull request #296 from SELab-2/merge_problems_fix
Browse files Browse the repository at this point in the history
visuele bugs oplossen?
  • Loading branch information
LGDTimtou authored May 22, 2024
2 parents 3a71868 + 7c9192f commit 06616d6
Show file tree
Hide file tree
Showing 23 changed files with 1,096 additions and 8,236 deletions.
7,732 changes: 1 addition & 7,731 deletions frontend/frontend/package-lock.json

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions frontend/frontend/src/components/AssignmentListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
ListItemButton,
ListItemIcon,
ListItemText,
Typography,
} from '@mui/material'
import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline'
import HighlightOffIcon from '@mui/icons-material/HighlightOff'
Expand Down Expand Up @@ -65,11 +66,15 @@ export function AssignmentListItem({
}}
>
{/* Project Name */}
<ListItemText
id="projectName"
sx={{ maxWidth: 100 }}
primary={projectName}
/>
<ListItemText>
<Typography
maxWidth={170}
noWrap
textOverflow={'ellipsis'}
>
{projectName}
</Typography>
</ListItemText>
{/* Due Date */}
<ListItemText
id="dueDate"
Expand Down
52 changes: 41 additions & 11 deletions frontend/frontend/src/components/CourseCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export function CourseCard({
sx={{
width: { xs: '100%', md: '60%' },
minWidth: 350,
maxWidth: 420,
maxWidth: 460,
padding: 0,
margin: 1,
}}
Expand Down Expand Up @@ -290,7 +290,11 @@ export function CourseCard({
<Typography id="project" width={30}>
Project
</Typography>
<Typography id="deadline" width={30}>
<Typography
id="deadline"
pl={20}
width={30}
>
Deadline
</Typography>
<Typography id="status" width={30}>
Expand Down Expand Up @@ -318,7 +322,7 @@ export function CourseCard({
</Typography>
<Typography
id="deadline"
minWidth={50}
minWidth={80}
>
Deadline
</Typography>
Expand All @@ -341,7 +345,7 @@ export function CourseCard({
</Typography>
<Typography
id="deadline"
minWidth={50}
minWidth={90}
>
Deadline
</Typography>
Expand All @@ -357,10 +361,30 @@ export function CourseCard({
sx={{
width: '100%',
height: 130,
overflow: 'auto',
overflowY: 'auto',
}}
>
<List disablePadding={true}>
<List
disablePadding={true}
sx={{
overflowY: 'auto',
maxHeight: 130,
}}
>
{assignments.length === 0 && (
<Box
display={'flex'}
alignItems={'center'}
justifyContent={'center'}
py={6}
flexGrow={1}
height={'100%'}
>
<Typography>
{t('no_projects')}
</Typography>
</Box>
)}
{assignments
.filter(
(assignment) =>
Expand All @@ -377,9 +401,9 @@ export function CourseCard({
dueDate={
assignment.deadline
? dayjs(
assignment.deadline
assignment.deadline
).format(
'DD/MM/YYYY HH:mm'
'DD/MM/YYYY HH:mm'
)
: undefined
}
Expand All @@ -403,7 +427,13 @@ export function CourseCard({
height: 130,
}}
>
<List disablePadding={true}>
<List
disablePadding={true}
sx={{
overflowY: 'auto',
maxHeight: 130,
}}
>
{assignments.map(
(assignment) => (
<AssignmentListItem
Expand All @@ -418,9 +448,9 @@ export function CourseCard({
dueDate={
assignment.deadline
? dayjs(
assignment.deadline
assignment.deadline
).format(
'DD/MM/YYYY HH:mm'
'DD/MM/YYYY HH:mm'
)
: undefined
}
Expand Down
22 changes: 12 additions & 10 deletions frontend/frontend/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,18 @@ export const Header = ({ variant, title }: Props) => {
{title}
</Typography>
{variant === 'editable' && (
<IconButton
onClick={handleEdit}
disableRipple={true}
sx={{
marginBottom: 1,
color: 'text.secondary',
}}
>
<EditIcon />
</IconButton>
<Tooltip title={t('edit')}>
<IconButton
onClick={handleEdit}
disableRipple={true}
sx={{
marginBottom: 1,
color: 'background.default',
}}
>
<EditIcon />
</IconButton>
</Tooltip>
)}
</Box>

Expand Down
10 changes: 8 additions & 2 deletions frontend/frontend/src/components/TabSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default function TabSwitcher({
<>
<Tabs defaultValue={0} color={'background.default'}>
<Box
width={'100%'}
display={'flex'}
flexDirection={'row'}
justifyContent={'space-between'}
Expand Down Expand Up @@ -84,7 +85,12 @@ export default function TabSwitcher({
)}
</Box>
{nodes.map((node, index) => (
<TabPanel id={`node${index}`} key={index} value={index}>
<TabPanel
id={`node${index}`}
key={index}
value={index}
sx={{ width: '100%' }}
>
{node}
</TabPanel>
))}
Expand Down Expand Up @@ -131,7 +137,7 @@ const Tab = styled(BaseTab)`

const TabPanel = styled(BaseTabPanel)(
({ theme }) => `
width: "15%";
width: "100%";
font-family: 'IBM Plex Sans', sans-serif;
font-size: 0.875rem;
padding: 20px 12px;
Expand Down
14 changes: 10 additions & 4 deletions frontend/frontend/src/components/WarningPopup.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button } from './CustomComponents'
import { Button, SecondaryButton } from './CustomComponents'
import {
DialogActions,
DialogContent,
Expand Down Expand Up @@ -43,12 +43,18 @@ export default function WarningPopup({
<>
{/* Warning popup dialog */}
<Dialog open={open} onClose={handleClose}>
<DialogTitle id='popUpTitle' sx={{ textAlign: 'center' }}>{title}</DialogTitle>
<DialogTitle id="popUpTitle" sx={{ textAlign: 'center' }}>
{title}
</DialogTitle>
<DialogContent>
<DialogContentText id='popUpText'>{content}</DialogContentText>
<DialogContentText id="popUpText">
{content}
</DialogContentText>
</DialogContent>
<DialogActions sx={{ justifyContent: 'center' }}>
<Button onClick={handleClose}>{t('cancel')}</Button>
<SecondaryButton onClick={handleClose}>
{t('cancel')}
</SecondaryButton>
{/* Action button */}
<Button onClick={hanldeAction} autoFocus>
{buttonName}
Expand Down
23 changes: 19 additions & 4 deletions frontend/frontend/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const english = {
edit_scores_warning: 'Edit Scores?',
undo_changes_warning: 'Undo Changes?',
optional: 'Optional',
deadlineCheck: 'extra deadline must be after the first deadline',
deadlineCheck: 'Extra deadline must be after the first deadline',
not_before_now: 'Deadline must be in the future',
noStudentsYet: 'No students yet',
change_groups: 'Change groups?',
Expand All @@ -103,12 +103,13 @@ const english = {
join_course: 'Join course?',
join: 'Join',
join_group: 'Join',
group_full: 'Group is full',
leave: 'Leave',
acces: 'This gives you access to the course.',
copy_invite: 'Copy invitation link',
deadlines_on: 'Deadlines on',
no_assignmentfile: 'No assignment file',
email: 'email',
email: 'Email',
n_of_members: 'Max Amount Of Members',
existing_submissions:
'This could impact existing submissions. Are you sure?',
Expand All @@ -120,10 +121,24 @@ const english = {
open_with_ui: 'Open with UI',
choose_existing: 'Choose existing',
make_new_script: 'Make new script',
cant_add_teachers_to_student_list: 'You cannot add teachers to the student list',
cant_add_students_to_teacher_list: 'You cannot add students to the teacher list',
cant_add_teachers_to_student_list:
'You cannot add teachers to the student list',
cant_add_students_to_teacher_list:
'You cannot add students to the teacher list',
cant_add_users_twice: 'You cannot add users to a subject twice',
this_user_doesnt_exist: 'This user does not exist',
status: 'Status',
visibility: 'Change Visibility',
template_saved_successfully: 'Template saved successfully',
save_course_warning: 'Save Course?',
try_again: 'Try again',
openinUi: 'Open in UI',
openInEditor: 'Open in editor',
no_params: 'No parameters where found in the template.',
save_scores: 'Save Scores',
add_course: 'Add course',
add_project: 'Add project',
no_projects: 'No projects',
}

export default english
25 changes: 20 additions & 5 deletions frontend/frontend/src/i18n/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const dutch = {
assignmentName: 'Naam opdracht',
upload_assignment: 'Upload opgavebestand',
description: 'Beschrijving opgave',
uploadToolTip: 'upload een .zip of .pdf bestand',
uploadToolTip: 'Upload een .zip of .pdf bestand',
noFile: 'Geen bestand gekozen',
remove: 'Verwijder',
submit: 'Bevestig',
Expand Down Expand Up @@ -80,7 +80,7 @@ const dutch = {
edit_scores_warning: 'Scores Aanpassen?',
undo_changes_warning: 'Aanpassingen Verwijderen?',
optional: 'Optioneel',
deadlineCheck: 'extra deadline moet na de eerste deadline liggen',
deadlineCheck: 'Extra deadline moet na de eerste deadline liggen',
not_before_now: 'Datum moet in de toekomst liggen',
noStudentsYet: 'Nog geen studenten',
change_groups: 'Groepen aanpassen?',
Expand All @@ -103,12 +103,13 @@ const dutch = {
join_course: 'Voeg vak toe?',
join: 'Voeg toe',
join_group: 'Wordt lid',
group_full: 'Groep zit vol',
leave: 'Verlaat',
acces: 'Dit geeft je toegang tot het vak.',
copy_invite: 'Kopieer uitnodigingslink',
no_assignmentfile: 'Geen opdrachtbestand',
deadlines_on: 'Deadlines op',
email: 'email',
email: 'Email',
n_of_members: 'Max Aantal Leden',
existing_submissions:
'Dit kan invloed hebben op bestaande indieningen. Weet je het zeker?',
Expand All @@ -120,10 +121,24 @@ const dutch = {
open_with_ui: 'Open met UI',
choose_existing: 'Kies een bestaand script',
make_new_script: 'Maak nieuw script aan',
cant_add_teachers_to_student_list: 'Je kan geen leerkrachten aan de studenten lijst toevoegen',
cant_add_students_to_teacher_list: 'Je kan geen studenten aan de leerkrachten lijst toevoegen',
cant_add_teachers_to_student_list:
'Je kan geen leerkrachten aan de studenten lijst toevoegen',
cant_add_students_to_teacher_list:
'Je kan geen studenten aan de leerkrachten lijst toevoegen',
cant_add_users_twice: 'Je kan gebruikers geen twee keer toevoegen',
this_user_doesnt_exist: 'Deze gebruiker bestaat niet',
status: 'Status',
visibility: 'Verander Zichtbaarheid',
template_saved_successfully: 'Template succesvol opgeslagen',
save_course_warning: 'Vak Opslaan?',
try_again: 'Probeer opnieuw',
openinUi: 'Open in UI',
openInEditor: 'Open in editor',
no_params: 'Geen parameters gevonden in de template.',
save_scores: 'Scores Opslaan',
add_course: 'Voeg vak toe',
add_project: 'Voeg project toe',
no_projects: 'Geen projecten',
}

export default dutch
Loading

0 comments on commit 06616d6

Please sign in to comment.