feat: projects with context - schema, API, frontend page, task assignment (HQ-17, HQ-21)
This commit is contained in:
@@ -152,6 +152,7 @@ export const taskRoutes = new Elysia({ prefix: "/api/tasks" })
|
||||
priority: body.priority || "medium",
|
||||
position: (maxPos[0]?.max ?? 0) + 1,
|
||||
taskNumber: nextNumber,
|
||||
projectId: body.projectId || null,
|
||||
progressNotes: [],
|
||||
})
|
||||
.returning();
|
||||
@@ -188,6 +189,7 @@ export const taskRoutes = new Elysia({ prefix: "/api/tasks" })
|
||||
t.Literal("low"),
|
||||
])
|
||||
),
|
||||
projectId: t.Optional(t.Union([t.String(), t.Null()])),
|
||||
}),
|
||||
}
|
||||
)
|
||||
@@ -233,6 +235,7 @@ export const taskRoutes = new Elysia({ prefix: "/api/tasks" })
|
||||
if (body.position !== undefined) updates.position = body.position;
|
||||
if (body.assigneeId !== undefined) updates.assigneeId = body.assigneeId;
|
||||
if (body.assigneeName !== undefined) updates.assigneeName = body.assigneeName;
|
||||
if (body.projectId !== undefined) updates.projectId = body.projectId;
|
||||
|
||||
const updated = await db
|
||||
.update(tasks)
|
||||
@@ -259,6 +262,7 @@ export const taskRoutes = new Elysia({ prefix: "/api/tasks" })
|
||||
position: t.Optional(t.Number()),
|
||||
assigneeId: t.Optional(t.Union([t.String(), t.Null()])),
|
||||
assigneeName: t.Optional(t.Union([t.String(), t.Null()])),
|
||||
projectId: t.Optional(t.Union([t.String(), t.Null()])),
|
||||
}),
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user