Round 20: Student Portal, District Management, userId field, styling enhancements, bug fixes

- Added userId field to Student model with User relation
- Created Student Portal view with 6 tabs (competencies, goals, achievements, schedule, homework, feedback)
- Created StudentGoal model + CRUD API with role-based access
- Created District Management view with CRUD, analytics, school assignment
- Enhanced auth page: animated gradient, floating particles, glassmorphism, staggered entrance
- Enhanced dashboard: time-based greeting, animated stat cards, class overview, school branding
- Enhanced student portal: hero section, circular progress, streak counter, celebration particles
- Fixed student-goals API 403 for STUDENT role (name-matching fallback for legacy data)
- Added userId filter to students API with OR fallback
- Added nav.student-portal i18n key
- 100+ new i18n keys in DE and EN
- All lint checks pass
This commit is contained in:
Mustafa Cetin committed 2026-07-29 18:45:41 +00:00
1 parent 9680cc9244
commit 04ae7aa80c
23 files changed
+4624 -2868

No files matched your search

+25
View File
@@ -133,6 +133,7 @@ model User {
rewardRedemptions RewardRedemption[]
rewardPoints RewardPoints[]
studentAnswers StudentAnswer[]
student Student?
}
model SchoolYear {
@@ -209,10 +210,12 @@ model Student {
externalId String? // for import matching
avatarUrl String? // student photo/avatar URL
avatarInitials String? // computed from firstName + lastName first chars
userId String? @unique // optional link to User account (for student self-service)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
deletedAt DateTime?
user User? @relation(fields: [userId], references: [id])
school School @relation(fields: [schoolId], references: [id])
enrollments Enrollment[]
learningProgressEntries LearningProgressEntry[]
@@ -236,6 +239,9 @@ model Student {
transports StudentTransport[]
healthRecords HealthRecord[]
studentBadges StudentBadge[]
goals StudentGoal[]
@@index([userId])
}
model Enrollment {
@@ -1912,3 +1918,22 @@ model RewardPoints {
@@index([source])
@@map("reward_points")
}
// ─── Student Goals (Student Portal) ─────────────────────────────────
model StudentGoal {
id String @id @default(cuid())
studentId String
title String
description String?
targetDate DateTime?
progress Int @default(0)
status String @default("active") // active, completed, abandoned
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
student Student @relation(fields: [studentId], references: [id])
@@index([studentId])
@@index([status])
}