feat(dashboard): optimize teacher dashboard ui and layout

- Refactor layout: move Needs Grading to main column, Homework to sidebar
- Enhance TeacherStats: replace static counts with actionable metrics (Needs Grading, Active Assignments, Avg Score, Submission Rate)
- Update RecentSubmissions: table view with quick grade actions and late status
- Update TeacherSchedule: vertical timeline view with scroll hints
- Update TeacherHomeworkCard: compact list view
- Integrate Recharts: add TeacherGradeTrends chart and shared chart component
- Update documentation
This commit is contained in:
SpecialX
2026-01-12 11:38:27 +08:00
parent 8577280ab2
commit ade8d4346c
17 changed files with 1383 additions and 234 deletions

View File

@@ -1,11 +1,22 @@
import { TeacherQuickActions } from "./teacher-quick-actions"
export function TeacherDashboardHeader() {
interface TeacherDashboardHeaderProps {
teacherName: string
}
export function TeacherDashboardHeader({ teacherName }: TeacherDashboardHeaderProps) {
const today = new Date().toLocaleDateString("en-US", {
weekday: "long",
year: "numeric",
month: "long",
day: "numeric",
})
return (
<div className="flex flex-col justify-between space-y-4 md:flex-row md:items-center md:space-y-0">
<div>
<h2 className="text-2xl font-bold tracking-tight">Teacher</h2>
<p className="text-muted-foreground">Overview of today&apos;s work and your classes.</p>
<h2 className="text-2xl font-bold tracking-tight">Good morning, {teacherName}</h2>
<p className="text-muted-foreground">It&apos;s {today}. Here&apos;s your daily overview.</p>
</div>
<TeacherQuickActions />
</div>