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, getStudentSchedule } from "@/modules/classes/data-access"
import { getCurrentStudentUser } from "@/modules/users/data-access"
@@ -14,15 +15,20 @@ export default async function StudentSchedulePage({
}: {
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">Schedule</h2>
<p className="text-muted-foreground">Your weekly timetable.</p>
<h2 className="text-2xl font-bold tracking-tight">{t("schedule.title")}</h2>
<p className="text-muted-foreground">{t("schedule.description")}</p>
</div>
<EmptyState title="No user found" description="Create a student user to see schedule." icon={UserX} />
<EmptyState
title={t("schedule.noUser")}
description={t("schedule.noUserDesc")}
icon={UserX}
/>
</div>
)
}
@@ -41,8 +47,8 @@ export default async function StudentSchedulePage({
<div className="space-y-8">
<div className="flex flex-col justify-between gap-4 md:flex-row md:items-center">
<div>
<h2 className="text-2xl font-bold tracking-tight">Schedule</h2>
<p className="text-muted-foreground">Your weekly timetable.</p>
<h2 className="text-2xl font-bold tracking-tight">{t("schedule.title")}</h2>
<p className="text-muted-foreground">{t("schedule.description")}</p>
</div>
<StudentScheduleFilters classes={classes} />
</div>