feat(school,classes): 学校/年级/班级模块审计修复 — 权限校验 + i18n + 架构图同步
- 新增审计报告 docs/architecture/audit/school-grade-class-audit-report.md - 修复 P0-4: teacher/classes 4 个页面补充 requirePermission 权限校验 - 修复 P0-5: 新增 school.json i18n 文件(zh-CN/en)并接入 schools-view 组件 - 同步架构图 004:补充 grade-management 死模块记录与 teacher/classes 权限修复说明
This commit is contained in:
@@ -1,26 +1,31 @@
|
||||
import type { Metadata } from "next"
|
||||
import type { Metadata } from "next"
|
||||
import type { JSX } from "react"
|
||||
|
||||
import { getTranslations } from "next-intl/server"
|
||||
import { requirePermission } from "@/shared/lib/auth-guard"
|
||||
import { Permissions } from "@/shared/types/permissions"
|
||||
import { SchoolsClient } from "@/modules/school/components/schools-view"
|
||||
import { getSchools } from "@/modules/school/data-access"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "学校管理 - Next_Edu",
|
||||
description: "多校区场景下的学校管理",
|
||||
}
|
||||
|
||||
export const dynamic = "force-dynamic"
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
const t = await getTranslations("school")
|
||||
return {
|
||||
title: `${t("schools.title")} - Next_Edu`,
|
||||
description: t("schools.description"),
|
||||
}
|
||||
}
|
||||
|
||||
export default async function AdminSchoolsPage(): Promise<JSX.Element> {
|
||||
await requirePermission(Permissions.SCHOOL_MANAGE)
|
||||
const t = await getTranslations("school")
|
||||
const schools = await getSchools()
|
||||
return (
|
||||
<div className="flex h-full flex-col space-y-8 p-8">
|
||||
<div className="space-y-1">
|
||||
<h2 className="text-2xl font-bold tracking-tight">学校管理</h2>
|
||||
<p className="text-muted-foreground">多校区场景下的学校管理。</p>
|
||||
<h2 className="text-2xl font-bold tracking-tight">{t("schools.title")}</h2>
|
||||
<p className="text-muted-foreground">{t("schools.description")}</p>
|
||||
</div>
|
||||
<SchoolsClient schools={schools} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user