feat: Implement task notes functionality with CRUD operations and integrate into project tasks section
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user