fix: patch P0 security vulnerabilities and critical UX issues across 6 modules

Security: Add admin/layout.tsx auth guard; Add requirePermission() to 12 admin pages

Dashboard: Fix StudentStatsGrid rendering; Fix teacher greeting; Add loading/error boundaries; Fix col-span; Add metadata

Announcements: Fix audience filtering; Add user detail page; Trigger notifications on publish; Pass classes data; Add loading.tsx

Messages: Implement soft delete; Add unread badge with polling; Add notification dropdown polling; Add keyword search; Add quiet hours DND

Management: Add loading/error for 9 admin routes; Fix admin-classes-view to use Select for school/grade

Profile/Settings: Add loading/error; Fix parent role routing; Create ParentSettingsView; Integrate AiProviderSettingsCard; Add Tab URL persistence; Add logout confirm; Add avatar; Fix Progress arbitrary class

Schema: Add senderDeletedAt/receiverDeletedAt to messages; Add quietHours to notificationPreferences; Add uniqueIndex import

Docs: Update architecture docs 004/005
This commit is contained in:
SpecialX
2026-06-22 13:57:31 +08:00
parent 5ff7ab9e72
commit a4d096a6fc
81 changed files with 2145 additions and 124 deletions

View File

@@ -8,6 +8,8 @@ import type { StudentHomeworkProgressStatus } from "@/modules/homework/types"
export const dynamic = "force-dynamic"
export const metadata = { title: "Dashboard - Next_Edu" }
const toWeekday = (d: Date): 1 | 2 | 3 | 4 | 5 | 6 | 7 => {
// getDay() 返回 0(周日)-6(周六),转换为 1-7周一为 1
const WEEKDAY_MAP = [7, 1, 2, 3, 4, 5, 6] as const
@@ -85,10 +87,6 @@ export default async function StudentDashboardPage() {
return (
<div className="space-y-8">
<div>
<h2 className="text-2xl font-bold tracking-tight">Dashboard</h2>
<p className="text-muted-foreground">Welcome back, {student.name}.</p>
</div>
<StudentDashboard
studentName={student.name}
enrolledClassCount={classes.length}