feat(project): 업무 휴지통(3개월 보관·관리자 복구) + 하위 업무 우클릭 삭제
- 업무 삭제 시 지우기 직전 스냅샷(업무·하위 업무·댓글·팔로워·@태그·첨부 기록·연결·활동 이력·마감 알림 기록)을 같은 트랜잭션에서 project_trash 에 JSONB 로 남기고 삭제. 첨부 실물은 DATA_DIR/project/_trash/<id>/ 로 이동. - 관리자 전용 휴지통(/project/trash, 좌측 메뉴): 원래 id 그대로 복구(중복· 지워진 프로젝트·상위 없는 하위는 거부, 지워진 세션은 미지정으로). 3개월 지난 항목은 휴지통 화면/삭제 때 영구 정리. - 삭제 확인 공용화(confirmTaskDelete): 하위 업무가 있으면 'N개까지 모두 삭제' 를 명확히 묻고, 휴지통 보관 안내. 카드 하위 업무 우클릭 메뉴 (열기/완료/하위 업무 삭제). - DB: project_db_010_trash.sql. 미적용이면 예전처럼 영구 삭제. - 로컬 PostgreSQL 17 로 삭제→휴지통→복구·거부 조건·만료 정리 검증. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
my_open_total 진행 중인 내 업무 개수 (내 업무 배지)
|
||||
nav_projects 프로젝트 목록(평면)
|
||||
current_pid 지금 보고 있는 프로젝트 id (내 업무/수신함 화면이면 0)
|
||||
side_active 'inbox' | 'mytasks' | '' — 개인 메뉴 활성 표시
|
||||
side_active 'inbox' | 'mytasks' | 'trash' | '' — 개인 메뉴 활성 표시
|
||||
is_admin 프로젝트 생성/수정/삭제 권한
|
||||
프로젝트 수정/삭제(✎/×) 버튼은 그 동작을 배선하는 initProject 가 도는
|
||||
프로젝트 화면에서만 그린다(current_pid 로 판별). #}
|
||||
@@ -33,6 +33,13 @@
|
||||
<span class="pj-side-navbadge pj-side-navbadge-open" id="pj-myopen-badge"
|
||||
{% if not my_open_total %}hidden{% endif %}>{{ my_open_total }}</span>
|
||||
</a>
|
||||
{# 휴지통 — 관리자만 보이고(화면·복구 API 도 관리자 전용), 지운 업무를 3개월 보관. #}
|
||||
{% if is_admin %}
|
||||
<a class="pj-side-navlink {% if side_active == 'trash' %}is-active{% endif %}" href="/project/trash">
|
||||
<span class="material-symbols-outlined pj-side-navic">delete</span>
|
||||
<span class="pj-side-navtext">휴지통</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
|
||||
<div class="pj-side-block">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260924i" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260924j" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -98,5 +98,5 @@
|
||||
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project.js?v=20260924i" defer></script>
|
||||
<script src="/static/project.js?v=20260924j" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260924i" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260924j" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -119,5 +119,5 @@
|
||||
"today": {{ today | tojson }}
|
||||
}
|
||||
</script>
|
||||
<script src="/static/project.js?v=20260924i" defer></script>
|
||||
<script src="/static/project.js?v=20260924j" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260924i" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260924j" />
|
||||
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
<!-- 타임라인 vis-timeline — self-host -->
|
||||
@@ -505,5 +505,5 @@
|
||||
</script>
|
||||
|
||||
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
|
||||
<script src="/static/project.js?v=20260924i" defer></script>
|
||||
<script src="/static/project.js?v=20260924j" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260924j" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{# 휴지통 — 관리자 전용. 지운 업무(하위 업무·댓글·팔로워·첨부 포함)를 3개월
|
||||
보관하고, [복구] 로 원래 id 그대로 되살린다(project_db 010). #}
|
||||
<div class="pj-wrap pj-inbox-view pj-trash-view">
|
||||
<div class="pj-layout">
|
||||
{% with current_pid = 0, side_active = "trash" %}{% include "project/_side.html" %}{% endwith %}
|
||||
|
||||
<section class="pj-main">
|
||||
<div class="pj-section-head">
|
||||
<h2>휴지통</h2>
|
||||
<span class="pj-trash-note">삭제한 업무는 3개월 동안 보관된 뒤 영구 삭제됩니다. 복구는 관리자만 할 수 있습니다.</span>
|
||||
</div>
|
||||
<div class="pj-view pj-inbox-pane">
|
||||
{% if not trash_enabled %}
|
||||
<div class="pj-empty">
|
||||
휴지통이 아직 준비되지 않았습니다(DB 마이그레이션 010 필요). 지금은 삭제하면 바로 영구 삭제됩니다.
|
||||
</div>
|
||||
{% elif not items %}
|
||||
<div class="pj-empty">휴지통이 비어 있습니다.</div>
|
||||
{% else %}
|
||||
<table class="pj-table pj-trash-table" id="pj-trash-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>업무</th>
|
||||
<th>프로젝트</th>
|
||||
<th>포함</th>
|
||||
<th>삭제한 사람</th>
|
||||
<th>삭제일</th>
|
||||
<th>남은 보관</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for it in items %}
|
||||
<tr data-id="{{ it.id }}">
|
||||
<td class="pj-trash-title">{{ it.title }}</td>
|
||||
<td>{{ it.project_name or '-' }}</td>
|
||||
<td class="pj-trash-meta">
|
||||
{% if it.task_count > 1 %}하위 업무 {{ it.task_count - 1 }}{% endif %}
|
||||
{% if it.comment_count %}{% if it.task_count > 1 %} · {% endif %}댓글 {{ it.comment_count }}{% endif %}
|
||||
{% if it.attachment_count %} · 첨부 {{ it.attachment_count }}{% endif %}
|
||||
{% if it.task_count <= 1 and not it.comment_count and not it.attachment_count %}-{% endif %}
|
||||
</td>
|
||||
<td>{{ it.deleted_by_id or '-' }}</td>
|
||||
<td>{{ it.deleted_label }}</td>
|
||||
<td>{% if it.days_left is not none %}{{ it.days_left }}일{% else %}-{% endif %}</td>
|
||||
<td class="pj-trash-act">
|
||||
<button type="button" class="pj-btn pj-btn-primary pj-trash-restore"
|
||||
data-id="{{ it.id }}" data-title="{{ it.title }}" data-count="{{ it.task_count }}">복구</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project.js?v=20260924j" defer></script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user