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:
@@ -11,6 +11,7 @@ import {
|
||||
import { ParentExportButton } from "@/modules/parent/components/parent-export-button"
|
||||
import { GraduationCap } from "lucide-react"
|
||||
import type { ClassAverageTrendResult } from "@/modules/grades/types"
|
||||
import { getTranslations } from "next-intl/server"
|
||||
|
||||
export const dynamic = "force-dynamic"
|
||||
|
||||
@@ -22,15 +23,16 @@ interface ChildGradeItem {
|
||||
|
||||
export default async function ParentGradesPage() {
|
||||
const ctx = await requirePermission(Permissions.GRADE_RECORD_READ)
|
||||
const t = await getTranslations("grades")
|
||||
|
||||
if (ctx.dataScope.type !== "children" || ctx.dataScope.childrenIds.length === 0) {
|
||||
return (
|
||||
<ParentNoChildrenPage
|
||||
title="Children Grades"
|
||||
description="View your children's grade records."
|
||||
title={t("parent.title")}
|
||||
description={t("parent.description")}
|
||||
icon={GraduationCap}
|
||||
emptyTitle="No children linked"
|
||||
emptyDescription="Your account is not linked to any student accounts yet. Please contact the school administrator."
|
||||
emptyTitle={t("parent.noChildren")}
|
||||
emptyDescription={t("parent.noChildrenDesc")}
|
||||
/>
|
||||
)
|
||||
}
|
||||
@@ -64,11 +66,11 @@ export default async function ParentGradesPage() {
|
||||
|
||||
return (
|
||||
<ParentChildrenDataPage
|
||||
title="Children Grades"
|
||||
description="Compare grades across all your children. For single-child analysis, open the child's detail page."
|
||||
title={t("parent.title")}
|
||||
description={t("parent.description")}
|
||||
icon={GraduationCap}
|
||||
noRecordsTitle="No grade records"
|
||||
noRecordsDescription="Your children don't have any grade records yet."
|
||||
noRecordsTitle={t("parent.noGrades")}
|
||||
noRecordsDescription={t("parent.noGradesDesc")}
|
||||
items={validItems}
|
||||
renderItem={({ studentId, summary, classAverageTrend }) => (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user