feat(app): add lesson-plans, practice, and grade dashboard routes

- Add admin/lesson-plans, parent/lesson-plans, student/lesson-plans routes

- Add student/practice and teacher/practice routes for adaptive practice

- Add management/grade/dashboard and management/grade/practice routes

- Add teacher/lesson-plans error and loading boundaries

- Update existing admin, parent, student, teacher pages with new features

- Update globals.css and proxy middleware
This commit is contained in:
SpecialX
2026-06-24 12:03:47 +08:00
parent 8c2fe14c20
commit 37d2688a28
84 changed files with 2665 additions and 661 deletions

View File

@@ -3,6 +3,7 @@ import { Suspense } from "react"
import { notFound } from "next/navigation"
import { getLessonPlanById } from "@/modules/lesson-preparation/data-access"
import { LessonPlanEditor } from "@/modules/lesson-preparation/components/lesson-plan-editor"
import { LessonPlanProviderSetup } from "@/modules/lesson-preparation/providers/lesson-plan-provider-setup"
import { getTeacherClasses } from "@/modules/classes/data-access"
import { getTextbookById, getChaptersByTextbookId } from "@/modules/textbooks/data-access"
import { getAuthContext } from "@/shared/lib/auth-guard"
@@ -82,26 +83,29 @@ export default async function EditLessonPlanPage({
return (
<AiClientProvider service={aiClientService}>
<div className="h-[calc(100vh-4rem)]">
<Suspense
fallback={
<div className="flex h-full items-center justify-center">
<Skeleton className="h-[80%] w-[80%]" />
</div>
}
>
<LessonPlanEditor
planId={plan.id}
initialTitle={plan.title}
initialDoc={plan.content}
textbookId={plan.textbookId ?? undefined}
chapterId={plan.chapterId ?? undefined}
textbookTitle={textbookTitle}
chapterTitle={chapterTitle}
classes={classes}
/>
</Suspense>
</div>
<LessonPlanProviderSetup>
<div className="h-[calc(100vh-4rem)]">
<Suspense
fallback={
<div className="flex h-full items-center justify-center">
<Skeleton className="h-[80%] w-[80%]" />
</div>
}
>
<LessonPlanEditor
planId={plan.id}
initialTitle={plan.title}
initialDoc={plan.content}
initialStatus={plan.status}
textbookId={plan.textbookId ?? undefined}
chapterId={plan.chapterId ?? undefined}
textbookTitle={textbookTitle}
chapterTitle={chapterTitle}
classes={classes}
/>
</Suspense>
</div>
</LessonPlanProviderSetup>
</AiClientProvider>
)
}