修改測驗時間、新增測驗提醒、新增截止測驗功能

This commit is contained in:
2025-10-12 00:18:24 +08:00
parent 967541a492
commit cf40e937a1
7 changed files with 176 additions and 19 deletions

View File

@@ -26,6 +26,7 @@ interface TestResult {
type: "logic" | "creative" | "combined"
score: number
completedAt: string
isTimeout?: boolean
details?: {
logicScore?: number
creativeScore?: number
@@ -437,11 +438,18 @@ function AdminResultDetailContent() {
>
<span className="text-3xl font-bold text-white">{result.score}</span>
</div>
<CardTitle className="text-3xl mb-2"></CardTitle>
<CardTitle className="text-3xl mb-2">
{result.isTimeout ? '(時間到)' : ''}
</CardTitle>
<div className="flex items-center justify-center gap-2 mb-4">
<Badge variant="secondary" className="text-lg px-4 py-1">
{scoreLevel.level}
</Badge>
{result.isTimeout && (
<Badge variant="destructive" className="text-lg px-4 py-1">
</Badge>
)}
</div>
<p className="text-lg text-muted-foreground mb-3">{scoreLevel.description}</p>
<div className="bg-muted/50 rounded-lg p-4 text-sm">
@@ -482,11 +490,18 @@ function AdminResultDetailContent() {
>
<span className="text-3xl font-bold text-white">{result.score}</span>
</div>
<CardTitle className="text-3xl mb-2"></CardTitle>
<CardTitle className="text-3xl mb-2">
{result.isTimeout ? '(時間到)' : ''}
</CardTitle>
<div className="flex items-center justify-center gap-2 mb-4">
<Badge variant="secondary" className="text-lg px-4 py-1">
{scoreLevel.level}
</Badge>
{result.isTimeout && (
<Badge variant="destructive" className="text-lg px-4 py-1">
</Badge>
)}
</div>
<p className="text-lg text-muted-foreground mb-3">{scoreLevel.description}</p>
<div className="bg-muted/50 rounded-lg p-4 text-sm">