- 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
41 lines
1.4 KiB
TypeScript
41 lines
1.4 KiB
TypeScript
import { Stethoscope } from "lucide-react"
|
|
import { getTranslations } from "next-intl/server"
|
|
|
|
import { requirePermission } from "@/shared/lib/auth-guard"
|
|
import { Permissions } from "@/shared/types/permissions"
|
|
import { getStudentMasterySummary } from "@/modules/diagnostic/data-access"
|
|
import { getDiagnosticReports } from "@/modules/diagnostic/data-access-reports"
|
|
import { StudentDiagnosticView } from "@/modules/diagnostic/components/student-diagnostic-view"
|
|
|
|
export const dynamic = "force-dynamic"
|
|
|
|
export default async function StudentDiagnosticPage() {
|
|
const ctx = await requirePermission(Permissions.DIAGNOSTIC_READ)
|
|
const t = await getTranslations("student")
|
|
|
|
const [summary, reportsResult] = await Promise.all([
|
|
getStudentMasterySummary(ctx.userId),
|
|
// v4-P1-3: 学生仅可见已发布报告,避免草稿泄露
|
|
getDiagnosticReports(
|
|
{ studentId: ctx.userId, status: "published" },
|
|
ctx.dataScope,
|
|
),
|
|
])
|
|
const reports = reportsResult.reports
|
|
|
|
return (
|
|
<div className="space-y-8">
|
|
<div>
|
|
<h2 className="flex items-center gap-2 text-2xl font-bold tracking-tight">
|
|
<Stethoscope className="h-6 w-6" />
|
|
{t("diagnostic.title")}
|
|
</h2>
|
|
<p className="text-muted-foreground">
|
|
{t("diagnostic.description")}
|
|
</p>
|
|
</div>
|
|
<StudentDiagnosticView summary={summary} reports={reports} />
|
|
</div>
|
|
)
|
|
}
|