feat(error-book): implement error book module with SM2 spaced repetition

- Add SM2 algorithm implementation with tests for spaced repetition review scheduling

- Add data-access, schema, types, and server actions for error book CRUD

- Add components: add dialog, class overview, filters, item card, stats cards, review buttons, top wrong questions

- Add error-book routes for admin, teacher, parent, and student roles

- Add i18n messages (en, zh-CN) for error book module
This commit is contained in:
SpecialX
2026-06-23 17:36:42 +08:00
parent 396c2c568d
commit bf056399c6
26 changed files with 3613 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
import { Skeleton } from "@/shared/components/ui/skeleton"
export default function StudentErrorBookLoading() {
return (
<div className="flex h-full flex-col space-y-8 p-8">
<div className="flex flex-col justify-between space-y-4 md:flex-row md:items-center md:space-y-0">
<div className="space-y-2">
<Skeleton className="h-8 w-[180px]" />
<Skeleton className="h-4 w-[280px]" />
</div>
<Skeleton className="h-10 w-[120px]" />
</div>
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-5">
{Array.from({ length: 5 }).map((_, idx) => (
<Skeleton key={idx} className="h-[120px] w-full rounded-md" />
))}
</div>
<div className="space-y-4">
<Skeleton className="h-10 w-full" />
<div className="grid gap-3 md:grid-cols-2">
{Array.from({ length: 4 }).map((_, idx) => (
<Skeleton key={idx} className="h-[180px] w-full rounded-md" />
))}
</div>
</div>
</div>
)
}