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,15 +1,19 @@
import { notFound } from "next/navigation"
import type { Metadata } from "next"
import type { JSX } from "react"
import { getTranslations } from "next-intl/server"
import { getCoursePlanById, getSubjectOptions } from "@/modules/course-plans/data-access"
import { getAdminClasses } from "@/modules/classes/data-access"
import { getAcademicYears, getStaffOptions } from "@/modules/school/data-access"
import { CoursePlanForm } from "@/modules/course-plans/components/course-plan-form"
export const metadata: Metadata = {
title: "编辑课程计划 - Next_Edu",
description: "更新课程计划详情",
export async function generateMetadata(): Promise<Metadata> {
const t = await getTranslations("coursePlans")
return {
title: `${t("edit.title")} - Next_Edu`,
description: t("edit.description"),
}
}
export const dynamic = "force-dynamic"
@@ -19,6 +23,7 @@ export default async function EditCoursePlanPage({
}: {
params: Promise<{ id: string }>
}): Promise<JSX.Element> {
const t = await getTranslations("coursePlans")
const { id } = await params
const [plan, classes, subjects, teachers, academicYears] = await Promise.all([
@@ -34,8 +39,8 @@ export default async function EditCoursePlanPage({
return (
<div className="flex h-full flex-col space-y-8 p-8">
<div>
<h2 className="text-2xl font-bold tracking-tight"></h2>
<p className="text-muted-foreground"></p>
<h2 className="text-2xl font-bold tracking-tight">{t("edit.title")}</h2>
<p className="text-muted-foreground">{t("edit.description")}</p>
</div>
<CoursePlanForm
mode="edit"

View File

@@ -1,13 +1,17 @@
import { notFound } from "next/navigation"
import type { Metadata } from "next"
import type { JSX } from "react"
import { getTranslations } from "next-intl/server"
import { getCoursePlanById } from "@/modules/course-plans/data-access"
import { CoursePlanDetail } from "@/modules/course-plans/components/course-plan-detail"
export const metadata: Metadata = {
title: "课程计划详情 - Next_Edu",
description: "查看课程计划详情",
export async function generateMetadata(): Promise<Metadata> {
const t = await getTranslations("coursePlans")
return {
title: `${t("detail.title")} - Next_Edu`,
description: t("detail.description"),
}
}
export const dynamic = "force-dynamic"