feat: new tag system
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
export interface IAPITag {
|
||||
name: string;
|
||||
id: number;
|
||||
}
|
||||
export interface ITask {
|
||||
id: string;
|
||||
name: string;
|
||||
checked: boolean;
|
||||
priority: number;
|
||||
date: Date;
|
||||
description: string;
|
||||
tags: string[];
|
||||
new?: boolean;
|
||||
subject: IAPITag;
|
||||
taskType: IAPITag;
|
||||
}
|
||||
|
||||
export interface ITaskView extends Omit<ITask, "taskType"> {
|
||||
task_type: IAPITag;
|
||||
}
|
||||
|
||||
export interface ITaskForm extends Omit<ITask, "date"> {
|
||||
@@ -16,17 +25,16 @@ export interface IApiTask {
|
||||
id: number;
|
||||
title: string;
|
||||
description: string;
|
||||
priority: number;
|
||||
isCompleted: boolean;
|
||||
due_date: string;
|
||||
subject: string;
|
||||
task_type: string;
|
||||
subject: IAPITag;
|
||||
taskType: IAPITag;
|
||||
}
|
||||
|
||||
export interface IApiResponse {
|
||||
profile: string;
|
||||
tasks: IApiTask[];
|
||||
subject_choices: Record<string, string>;
|
||||
task_type_choices: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface ICreateTaskResponse {
|
||||
@@ -53,12 +61,10 @@ export interface ITaskDetails {
|
||||
profile: string;
|
||||
title: string;
|
||||
description: string;
|
||||
subject: string;
|
||||
taskType: string;
|
||||
subject: IAPITag;
|
||||
task_type: IAPITag;
|
||||
priority: number;
|
||||
dateTime_due: string;
|
||||
remind_before_days: number;
|
||||
repeat_reminder: number;
|
||||
reminder_time: string;
|
||||
}
|
||||
|
||||
export interface IDeleteTaskResponse {
|
||||
@@ -85,3 +91,9 @@ export interface IEditTaskResponse {
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export interface IViewTagsResponse {
|
||||
profile: string;
|
||||
subjects: IAPITag[];
|
||||
taskTypes: IAPITag[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user