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

@@ -1,4 +1,5 @@
import { UserX } from "lucide-react"
import { getTranslations } from "next-intl/server"
import { getStudentClasses } from "@/modules/classes/data-access"
import { getCurrentStudentUser } from "@/modules/users/data-access"
@@ -14,17 +15,18 @@ export default async function StudentCoursesPage({
}: {
searchParams: Promise<SearchParams>
}) {
const t = await getTranslations("student")
const student = await getCurrentStudentUser()
if (!student) {
return (
<div className="space-y-8">
<div>
<h2 className="text-2xl font-bold tracking-tight">Courses</h2>
<p className="text-muted-foreground">Your enrolled classes.</p>
<h2 className="text-2xl font-bold tracking-tight">{t("courses.title")}</h2>
<p className="text-muted-foreground">{t("courses.description")}</p>
</div>
<EmptyState
title="No user found"
description="Create a student user to see courses."
title={t("courses.noUser")}
description={t("courses.noUserDesc")}
icon={UserX}
/>
</div>
@@ -51,8 +53,8 @@ export default async function StudentCoursesPage({
return (
<div className="space-y-8">
<div>
<h2 className="text-2xl font-bold tracking-tight">Courses</h2>
<p className="text-muted-foreground">Your enrolled classes.</p>
<h2 className="text-2xl font-bold tracking-tight">{t("courses.title")}</h2>
<p className="text-muted-foreground">{t("courses.description")}</p>
</div>
{classes.length > 0 && <CourseFilters />}
<StudentCoursesView classes={filteredClasses} />