feat(project): 홈 화면 폐지 → 내 업무 화면 · 하위 업무 전체폭/완료 체크
- /project/ 가 프로젝트 홈(카드 그리드) 대신 "내 업무" 화면이 된다 (project/mytasks.html). 내가 담당자인 업무를 한 표에 모아 보여준다 — 완료 체크박스 · 업무 · 프로젝트 · 세션 · 우선순위 · 시작 · 마감, 헤더 클릭 정렬, 진행중/완료/전체 필터, 진행·완료·지연 요약. 체크박스로 그 자리에서 완료 토글, 행을 누르면 그 프로젝트로 이동하며 업무 편집 팝업(?task=), 우클릭은 열기/완료/삭제. - 좌측 "내 업무"는 접이식 패널을 없애고 이 화면으로 가는 링크로 바꿨다. - 좌측 사이드바를 project/_side.html 로 뽑아 두 화면이 공용으로 쓴다. - 홈 전용 코드 삭제: templates/project/index.html, project.js 의 initHome/wireProjectGridDrag/updateMyTreeCounts/wireMyTreeToggles(약 900줄), router 의 홈 카드 집계와 _group_my_tasks, project.css 의 홈 카드/내 업무 트리 스타일. 새 프로젝트 모달은 두 화면이 쓰도록 initNewProjectModal 로 분리했다. - 업무 편집 팝업: 하위 업무를 우측 칼럼에서 빼내 설명 바로 아래, 팝업 너비 전체를 쓰는 행으로 옮겼다(.pj-subtask-full). 제목 왼쪽 체크박스로 완료를 토글하고 완료된 줄은 반투명(50%) + 취소선. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260922b" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260922c" />
|
||||
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
<!-- 타임라인 vis-timeline — self-host -->
|
||||
@@ -27,129 +27,8 @@
|
||||
data-me="{{ user.email }}">
|
||||
|
||||
<div class="pj-layout">
|
||||
<!-- ── 좌측: 프로젝트 트리 + 멤버 ── -->
|
||||
<aside class="pj-side">
|
||||
<!-- 아사나처럼 맨 위에 개인 메뉴(수신함 / 내 업무). 둘 다 기본 접힘이고
|
||||
누르면 펼쳐진다 — 예전 화면 오른쪽에 항상 떠 있던 "내 업무" 패널을
|
||||
이 메뉴가 대신한다. -->
|
||||
<nav class="pj-side-nav">
|
||||
<a class="pj-side-navlink" href="/project/inbox">
|
||||
<span class="material-symbols-outlined pj-side-navic">inbox</span>
|
||||
<span class="pj-side-navtext">수신함</span>
|
||||
<span class="pj-side-navbadge" id="pj-mention-badge"
|
||||
{% if not mention_unread %}hidden{% endif %}>{{ mention_unread }}</span>
|
||||
</a>
|
||||
<button type="button" class="pj-side-navlink pj-mytasks-toggle" id="pj-mytasks-toggle"
|
||||
aria-expanded="false" aria-controls="pj-mytasks-panel">
|
||||
<span class="material-symbols-outlined pj-side-navic">checklist</span>
|
||||
<span class="pj-side-navtext">내 업무</span>
|
||||
<span class="pj-side-navbadge pj-side-navbadge-open"
|
||||
{% if not my_open_total %}hidden{% endif %}>{{ my_open_total }}</span>
|
||||
<span class="material-symbols-outlined pj-side-navcaret">expand_more</span>
|
||||
</button>
|
||||
</nav>
|
||||
<!-- 내 업무 목록 — 접힌 상태가 기본. 업무를 고르면 팝업이 열리면서 다시 접힌다. -->
|
||||
<div class="pj-mytasks-panel" id="pj-mytasks-panel" hidden>
|
||||
{% if not my_projects %}
|
||||
<div class="pj-empty-sm">배정된 업무가 없습니다.</div>
|
||||
{% else %}
|
||||
<div class="pj-mytree">
|
||||
{% for p in my_projects %}
|
||||
<div class="pj-mytree-group" data-group-id="{{ p.id }}">
|
||||
<div class="pj-mytree-head">
|
||||
<button type="button" class="pj-mytree-toggle" title="펼치기/접기">
|
||||
<span class="material-symbols-outlined" style="color: {{ p.color }}; font-size:18px;">folder_open</span>
|
||||
</button>
|
||||
<a class="pj-mytree-proj" href="/project/p/{{ p.id }}">
|
||||
<span class="pj-mytree-proj-name">{{ p.name }}</span>
|
||||
</a>
|
||||
<span class="pj-mytree-counts">
|
||||
<span class="pj-mtc-num pj-mtc-open" data-tip="진행">{{ p.open }}</span>
|
||||
<span class="pj-mtc-num pj-mtc-done" data-tip="완료">{{ p.done }}</span>
|
||||
</span>
|
||||
</div>
|
||||
<ul class="pj-mytree-tasks">
|
||||
{% for t in p.tasks %}
|
||||
<li class="pj-mytree-task {% if t.completed_at %}is-done{% endif %}">
|
||||
<a href="/project/p/{{ t.project_id }}?task={{ t.id }}" data-task-id="{{ t.id }}" class="pj-task-popup-link">
|
||||
<span class="pj-mytree-lead">
|
||||
{% if t.comment_count %}
|
||||
<span class="pj-cmt-badge" data-task-id="{{ t.id }}" data-count="{{ t.comment_count }}" title="댓글 {{ t.comment_count }}개">
|
||||
<span class="pj-cmt-ic">💬</span><span class="pj-cmt-n">{{ t.comment_count }}</span>
|
||||
</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
<span class="pj-mytree-body">
|
||||
<span class="pj-mytree-title">{{ t.title }}</span>
|
||||
{% if t.start_date or t.due_date %}
|
||||
<span class="pj-mytree-dates">
|
||||
{% if t.start_date and t.due_date %}{{ t.start_label }} ~ {{ t.due_label }}
|
||||
{% elif t.due_date %}~ {{ t.due_label }}
|
||||
{% else %}{{ t.start_label }} ~{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="pj-side-block">
|
||||
<div class="pj-side-head">
|
||||
<span>프로젝트</span>
|
||||
{% if is_admin %}
|
||||
<button type="button" class="pj-icon-btn" id="pj-new-project-side" title="새 프로젝트">+</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% macro nav_li(p) %}
|
||||
<li class="pj-tree-li" data-id="{{ p.id }}"
|
||||
data-name="{{ p.name }}" data-desc="{{ p.description or '' }}"
|
||||
data-start="{{ p.start_date or '' }}" data-due="{{ p.due_date or '' }}"
|
||||
data-color="{{ p.color }}" data-status="{{ p.status or 'active' }}"
|
||||
data-creator="{{ p.created_by or '' }}">
|
||||
<div class="pj-tree-row {% if p.id == project.id %}is-active{% endif %}">
|
||||
<a class="pj-tree-link" href="/project/p/{{ p.id }}">
|
||||
<span class="pj-tree-avatar" style="background: {{ p.color }}">{{ p.name[0] | upper }}</span>
|
||||
<span class="pj-tree-name">{{ p.name }}</span>
|
||||
</a>
|
||||
{% if is_admin %}
|
||||
<span class="pj-tree-acts">
|
||||
<button type="button" class="pj-icon-btn pj-tree-edit" title="프로젝트 수정">✎</button>
|
||||
<button type="button" class="pj-icon-btn pj-tree-del" data-id="{{ p.id }}" data-name="{{ p.name }}" data-creator="{{ p.created_by }}" title="프로젝트 삭제">×</button>
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% endmacro %}
|
||||
{% set nav_active = nav_projects | rejectattr("status", "equalto", "completed") | list %}
|
||||
{% set nav_done = nav_projects | selectattr("status", "equalto", "completed") | list %}
|
||||
{% if nav_active %}
|
||||
<ul class="pj-tree" id="pj-tree-root">
|
||||
{% for p in nav_active %}{{ nav_li(p) }}{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<div class="pj-empty-sm">프로젝트 없음</div>
|
||||
{% endif %}
|
||||
{% if nav_done %}
|
||||
<div class="pj-side-head pj-side-head-done"><span>완료 프로젝트</span></div>
|
||||
<ul class="pj-tree" id="pj-tree-root-done">
|
||||
{% for p in nav_done %}{{ nav_li(p) }}{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- 전체 멤버 — 등록된 전체 직원(프로젝트 권한 보유자). 아이콘 클릭 시
|
||||
그 사람이 담당자인 업무를 팝업으로 보여준다(프로젝트/세션/마감일). -->
|
||||
<div class="pj-side-block">
|
||||
<div class="pj-side-head"><span>전체 멤버</span></div>
|
||||
<div class="pj-allmembers-grid" id="pj-allmembers-grid">불러오는 중…</div>
|
||||
</div>
|
||||
</aside>
|
||||
<!-- ── 좌측 사이드바 — 내 업무 화면과 공용(project/_side.html) ── -->
|
||||
{% with current_pid = project.id %}{% include "project/_side.html" %}{% endwith %}
|
||||
|
||||
<!-- ── 우측: 뷰 ── -->
|
||||
<section class="pj-main">
|
||||
@@ -426,21 +305,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pj-modal-col-side">
|
||||
<!-- 하위 업무 (기존 업무 편집 시에만) -->
|
||||
<div class="pj-task-extra" id="pj-subtask-block" hidden>
|
||||
<div class="pj-extra-head">
|
||||
<span class="material-symbols-outlined pj-gicon pj-gicon-sm">checklist</span> 하위 업무
|
||||
</div>
|
||||
<ul class="pj-subtask-list" id="pj-subtask-list"></ul>
|
||||
<div class="pj-subtask-form">
|
||||
<input type="text" id="pj-subtask-input" placeholder="하위 업무 제목…" />
|
||||
<select id="pj-subtask-add-assignee"><option value="">(미지정)</option></select>
|
||||
<input type="date" id="pj-subtask-add-due" />
|
||||
<button type="button" class="pj-btn pj-btn-primary" id="pj-subtask-add">추가</button>
|
||||
</div>
|
||||
<!-- 하위 업무 — 설명 바로 아래 줄에서 팝업 너비 전체를 쓴다
|
||||
(.pj-modal-body 그리드의 3번째 행, 1 / -1). 기존 업무 편집 시에만. -->
|
||||
<div class="pj-task-extra pj-subtask-full" id="pj-subtask-block" hidden>
|
||||
<div class="pj-extra-head">
|
||||
<span class="material-symbols-outlined pj-gicon pj-gicon-sm">checklist</span> 하위 업무
|
||||
</div>
|
||||
<ul class="pj-subtask-list" id="pj-subtask-list"></ul>
|
||||
<div class="pj-subtask-form">
|
||||
<input type="text" id="pj-subtask-input" placeholder="하위 업무 제목…" />
|
||||
<select id="pj-subtask-add-assignee"><option value="">(미지정)</option></select>
|
||||
<input type="date" id="pj-subtask-add-due" />
|
||||
<button type="button" class="pj-btn pj-btn-primary" id="pj-subtask-add">추가</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pj-modal-col-side">
|
||||
<!-- 첨부파일 (기존 업무 편집 시에만) -->
|
||||
<div class="pj-task-extra" id="pj-attach-block" hidden>
|
||||
<div class="pj-extra-head">
|
||||
@@ -568,11 +448,10 @@
|
||||
"projects": {{ projects_meta | tojson }},
|
||||
"stagesByProject": {{ stages_by_project | tojson }},
|
||||
"boardStages": {{ board_stage_names | tojson }},
|
||||
"avatars": {{ avatars | tojson }},
|
||||
"myTasks": {{ my_tasks | tojson }}
|
||||
"avatars": {{ avatars | tojson }}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
|
||||
<script src="/static/project.js?v=20260922b" defer></script>
|
||||
<script src="/static/project.js?v=20260922c" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user