From 94672a6fdb3862c4e84c7a6e4ebd43a19b7c89f0 Mon Sep 17 00:00:00 2001 From: rngsurrounded Date: Tue, 4 Mar 2025 05:32:29 +0900 Subject: [PATCH 1/4] fix --- .../CompetitionSession/components/TaskContent/index.tsx | 9 +-------- services/frontend/src/pages/CompetitionSession/index.tsx | 4 +++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/services/frontend/src/pages/CompetitionSession/components/TaskContent/index.tsx b/services/frontend/src/pages/CompetitionSession/components/TaskContent/index.tsx index 634a7a0..7909578 100644 --- a/services/frontend/src/pages/CompetitionSession/components/TaskContent/index.tsx +++ b/services/frontend/src/pages/CompetitionSession/components/TaskContent/index.tsx @@ -25,14 +25,7 @@ const TaskContent: React.FC = ({ task }) => { const attachments = attachmentsQuery.data || []; - const convertToMarkdown = (text: string): string => { - if (!text) return ''; - - let markdown = text.replace(/\n/g, '\n\n'); - return markdown; - }; - const markdownText = convertToMarkdown(task.description); return (
@@ -45,7 +38,7 @@ const TaskContent: React.FC = ({ task }) => { remarkPlugins={[remarkMath, remarkGfm]} rehypePlugins={[rehypeKatex]} > - {markdownText} + {task.description}
diff --git a/services/frontend/src/pages/CompetitionSession/index.tsx b/services/frontend/src/pages/CompetitionSession/index.tsx index 4f92cae..9208099 100644 --- a/services/frontend/src/pages/CompetitionSession/index.tsx +++ b/services/frontend/src/pages/CompetitionSession/index.tsx @@ -69,7 +69,9 @@ const CompetitionSession = () => { }); const competition = competitionQuery.data; - const tasks = tasksQuery.data || []; + const tasks = [...(tasksQuery.data || [])].sort((a, b) => { + return a.in_competition_position - b.in_competition_position; + }); const results = resultsQuery.data || []; const isLoading = tasksQuery.isLoading || competitionQuery.isLoading; const error = tasksQuery.error || competitionQuery.error From 8de84c82d17ead7eea563c04aaa8c6cb2034f3c2 Mon Sep 17 00:00:00 2001 From: rngsurrounded Date: Tue, 4 Mar 2025 05:35:51 +0900 Subject: [PATCH 2/4] fix --- services/frontend/src/components/layout/header.tsx | 1 - .../Competitions/components/CompetitionCard/index.tsx | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/services/frontend/src/components/layout/header.tsx b/services/frontend/src/components/layout/header.tsx index 0563f7d..3bc9470 100644 --- a/services/frontend/src/components/layout/header.tsx +++ b/services/frontend/src/components/layout/header.tsx @@ -55,7 +55,6 @@ export const Header = () => {
- Материалы diff --git a/services/frontend/src/pages/Competitions/components/CompetitionCard/index.tsx b/services/frontend/src/pages/Competitions/components/CompetitionCard/index.tsx index ddbc19b..8f257b8 100644 --- a/services/frontend/src/pages/Competitions/components/CompetitionCard/index.tsx +++ b/services/frontend/src/pages/Competitions/components/CompetitionCard/index.tsx @@ -32,9 +32,9 @@ export function CompetitionCard({ return ( -
+
{competition.title}
- -
+ +
{competition.type === CompetitionType.COMPETITIVE @@ -67,7 +67,7 @@ export function CompetitionCard({ {competition.type === CompetitionType.COMPETITIVE && ( -
+
{competition.start_date && (
From edfa6f9ec822c6f4ea1caea92d42b45d951e7a1f Mon Sep 17 00:00:00 2001 From: rngsurrounded Date: Tue, 4 Mar 2025 05:50:58 +0900 Subject: [PATCH 3/4] minor fixes --- services/frontend/src/pages/CompetitionSession/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/services/frontend/src/pages/CompetitionSession/index.tsx b/services/frontend/src/pages/CompetitionSession/index.tsx index 9208099..15cf56f 100644 --- a/services/frontend/src/pages/CompetitionSession/index.tsx +++ b/services/frontend/src/pages/CompetitionSession/index.tsx @@ -60,7 +60,6 @@ const CompetitionSession = () => { setTimeout(() => { window.location.reload(); - setIsReloading(false); }, 2500); }, onError: (error) => { From bd33559745287cf190ee84f41af78411bf4446d4 Mon Sep 17 00:00:00 2001 From: ITQ Date: Mon, 3 Mar 2025 23:53:40 +0300 Subject: [PATCH 4/4] (scope): [body] [footer(s)] --- services/backend/apps/task/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/backend/apps/task/tasks.py b/services/backend/apps/task/tasks.py index b217cce..522bf3a 100644 --- a/services/backend/apps/task/tasks.py +++ b/services/backend/apps/task/tasks.py @@ -18,7 +18,7 @@ def analyze_data_task(self, submission_id): files = [ { "url": ( - f"{settings.MINIO_DEFAULT_CUSTOM_ENDPOINT_URL}/" + f"{settings.MINIO_DEFAULT_CUSTOM_ENDPOINT_URL}" f"{urlparse(attachment.file.url).path}" ), "bind_path": attachment.bind_at,