feat(targeted): add targeted practice functionality

feat(analytics); add analytics page
This commit is contained in:
shafin-r
2026-02-05 15:07:24 +06:00
parent 2ac88835f9
commit 903653a212
20 changed files with 2018 additions and 35 deletions

View File

@ -1,4 +1,5 @@
import type { Question } from "./sheet";
import type { ExamMode } from "./test";
type Answer = {
id: string;
@ -14,14 +15,27 @@ type Answer = {
*/
export interface SessionRequest {
sheet_id: string;
mode: string;
topic_ids: string[];
difficulty: string;
question_count: number;
sheet_id?: string;
mode: ExamMode;
time_limit_minutes: number;
topic_ids?: string[];
difficulty?: string;
question_count?: number;
section?: string;
}
// export interface TargetedSessionResponse {
// id: string;
// practice_sheet_id: null;
// status: string;
// current_module_index: number;
// current_model_id: null;
// current_module_title: null;
// answers: Answer[];
// started_at: string;
// score: number;
// }
export interface SessionResponse {
id: string;
practice_sheet_id: string;

11
src/types/test.ts Normal file
View File

@ -0,0 +1,11 @@
// types/exam.ts
export type ExamMode = "MODULE" | "TARGETED" | "SIMULATION" | "DRILLS";
export interface StartExamPayload {
sheet_id: string;
topic_ids: string[];
difficulty: "EASY" | "MEDIUM" | "HARD";
question_count: number;
time_limit_minutes: number;
mode: ExamMode;
}

8
src/types/topic.ts Normal file
View File

@ -0,0 +1,8 @@
export interface Topic {
name: string;
section: "EBRW" | "MATH";
parent_id: string;
id: string;
slug: string;
parent_name: string;
}