From 92c561ccf7a8530ac7fc5d03696791d554f7a6eb Mon Sep 17 00:00:00 2001 From: kovacspe Date: Sat, 14 Dec 2024 22:29:59 +0100 Subject: [PATCH] =?UTF-8?q?TRansformovan=C3=BD=20zoznam=20=C3=BAloh=20na?= =?UTF-8?q?=20tabulku?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SemesterAdministration.tsx | 25 +++++++++++++------ src/types/api/generated/competition.ts | 2 ++ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/components/SemesterAdministration/SemesterAdministration.tsx b/src/components/SemesterAdministration/SemesterAdministration.tsx index 43cf2b05..bffacf31 100644 --- a/src/components/SemesterAdministration/SemesterAdministration.tsx +++ b/src/components/SemesterAdministration/SemesterAdministration.tsx @@ -1,7 +1,8 @@ import {Stack, Typography} from '@mui/material' +import Grid from '@mui/material/Unstable_Grid2' import {useMutation, useQuery} from '@tanstack/react-query' import axios, {AxiosError} from 'axios' -import {FC, useState} from 'react' +import {FC, Fragment, useState} from 'react' import {Button} from '@/components/Clickable/Button' import {Link} from '@/components/Clickable/Link' @@ -149,13 +150,21 @@ export const SemesterAdministration: FC = () => { Termín série: {formatDateTime(series.deadline)} - - {series?.problems.map((problem) => ( - - {problem.order}. úloha - - ))} - + + {series?.problems.map((problem) => { + return ( + + + + {problem.order}. úloha + + + (0/0) + x + + ) + })} + ))} diff --git a/src/types/api/generated/competition.ts b/src/types/api/generated/competition.ts index 78610e60..2d1eb8d7 100644 --- a/src/types/api/generated/competition.ts +++ b/src/types/api/generated/competition.ts @@ -66,6 +66,8 @@ export interface ProblemCorrection { export interface Problem { id: number submitted?: any + num_solutions: number + num_corrected_solutions: number text: string order: number image?: any | null