diff --git a/services/frontend/src/pages/Competition/components/CompetitionResultModal/index.tsx b/services/frontend/src/pages/Competition/components/CompetitionResultModal/index.tsx index 565354e..b691e77 100644 --- a/services/frontend/src/pages/Competition/components/CompetitionResultModal/index.tsx +++ b/services/frontend/src/pages/Competition/components/CompetitionResultModal/index.tsx @@ -1,3 +1,4 @@ +// src/components/competition/CompetitionResultsModal.tsx import React from 'react'; import { Dialog, @@ -33,13 +34,58 @@ export const CompetitionResultsModal: React.FC = ( }) => { const renderResultValue = (result: number, maxPoints: number) => { if (result === -1) { - return На проверке; + return ( + + На проверке + + ); } else if (result === -2) { - return Нет ответа; + return ( + + Нет ответа + + ); + } else if (result === 0) { + return ( + + Неверно (0/{maxPoints}) + + ); + } else if (result < maxPoints) { + return ( + + Частично верно ({result}/{maxPoints}) + + ); } else { return ( - - Зачтено {result}/{maxPoints} баллов + + Верно ({result}/{maxPoints}) ); } @@ -71,7 +117,7 @@ export const CompetitionResultsModal: React.FC = ( className="flex flex-col md:flex-row justify-between items-start md:items-center p-4 bg-gray-50 rounded-lg border" >
{result.task_name}
-
+
{renderResultValue(result.result, result.max_points)}
diff --git a/services/frontend/src/pages/Competition/index.tsx b/services/frontend/src/pages/Competition/index.tsx index 6571c4f..4cf4911 100644 --- a/services/frontend/src/pages/Competition/index.tsx +++ b/services/frontend/src/pages/Competition/index.tsx @@ -93,7 +93,6 @@ const CompetitionPage = () => { return now < startDate; }; - // Check if competition has ended const isCompetitionEnded = () => { if (!competition?.end_date) return false; @@ -212,7 +211,6 @@ const CompetitionPage = () => {