From 2468671d828acb77f79780d04378018e6909db92 Mon Sep 17 00:00:00 2001 From: dmitriylaukhin Date: Mon, 27 Apr 2026 12:06:13 +0500 Subject: [PATCH] Fix QuizAttempt field name: createdAt -> completedAt Co-Authored-By: Claude Sonnet 4.6 --- src/app/admin/quizzes/[quizId]/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/admin/quizzes/[quizId]/page.tsx b/src/app/admin/quizzes/[quizId]/page.tsx index 32ebb07..38dd934 100644 --- a/src/app/admin/quizzes/[quizId]/page.tsx +++ b/src/app/admin/quizzes/[quizId]/page.tsx @@ -14,7 +14,7 @@ export default async function AdminQuizAttemptsPage({ params }: Props) { include: { questions: { orderBy: { order: "asc" } }, attempts: { - orderBy: { createdAt: "desc" }, + orderBy: { completedAt: "desc" }, include: { user: { select: { name: true, email: true } }, }, @@ -67,7 +67,7 @@ export default async function AdminQuizAttemptsPage({ params }: Props) {
{quiz.attempts.map((attempt) => { const answers = attempt.answers as Record; - const date = new Date(attempt.createdAt).toLocaleString("ru-RU", { + const date = new Date(attempt.completedAt).toLocaleString("ru-RU", { day: "2-digit", month: "2-digit", year: "numeric",