feat(grades): add ranking trend, school-wide summary, score cell, and scope filter
- Add ranking-trend-card and school-wide-summary-card for broader analytics - Add score-cell and grade-filters components for table rendering - Add scope-filter and type-guards lib utilities for grade data filtering - Update actions, data-access (analytics, ranking, main), stats-service, export - Update schema, types, and grade-utils lib - Update all grade chart and report components (distribution, trend, comparison, query)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { JSX } from "react"
|
||||
import { getTranslations } from "next-intl/server"
|
||||
|
||||
import { ChipNav } from "@/shared/components/ui/chip-nav"
|
||||
|
||||
@@ -9,12 +10,13 @@ interface StatsClassSelectorProps {
|
||||
currentSubjectId: string
|
||||
}
|
||||
|
||||
export function StatsClassSelector({
|
||||
export async function StatsClassSelector({
|
||||
classes,
|
||||
subjects,
|
||||
currentClassId,
|
||||
currentSubjectId,
|
||||
}: StatsClassSelectorProps): JSX.Element {
|
||||
}: StatsClassSelectorProps): Promise<JSX.Element> {
|
||||
const t = await getTranslations("grades")
|
||||
return (
|
||||
<div className="flex flex-wrap gap-2">
|
||||
<ChipNav
|
||||
@@ -33,7 +35,7 @@ export function StatsClassSelector({
|
||||
? `/teacher/grades/stats?classId=${currentClassId}`
|
||||
: `/teacher/grades/stats?classId=${currentClassId}&subjectId=${id}`
|
||||
}
|
||||
allOption={{ id: "all", label: "All Subjects" }}
|
||||
allOption={{ id: "all", label: t("filters.allSubjects") }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user