Connect CalDAV todos to DB-Items, finish todo component and add it to pipeline items

This commit is contained in:
2026-02-24 16:15:21 +01:00
parent 7e2094847f
commit 823cd6391d
27 changed files with 605 additions and 205 deletions
+12 -2
View File
@@ -175,6 +175,8 @@ export function newTodoType(): TodoType {
}
}
export type TodoableType = 'PipelineItem'
export interface Todo {
id: string;
etag: string | null;
@@ -193,6 +195,8 @@ export interface Todo {
parentTodo?: Todo | null;
children?: Todo[];
object: string | null;
todoableId: number;
todoableType: TodoableType;
}
export function newTodo(): Todo {
@@ -213,7 +217,9 @@ export function newTodo(): Todo {
parent: null,
parentTodo: null,
children: [],
object: null
object: null,
todoableId: number,
todoableType: PipelineItem
}
}
@@ -415,7 +421,9 @@ export interface PipelineItem {
expectedRevenue: number | null;
dueDate: string | null;
description: string | null;
notes?: Note<PipelineItem>[];
notes?: Note[];
todos?: Todo[];
nextTodoDueDate?: string | null;
createdAt?: string;
updatedAt?: string;
}
@@ -429,6 +437,8 @@ export function newPipelineItem(): PipelineItem {
dueDate: null,
description: null,
notes: [],
todos: [],
nextTodoDueDate: null,
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(),
}