feat: show tasks and creating them

This commit is contained in:
2025-05-07 11:14:17 +03:00
parent 852ac9ad0d
commit ce694f0be8
2 changed files with 198 additions and 55 deletions

View File

@@ -11,3 +11,46 @@ export interface ITask {
export interface ITaskForm extends Omit<ITask, "date"> {
date: string;
}
export interface IApiTask {
id: number;
title: string;
description: string;
isCompleted: boolean;
due_date: string;
subject: string;
task_type: string;
}
export interface IApiDay {
date: string;
name: string;
tasks: IApiTask[];
}
export interface IApiResponse {
profile: string;
days: IApiDay[];
subject_choices: Record<string, string>;
task_type_choices: Record<string, string>;
}
export interface ICreateTaskResponse {
success: boolean;
message: string;
profile: string;
task: {
id: number;
title: string;
description: string;
subject: string;
taskType: string;
dateTime_due: string;
isCompleted: boolean;
reminder?: {
remind_before_days: number;
repeat_interval: number;
reminder_time: string;
};
};
}