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:
2026-10-07 14:24:02 +09:00
parent 2d638804d1
commit 1cfcec2bef
12 changed files with 241 additions and 82 deletions
+8 -5
View File
@@ -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,
@@ -267,5 +267,5 @@
<script src="/static/project-goal-text.js?v=20261003d" defer></script>
<script src="/static/project-meeting-cells.js?v=20261007a" defer></script>
<script src="/static/project.js?v=20261007f" defer></script>
<script src="/static/project.js?v=20261007g" defer></script>
{% endblock %}
@@ -207,5 +207,5 @@
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project-goal-text.js?v=20261003d" defer></script>
<script src="/static/project.js?v=20261007f" defer></script>
<script src="/static/project.js?v=20261007g" defer></script>
{% endblock %}
@@ -407,7 +407,7 @@
<li>위쪽 숫자 카드 4개: <b>완료된 작업 합계 · 미완료 작업 합계 · 마감일이 지난 작업 합계 · 작업 합계</b></li>
<li><b>미완료 작업 합계(섹션별)</b> — 섹션마다 남은 일이 몇 개인지 막대로 보여줍니다. 막대에 마우스를 올리면 숫자가 나옵니다.</li>
<li><b>작업 합계(완료 상태별)</b> — 완료와 미완료 비율을 도넛 차트로 보여줍니다.</li>
<li><b>담당자별 작업 합계(메인·하위 작업, 완료)</b> — 이 범위에서 사람별로 배정된 작업 <b>전부</b>(마감일이 없어도, 필터와 관계없이)를 메인 작업·하위 작업으로 나눠 세고, 각각과 전체의 완료 수·완료율을 보여 줍니다. 하위 작업은 하위 작업에 지정된 담당자 기준입니다. 맨 아래 줄은 합계입니다. <b>관리자에게만</b> 보입니다.</li>
<li><b>담당자별 작업 합계(메인·하위 작업, 완료)</b> — 이 범위에서 사람별로 배정된 작업 <b>전부</b>(마감일이 없어도, 필터와 관계없이)를 사람마다 <b>메인·하위 세로 막대</b>로 보여 줍니다(막대 높이 = 작업 수, 아래 초록 = 완료, 위 숫자 = 완료/전체, 이름 아래 = 전체 완료율). 막대를 누르면 오른쪽에서 그 사람의 업무 목록(미완료·완료)이 나오고, 항목을 누르면 작업 편집 창이 열립니다. 편집 창을 닫으면 숫자와 목록이 다시 계산됩니다. 하위 작업은 하위 작업에 지정된 담당자 기준입니다. <b>관리자에게만</b> 보입니다.</li>
<li>범위(이 프로젝트/전체 프로젝트)와 필터 바 설정을 그대로 따라 계산합니다.</li>
</ul>
</section>
@@ -104,5 +104,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261007f" defer></script>
<script src="/static/project.js?v=20261007g" defer></script>
{% endblock %}
@@ -100,5 +100,5 @@
"today": {{ today | tojson }}
}
</script>
<script src="/static/project.js?v=20261007f" defer></script>
<script src="/static/project.js?v=20261007g" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261007a" />
<link rel="stylesheet" href="/static/project.css?v=20261007b" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<!-- 타임라인 vis-timeline — self-host -->
@@ -492,5 +492,5 @@
</script>
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
<script src="/static/project.js?v=20261007f" defer></script>
<script src="/static/project.js?v=20261007g" defer></script>
{% endblock %}
@@ -70,5 +70,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261007f" defer></script>
<script src="/static/project.js?v=20261007g" defer></script>
{% endblock %}