Round 24: Data Import/Export, School Events, Student Wellness, Styling
- Data Import/Export View: CSV/JSON import with drag-and-drop, column mapping, data preview, validation, export with filters, database statistics - School Event Management View: Calendar/list views, event CRUD with recurring support, registration, feedback, budget tracking - Student Wellness View: Daily check-in (mood, sleep, stress, activity), wellness score gauge, health records, trend charts - 4 new Prisma models: DataImportJob, DataExportJob, WellnessCheckin, WellnessScore - Enhanced SchoolEvent model with budget, registration, recurring, and status fields - Added EventFeedback model - Enhanced auth-view styling with glassmorphism card and animated floating shapes - Enhanced dashboard-view with gradient header, animated stat counters, welcome section - Added global CSS utility classes and keyframe animations - 14+ new API route files - 300+ i18n keys added - All views verified working in browser
This commit is contained in:
1 parent
7ea8dc48c8
commit
a159ed7fe6
22 files changed
+8349
-153
No files matched your search
+127
-1
@@ -104,6 +104,10 @@ model School {
|
||||
bookCheckouts BookCheckout[]
|
||||
bookReservations BookReservation[]
|
||||
seatingCharts SeatingChart[]
|
||||
dataImportJobs DataImportJob[]
|
||||
dataExportJobs DataExportJob[]
|
||||
wellnessCheckins WellnessCheckin[]
|
||||
wellnessScores WellnessScore[]
|
||||
}
|
||||
|
||||
model User {
|
||||
@@ -149,6 +153,7 @@ model User {
|
||||
resources Resource[]
|
||||
organizedSchoolEvents SchoolEvent[]
|
||||
eventRegistrations EventRegistration[]
|
||||
eventFeedbacks EventFeedback[]
|
||||
awardedBadges StudentBadge[]
|
||||
newsletters Newsletter[]
|
||||
competitionsCreated Competition[]
|
||||
@@ -187,6 +192,8 @@ model User {
|
||||
seatingCharts SeatingChart[]
|
||||
bookCheckouts BookCheckout[]
|
||||
bookReservations BookReservation[]
|
||||
dataImportJobs DataImportJob[]
|
||||
dataExportJobs DataExportJob[]
|
||||
}
|
||||
|
||||
model SchoolYear {
|
||||
@@ -305,6 +312,8 @@ model Student {
|
||||
gradingAnnotations GradingAnnotation[]
|
||||
bookCheckouts BookCheckout[]
|
||||
bookReservations BookReservation[]
|
||||
wellnessCheckins WellnessCheckin[]
|
||||
wellnessScores WellnessScore[]
|
||||
|
||||
@@index([userId])
|
||||
}
|
||||
@@ -1622,7 +1631,7 @@ model SchoolEvent {
|
||||
schoolId String
|
||||
title String
|
||||
description String?
|
||||
eventType String // "assembly", "field_trip", "sports_day", "concert", "fair", "parent_meeting", "graduation", "holiday"
|
||||
eventType String // "assembly", "field_trip", "sports_day", "concert", "fair", "parent_meeting", "graduation", "holiday", "cultural", "academic", "social"
|
||||
startDate DateTime
|
||||
endDate DateTime?
|
||||
location String?
|
||||
@@ -1637,11 +1646,20 @@ model SchoolEvent {
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
deletedAt DateTime?
|
||||
budget Float?
|
||||
registrationDeadline DateTime?
|
||||
capacity Int?
|
||||
isRecurring Boolean @default(false)
|
||||
recurrenceRule String? // JSON: { type: "weekly", interval: 1, days: ["mon","wed"] }
|
||||
bannerImageUrl String?
|
||||
status String @default("draft") // draft, published, cancelled, completed
|
||||
feedbackForm String? // JSON: feedback questions
|
||||
|
||||
school School @relation(fields: [schoolId], references: [id])
|
||||
organizer User? @relation(fields: [organizerId], references: [id])
|
||||
classGroup ClassGroup? @relation(fields: [classGroupId], references: [id])
|
||||
registrations EventRegistration[]
|
||||
feedbacks EventFeedback[]
|
||||
|
||||
@@index([schoolId, startDate])
|
||||
@@map("school_events")
|
||||
@@ -1663,6 +1681,21 @@ model EventRegistration {
|
||||
@@map("event_registrations")
|
||||
}
|
||||
|
||||
model EventFeedback {
|
||||
id String @id @default(cuid())
|
||||
eventId String
|
||||
userId String
|
||||
rating Int // 1-5
|
||||
comment String?
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
event SchoolEvent @relation(fields: [eventId], references: [id], onDelete: Cascade)
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
|
||||
@@unique([eventId, userId])
|
||||
@@map("event_feedbacks")
|
||||
}
|
||||
|
||||
// ─── Student Transportation ──────────────────────────────────────
|
||||
|
||||
model StudentTransport {
|
||||
@@ -2803,3 +2836,96 @@ model SeatingChart {
|
||||
@@index([teacherId])
|
||||
@@map("seating_charts")
|
||||
}
|
||||
|
||||
model DataImportJob {
|
||||
id String @id @default(cuid())
|
||||
schoolId String
|
||||
userId String
|
||||
type String // STUDENT, TEACHER, GRADE, ATTENDANCE, COMPETENCY
|
||||
fileName String
|
||||
fileSize Int
|
||||
status String @default("pending") // pending, processing, completed, failed
|
||||
totalRows Int @default(0)
|
||||
successRows Int @default(0)
|
||||
errorRows Int @default(0)
|
||||
errors String? // JSON string of error details
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
school School @relation(fields: [schoolId], references: [id])
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
|
||||
@@index([schoolId])
|
||||
@@index([userId])
|
||||
@@map("data_import_jobs")
|
||||
}
|
||||
|
||||
model DataExportJob {
|
||||
id String @id @default(cuid())
|
||||
schoolId String
|
||||
userId String
|
||||
type String // STUDENT, GRADE, ATTENDANCE, COMPETENCY, REPORT
|
||||
format String // CSV, JSON
|
||||
filters String? // JSON string of filter parameters
|
||||
fileName String?
|
||||
fileSize Int @default(0)
|
||||
status String @default("pending") // pending, processing, completed, failed
|
||||
fileData String? // Base64 encoded file data
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
school School @relation(fields: [schoolId], references: [id])
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
|
||||
@@index([schoolId])
|
||||
@@index([userId])
|
||||
@@map("data_export_jobs")
|
||||
}
|
||||
|
||||
model WellnessCheckin {
|
||||
id String @id @default(cuid())
|
||||
schoolId String
|
||||
studentId String
|
||||
date DateTime
|
||||
mood Int // 1-5
|
||||
sleepHours Float?
|
||||
sleepQuality Int? // 1-5
|
||||
stressLevel Int? // 1-10
|
||||
activityType String?
|
||||
activityMinutes Int?
|
||||
mealsCount Int?
|
||||
waterGlasses Int?
|
||||
gratitudeEntry String?
|
||||
notes String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
school School @relation(fields: [schoolId], references: [id])
|
||||
student Student @relation(fields: [studentId], references: [id])
|
||||
|
||||
@@index([schoolId])
|
||||
@@index([studentId])
|
||||
@@index([date])
|
||||
@@map("wellness_checkins")
|
||||
}
|
||||
|
||||
model WellnessScore {
|
||||
id String @id @default(cuid())
|
||||
schoolId String
|
||||
studentId String
|
||||
date DateTime
|
||||
overallScore Float // 0-100
|
||||
physicalScore Float? // 0-100
|
||||
mentalScore Float? // 0-100
|
||||
socialScore Float? // 0-100
|
||||
academicScore Float? // 0-100
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
school School @relation(fields: [schoolId], references: [id])
|
||||
student Student @relation(fields: [studentId], references: [id])
|
||||
|
||||
@@index([schoolId])
|
||||
@@index([studentId])
|
||||
@@index([date])
|
||||
@@map("wellness_scores")
|
||||
}
|
||||
Reference in new issue
Block a user