diff --git a/front_end/messages/cs.json b/front_end/messages/cs.json index 288063a1a5..7533eb9c94 100644 --- a/front_end/messages/cs.json +++ b/front_end/messages/cs.json @@ -1817,5 +1817,6 @@ "tournamentsTabIndexes": "Indexy", "tournamentsTabArchived": "Archivováno", "tournamentTimelineClosed": "Čekání na vyřešení", + "questionsPreviouslyPredicted": "{count, plural, =1 {# otázka} other {# otázek}} dříve předpovězených", "othersCount": "Ostatní ({count})" } diff --git a/front_end/messages/en.json b/front_end/messages/en.json index c36a7c5484..04bbbfc1d1 100644 --- a/front_end/messages/en.json +++ b/front_end/messages/en.json @@ -1335,6 +1335,7 @@ "questionsTotal": "{count} questions total", "reviewAll": "Review all", "questionsNotPredicted": "{count, plural, =1 {# question} other {# questions}} not predicted", + "questionsPreviouslyPredicted": "{count, plural, =1 {# question} other {# questions}} previously predicted", "significantMovementForecasts": "{count, plural, =1 {# forecast} other {# forecasts}} with significant movement", "stalePredictions": "{count, plural, =1 {# prediction} other {# predictions}} might be stale", "allQuestionsPredicted": "All questions predicted", diff --git a/front_end/messages/es.json b/front_end/messages/es.json index 9cadd0b07a..f887f8b541 100644 --- a/front_end/messages/es.json +++ b/front_end/messages/es.json @@ -1817,5 +1817,6 @@ "tournamentsTabIndexes": "Índices", "tournamentsTabArchived": "Archivado", "tournamentTimelineClosed": "Esperando resoluciones", + "questionsPreviouslyPredicted": "{count, plural, =1 {# pregunta} other {# preguntas}} previamente previstas", "othersCount": "Otros ({count})" } diff --git a/front_end/messages/pt.json b/front_end/messages/pt.json index 33c799cfcb..307309081c 100644 --- a/front_end/messages/pt.json +++ b/front_end/messages/pt.json @@ -1815,5 +1815,6 @@ "tournamentsTabIndexes": "Índices", "tournamentsTabArchived": "Arquivado", "tournamentTimelineClosed": "Aguardando resoluções", + "questionsPreviouslyPredicted": "{count, plural, =1 {# pergunta} other {# perguntas}} previamente previstas", "othersCount": "Outros ({count})" } diff --git a/front_end/messages/zh-TW.json b/front_end/messages/zh-TW.json index b994fd4759..bb06306c2a 100644 --- a/front_end/messages/zh-TW.json +++ b/front_end/messages/zh-TW.json @@ -1814,5 +1814,6 @@ "tournamentsTabIndexes": "指數", "tournamentsTabArchived": "已存檔", "tournamentTimelineClosed": "等待裁定", + "questionsPreviouslyPredicted": "先前預測的{count, plural, =1 {# 個問題} other {# 個問題}}", "withdrawAfterPercentSetting2": "問題總生命周期後撤回" } diff --git a/front_end/messages/zh.json b/front_end/messages/zh.json index 6d67cd2b35..599c7fd3c3 100644 --- a/front_end/messages/zh.json +++ b/front_end/messages/zh.json @@ -1819,5 +1819,6 @@ "tournamentsTabIndexes": "索引", "tournamentsTabArchived": "已归档", "tournamentTimelineClosed": "等待解决", + "questionsPreviouslyPredicted": "之前预测的{count, plural, =1 {# 个问题} other {# 个问题}}", "othersCount": "其他({count})" } diff --git a/front_end/src/app/(main)/(tournaments)/tournament/components/participation_block.tsx b/front_end/src/app/(main)/(tournaments)/tournament/components/participation_block.tsx index 8bc2f24dbd..b3e413705e 100644 --- a/front_end/src/app/(main)/(tournaments)/tournament/components/participation_block.tsx +++ b/front_end/src/app/(main)/(tournaments)/tournament/components/participation_block.tsx @@ -60,14 +60,24 @@ const ParticipationBlock: FC = ({ tournament, posts }) => { isPostOpenQuestionPredicted(post, { checkAllSubquestions: false, treatClosedAsPredicted: false, + treatWithdrawnAsPredicted: true, }) ); const unpredictedPosts: PredictionFlowPost[] = []; + const withdrawnPosts: PredictionFlowPost[] = []; const stalePredictionsPosts: PredictionFlowPost[] = []; const significantMovementPosts: PredictionFlowPost[] = []; posts.forEach((post) => { - if (!isPostOpenQuestionPredicted(post)) { + // Check if post has withdrawn forecasts (was predicted but now inactive) + const hasWithdrawnForecast = isPostOpenQuestionPredicted(post, { + treatWithdrawnAsPredicted: true, + }); + const hasActiveForecast = isPostOpenQuestionPredicted(post); + + if (hasWithdrawnForecast && !hasActiveForecast) { + withdrawnPosts.push(post); + } else if (!hasActiveForecast) { unpredictedPosts.push(post); } if (isPostStale(post)) { @@ -79,6 +89,7 @@ const ParticipationBlock: FC = ({ tournament, posts }) => { }); const isRequireAttention = !!unpredictedPosts.length || + !!withdrawnPosts.length || !!stalePredictionsPosts.length || !!significantMovementPosts.length; @@ -108,6 +119,16 @@ const ParticipationBlock: FC = ({ tournament, posts }) => { icon={faExclamationTriangle} /> )} + {/* Withdrawn questions */} + {!!withdrawnPosts.length && ( + + )} {/* Significant movement forecasts */} {!!significantMovementPosts.length && ( = ({ -

+

{tournamentName} -

+