Fix QuizAttempt field name: createdAt -> completedAt
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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) {
|
||||
<div className="space-y-4">
|
||||
{quiz.attempts.map((attempt) => {
|
||||
const answers = attempt.answers as Record<string, string>;
|
||||
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",
|
||||
|
||||
Reference in New Issue
Block a user