修正獎勵評審資訊、評分資訊

This commit is contained in:
2025-09-27 17:24:26 +08:00
parent b06fd94c99
commit 88c3fde372
11 changed files with 2399 additions and 459 deletions

View File

@@ -102,7 +102,7 @@ export function CompetitionManagement() {
// 可用用戶狀態
const [availableUsers, setAvailableUsers] = useState<any[]>([])
const [isLoadingUsers, setIsLoadingUsers] = useState(false)
// 獎項資料庫整合狀態
const [dbAwards, setDbAwards] = useState<any[]>([])
const [isLoadingAwards, setIsLoadingAwards] = useState(false)
@@ -2132,7 +2132,7 @@ export function CompetitionManagement() {
setIsLoadingAwards(false)
}
}
// 載入競賽相關數據用於評分
const loadCompetitionDataForScoring = async (competition: any) => {
try {
@@ -7877,14 +7877,14 @@ export function CompetitionManagement() {
if (value === "custom-input") {
setNewAward({ ...newAward, customAwardTypeId: "", awardName: "" })
} else {
// 檢查是否為自定義獎項類型
const customAwardType = competitionAwardTypes.find(type => type.id === value)
if (customAwardType) {
setNewAward({
...newAward,
customAwardTypeId: value,
awardName: customAwardType.name
})
// 檢查是否為自定義獎項類型
const customAwardType = competitionAwardTypes.find(type => type.id === value)
if (customAwardType) {
setNewAward({
...newAward,
customAwardTypeId: value,
awardName: customAwardType.name
})
}
}
}}
@@ -7896,12 +7896,12 @@ export function CompetitionManagement() {
<SelectContent>
<SelectItem value="custom-input"></SelectItem>
{competitionAwardTypes.map((awardType) => (
<SelectItem key={awardType.id} value={awardType.id}>
<div className="flex items-center space-x-2">
<span>{awardType.icon}</span>
<span>{awardType.name}</span>
</div>
</SelectItem>
<SelectItem key={awardType.id} value={awardType.id}>
<div className="flex items-center space-x-2">
<span>{awardType.icon}</span>
<span>{awardType.name}</span>
</div>
</SelectItem>
))}
</SelectContent>
</Select>