修正完成日期時間格式

This commit is contained in:
2025-09-29 17:51:47 +08:00
parent f6610013ef
commit a76b72274b
22 changed files with 947 additions and 51 deletions

View File

@@ -243,7 +243,7 @@ export default function CombinedResultsPage() {
<div>
<h1 className="text-xl font-bold text-foreground"></h1>
<p className="text-sm text-muted-foreground">
{new Date(results.completedAt).toLocaleString("zh-TW", { timeZone: "Asia/Taipei" })}
{new Date(results.completedAt).toLocaleString("zh-TW")}
</p>
</div>
</div>

View File

@@ -41,8 +41,9 @@ export default function CreativeResultsPage() {
const data = await response.json()
if (data.success && data.data.length > 0) {
// 取最新的結果
const latestResult = data.data[0]
// 按創建時間排序,取最新的結果
const sortedResults = data.data.sort((a, b) => new Date(b.created_at) - new Date(a.created_at))
const latestResult = sortedResults[0]
// 獲取題目資料來計算各維度分數
const questionsResponse = await fetch('/api/creative-questions')
@@ -263,7 +264,7 @@ export default function CreativeResultsPage() {
<div>
<h1 className="text-xl font-bold text-foreground"></h1>
<p className="text-sm text-muted-foreground">
{new Date(results.completedAt).toLocaleString("zh-TW", { timeZone: "Asia/Taipei" })}
{new Date(results.completedAt).toLocaleString("zh-TW")}
</p>
</div>
</div>

View File

@@ -138,7 +138,7 @@ export default function LogicResultsPage() {
<div>
<h1 className="text-xl font-bold text-foreground"></h1>
<p className="text-sm text-muted-foreground">
{new Date(results.completedAt).toLocaleString("zh-TW", { timeZone: "Asia/Taipei" })}
{new Date(results.completedAt).toLocaleString("zh-TW")}
</p>
</div>
</div>

View File

@@ -264,7 +264,7 @@ function ResultsContent() {
<div className="min-w-0 flex-1">
<h3 className="font-medium text-foreground">{testInfo.name}</h3>
<p className="text-sm text-muted-foreground">
{new Date(result.completedAt).toLocaleString("zh-TW", { timeZone: "Asia/Taipei" })}
{new Date(result.completedAt).toLocaleString("zh-TW")}
</p>
{result.testCount && result.testCount > 1 && (
<p className="text-xs text-muted-foreground mt-1">