From 54a2e64f04f6e52cf3761bdf463c6fe13f927b0f Mon Sep 17 00:00:00 2001 From: Gus Vanpoucke <159711661+gusvanpoucke@users.noreply.github.com> Date: Sun, 19 May 2024 14:51:48 +0200 Subject: [PATCH] groep ids kloppen nu op assignment page voor leerkrachten --- .../SubmissionListItemTeacherPage.tsx | 6 +++--- .../pages/assignmentPage/AssignmentPage.tsx | 21 +++++++------------ 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/frontend/frontend/src/components/SubmissionListItemTeacherPage.tsx b/frontend/frontend/src/components/SubmissionListItemTeacherPage.tsx index 27a4f734..3b5650c1 100644 --- a/frontend/frontend/src/components/SubmissionListItemTeacherPage.tsx +++ b/frontend/frontend/src/components/SubmissionListItemTeacherPage.tsx @@ -15,7 +15,7 @@ import { t } from 'i18next' import dayjs from 'dayjs' interface SubmissionListItemTeacherPageProps { - relative_group_id: string + group_name: string group_id: string assignment_id: string course_id: string @@ -32,7 +32,7 @@ export interface Score { * @param {SubmissionListItemTeacherPageProps} props - Props for SubmissionListItemTeacherPage component */ export function SubmissionListItemTeacherPage({ - relative_group_id, + group_name, group_id, assignment_id, course_id, @@ -148,7 +148,7 @@ export function SubmissionListItemTeacherPage({ color: 'primary.light', }, }} - primary={relative_group_id} + primary={group_name} /> {/* Display submission timestamp */} - {groups.map((group) => ( + {groups.map((group, index) => ( - group.groep_id - ) - ) + - 1 - ).toString()} + group_name={ + assignment + ? assignment.max_groep_grootte > 1 + ? t('group') + ' ' + (index + 1).toString() + : t('group') + ' ' + (index + 1).toString() //TODO Dit vervangen door de naam van de student + : '' + } group_id={group.groep_id.toString()} assignment_id={ assignmentId