feat(project): 좌측 프로젝트 트리도 완료 프로젝트 별도 섹션으로 분류
홈 카드와 같은 원칙 — "프로젝트" 목록 아래 "완료 프로젝트" 섹션을 따로 둔다. 서버 렌더(project.html, rejectattr/selectattr로 분리)와 클라이언트 재렌더(project.js renderTree) 둘 다 반영. 완료 섹션이 처음엔 없어도 (완료 프로젝트가 하나도 없던 상태로 열었을 때) 완료로 바뀌는 순간 JS가 동적으로 섹션을 만들고, 마지막 하나가 해제/삭제되면 다시 치운다. 드래그 재정렬은 각 섹션 안에서만(홈 카드와 동일). Co-Authored-By: Claude Sonnet 5 <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=20260918c" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260918d" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -45,5 +45,5 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<script src="/static/project.js?v=20260918c" defer></script>
|
||||
<script src="/static/project.js?v=20260918d" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260918c" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260918d" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -428,5 +428,5 @@
|
||||
window.PJ_COLORS = {{ ["#4573d2","#37a3a3","#62a420","#e8a33d","#e8384f","#aa62e3","#f06a6a","#5a6772"] | tojson }};
|
||||
window.PJ_STAGE_COLORS = {{ ["#4573d2","#37a3a3","#62a420","#e8a33d","#e8384f","#aa62e3","#f06a6a","#5a6772","#e8398a","#a15c43"] | tojson }};
|
||||
</script>
|
||||
<script src="/static/project.js?v=20260918c" defer></script>
|
||||
<script src="/static/project.js?v=20260918d" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260918c" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260918d" />
|
||||
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
<!-- 타임라인 vis-timeline — self-host -->
|
||||
@@ -36,9 +36,7 @@
|
||||
<button type="button" class="pj-icon-btn" id="pj-new-project-side" title="새 프로젝트">+</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if nav_projects %}
|
||||
<ul class="pj-tree" id="pj-tree-root">
|
||||
{% for p in nav_projects %}
|
||||
{% 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 '' }}"
|
||||
@@ -57,11 +55,22 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% 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">
|
||||
@@ -544,5 +553,5 @@
|
||||
</script>
|
||||
|
||||
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
|
||||
<script src="/static/project.js?v=20260918c" defer></script>
|
||||
<script src="/static/project.js?v=20260918d" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user