feat(project): workload as vertical bars with task list drawer
Per assignee, main and subtask bars (height = count, green = done). Clicking a bar slides in a right-side panel listing those tasks; clicking an item opens the task editor. Closing the editor refreshes the counts. Subtask summary API now returns id, title, due date. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -485,17 +485,20 @@ class ProjectStore:
|
||||
)
|
||||
|
||||
def list_subtasks_of(self, *, parent_ids: list[int]) -> list[dict[str, Any]]:
|
||||
"""하위 업무 요약(대시보드 담당자별 집계용) — 부모 id·담당자·완료 여부만."""
|
||||
"""하위 업무 요약(대시보드 담당자별 집계·업무 목록 패널용) — id·부모·제목·마감일·완료·담당자."""
|
||||
ids = sorted({int(i) for i in parent_ids})
|
||||
if not ids:
|
||||
return []
|
||||
with self._pool.connection() as conn:
|
||||
rows = conn.execute(
|
||||
"SELECT parent_task_id, assignee_email, assignee_name, completed_at IS NOT NULL AS done "
|
||||
"FROM tasks WHERE parent_task_id = ANY(%s)", (ids,),
|
||||
"SELECT id, parent_task_id, title, due_date, completed_at, assignee_email, assignee_name "
|
||||
"FROM tasks WHERE parent_task_id = ANY(%s) ORDER BY id", (ids,),
|
||||
).fetchall()
|
||||
return [{"parent_task_id": int(r["parent_task_id"]), "assignee_email": r["assignee_email"] or "",
|
||||
"assignee_name": r["assignee_name"] or "", "done": bool(r["done"])} for r in rows]
|
||||
return [{"id": int(r["id"]), "parent_task_id": int(r["parent_task_id"]), "title": r["title"] or "",
|
||||
"due_date": r["due_date"].isoformat() if r["due_date"] else None,
|
||||
"completed_at": r["completed_at"].isoformat() if r["completed_at"] else None,
|
||||
"assignee_email": r["assignee_email"] or "", "assignee_name": r["assignee_name"] or "",
|
||||
"done": r["completed_at"] is not None} for r in rows]
|
||||
|
||||
def list_tasks_for_projects(
|
||||
self, *, project_ids: list[int], assignee_email: str | None = None,
|
||||
|
||||
Reference in New Issue
Block a user