init
This commit is contained in:
commit
5577214005
22 changed files with 4997 additions and 0 deletions
58
src/types/index.ts
Normal file
58
src/types/index.ts
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
export type AssignmentStatus =
|
||||
| 'completed'
|
||||
| 'next-week'
|
||||
| 'due-soon'
|
||||
| 'active'
|
||||
| 'overdue'
|
||||
| 'future';
|
||||
|
||||
export interface Assignment {
|
||||
id: string; // SHA-256 deterministic hash
|
||||
subject: string; // e.g. "AYT Kimya" (Turkish original)
|
||||
type: string; // e.g. "Yayın" (Turkish original)
|
||||
unit: string;
|
||||
topic: string;
|
||||
startDate: string; // raw string e.g. "20.10.2026"
|
||||
endDate: string; // raw string e.g. "26.10.2026"
|
||||
parsedStartDate: string | null; // ISO "2026-10-20"
|
||||
parsedEndDate: string | null; // ISO "2026-10-26"
|
||||
description: string; // original Turkish text
|
||||
detectedCheckDate: string | null; // e.g. "26-30 Ekim"
|
||||
status: AssignmentStatus;
|
||||
completed: boolean;
|
||||
completedAt: string | null;
|
||||
page?: number;
|
||||
}
|
||||
|
||||
export interface SubjectStat {
|
||||
subject: string;
|
||||
total: number;
|
||||
completed: number;
|
||||
active: number;
|
||||
percentage: number;
|
||||
}
|
||||
|
||||
export interface DashboardStats {
|
||||
total: number;
|
||||
completed: number;
|
||||
active: number;
|
||||
checkedNextWeek: number;
|
||||
dueSoon: number;
|
||||
overdue: number;
|
||||
completionRate: number;
|
||||
bySubject: Record<string, SubjectStat>;
|
||||
}
|
||||
|
||||
export interface StudentStore {
|
||||
studentId: string;
|
||||
lastSynced: string | null;
|
||||
rememberedCredentials?: {
|
||||
studentId: string;
|
||||
password: string;
|
||||
};
|
||||
assignments: Record<string, Assignment>;
|
||||
}
|
||||
|
||||
export interface DatabaseSchema {
|
||||
students: Record<string, StudentStore>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue