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: {
|
include: {
|
||||||
questions: { orderBy: { order: "asc" } },
|
questions: { orderBy: { order: "asc" } },
|
||||||
attempts: {
|
attempts: {
|
||||||
orderBy: { createdAt: "desc" },
|
orderBy: { completedAt: "desc" },
|
||||||
include: {
|
include: {
|
||||||
user: { select: { name: true, email: true } },
|
user: { select: { name: true, email: true } },
|
||||||
},
|
},
|
||||||
@@ -67,7 +67,7 @@ export default async function AdminQuizAttemptsPage({ params }: Props) {
|
|||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{quiz.attempts.map((attempt) => {
|
{quiz.attempts.map((attempt) => {
|
||||||
const answers = attempt.answers as Record<string, string>;
|
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",
|
day: "2-digit",
|
||||||
month: "2-digit",
|
month: "2-digit",
|
||||||
year: "numeric",
|
year: "numeric",
|
||||||
|
|||||||
Reference in New Issue
Block a user