feat(classes): optimize teacher dashboard ui and implement grade management

This commit is contained in:
SpecialX
2026-01-14 13:59:11 +08:00
parent ade8d4346c
commit 9bfc621d3f
104 changed files with 12793 additions and 2309 deletions

View File

@@ -0,0 +1,31 @@
import { auth } from "@/auth"
import { getGradeManagedClasses, getManagedGrades, getTeacherOptions } from "@/modules/classes/data-access"
import { GradeClassesClient } from "@/modules/classes/components/grade-classes-view"
export const dynamic = "force-dynamic"
export default async function GradeClassesPage() {
const session = await auth()
const userId = session?.user?.id ?? ""
const [classes, teachers, managedGrades] = await Promise.all([
getGradeManagedClasses(userId),
getTeacherOptions(),
getManagedGrades(userId),
])
return (
<div className="flex h-full flex-col space-y-8 p-8">
<div className="flex flex-col justify-between space-y-4 md:flex-row md:items-center md:space-y-0">
<div>
<h2 className="text-2xl font-bold tracking-tight">Class Management</h2>
<p className="text-muted-foreground">
Manage classes for your grades.
</p>
</div>
</div>
<GradeClassesClient classes={classes} teachers={teachers} managedGrades={managedGrades} />
</div>
)
}