feat: Implement task notes functionality with CRUD operations and integrate into project tasks section

This commit is contained in:
Chop
2025-06-03 20:46:37 +02:00
parent a9afebdda5
commit 330744daf9
9 changed files with 309 additions and 20 deletions

View File

@@ -12,3 +12,20 @@ export function addNoteToProject(project_id, note) {
note
);
}
export function getNotesByTaskId(task_id) {
return db
.prepare(`SELECT * FROM notes WHERE task_id = ? ORDER BY note_date DESC`)
.all(task_id);
}
export function addNoteToTask(task_id, note) {
db.prepare(`INSERT INTO notes (task_id, note) VALUES (?, ?)`).run(
task_id,
note
);
}
export function deleteNote(note_id) {
db.prepare(`DELETE FROM notes WHERE note_id = ?`).run(note_id);
}