feat(app): add error/loading boundaries across all dashboard routes and new routes
- Add error.tsx and loading.tsx boundaries for admin, parent, student, teacher routes - Add admin announcements edit, audit-logs overview, curriculum-map, invitation-codes, permissions, questions, roles routes - Add admin elective detail and components, files, course-plans, users, scheduling boundaries - Add messages group-compose route - Add parent course-plans, elective, grades report-card, practice routes - Add student course-plans, elective detail, error-book dialogs, grades report-card, learning study-path, leave, schedule boundaries - Add teacher attendance report, classes boundaries, course-plans boundaries, elective, exams analytics/edit-rich/all/create/new, grades report-card, homework boundaries, leave, lesson-plans calendar - Add auth loading, onboarding loading, api cron
This commit is contained in:
@@ -8,6 +8,7 @@ import { Permissions } from "@/shared/types/permissions"
|
||||
import { getParam, type SearchParams } from "@/shared/lib/search-params"
|
||||
import { EmptyState } from "@/shared/components/ui/empty-state"
|
||||
import { ClipboardList } from "lucide-react"
|
||||
import { getTranslations } from "next-intl/server"
|
||||
|
||||
export const dynamic = "force-dynamic"
|
||||
|
||||
@@ -18,6 +19,7 @@ export default async function BatchEntryPage({
|
||||
}): Promise<JSX.Element> {
|
||||
const ctx = await requirePermission(Permissions.GRADE_RECORD_MANAGE)
|
||||
const sp = await searchParams
|
||||
const t = await getTranslations("grades")
|
||||
|
||||
const examId = getParam(sp, "examId")
|
||||
const classId = getParam(sp, "classId")
|
||||
@@ -62,16 +64,14 @@ export default async function BatchEntryPage({
|
||||
return (
|
||||
<div className="h-full flex-1 flex-col space-y-8 p-8 md:flex">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold tracking-tight">批量录入成绩</h1>
|
||||
<p className="text-muted-foreground">
|
||||
从试卷库选择试卷,按每题得分录入,像填 Excel 表格一样。
|
||||
</p>
|
||||
<h1 className="text-2xl font-bold tracking-tight">{t("page.entry.title")}</h1>
|
||||
<p className="text-muted-foreground">{t("page.entry.description")}</p>
|
||||
</div>
|
||||
|
||||
{exams.length === 0 ? (
|
||||
<EmptyState
|
||||
title="没有可用的试卷"
|
||||
description="请先在试卷管理中创建试卷并添加题目,才能录入成绩。"
|
||||
title={t("page.entry.noExamsTitle")}
|
||||
description={t("page.entry.noExamsDescription")}
|
||||
icon={ClipboardList}
|
||||
className="border-none shadow-none"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user