前台競賽功能修復
This commit is contained in:
@@ -1997,12 +1997,13 @@ export function CompetitionManagement() {
|
||||
if (!competition) return { completed: 0, total: 0, percentage: 0 }
|
||||
|
||||
const participantCount = getParticipantCount(competition)
|
||||
const totalExpected = competition.judges.length * participantCount
|
||||
const judgesCount = competition.judges?.length || 0
|
||||
const totalExpected = judgesCount * participantCount
|
||||
const completed = judgeScores.filter((score) => {
|
||||
const individualParticipants = competition.participatingApps || []
|
||||
const teamParticipants = competition.participatingTeams || []
|
||||
const allParticipants = [...individualParticipants, ...teamParticipants]
|
||||
return allParticipants.includes(score.appId) && competition.judges.includes(score.judgeId)
|
||||
return allParticipants.includes(score.appId) && (competition.judges || []).includes(score.judgeId)
|
||||
}).length
|
||||
|
||||
return {
|
||||
|
Reference in New Issue
Block a user