feat: Implement task notes functionality with CRUD operations and integrate into project tasks section
This commit is contained in:
@@ -16,6 +16,7 @@ export function getAllProjectTasks() {
|
||||
pt.*,
|
||||
COALESCE(pt.custom_task_name, t.name) as task_name,
|
||||
COALESCE(pt.custom_max_wait_days, t.max_wait_days) as max_wait_days,
|
||||
COALESCE(pt.custom_description, t.description) as description,
|
||||
CASE
|
||||
WHEN pt.task_template_id IS NOT NULL THEN 'template'
|
||||
ELSE 'custom'
|
||||
@@ -42,6 +43,7 @@ export function getProjectTasks(projectId) {
|
||||
pt.*,
|
||||
COALESCE(pt.custom_task_name, t.name) as task_name,
|
||||
COALESCE(pt.custom_max_wait_days, t.max_wait_days) as max_wait_days,
|
||||
COALESCE(pt.custom_description, t.description) as description,
|
||||
CASE
|
||||
WHEN pt.task_template_id IS NOT NULL THEN 'template'
|
||||
ELSE 'custom'
|
||||
@@ -72,13 +74,14 @@ export function createProjectTask(data) {
|
||||
} else {
|
||||
// Creating custom task
|
||||
const stmt = db.prepare(`
|
||||
INSERT INTO project_tasks (project_id, custom_task_name, custom_max_wait_days, status, priority)
|
||||
VALUES (?, ?, ?, ?, ?)
|
||||
INSERT INTO project_tasks (project_id, custom_task_name, custom_max_wait_days, custom_description, status, priority)
|
||||
VALUES (?, ?, ?, ?, ?, ?)
|
||||
`);
|
||||
return stmt.run(
|
||||
data.project_id,
|
||||
data.custom_task_name,
|
||||
data.custom_max_wait_days || 0,
|
||||
data.custom_description || "",
|
||||
data.status || "pending",
|
||||
data.priority || "normal"
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user