Files
dbx-main/app/modules/project/templates/project/_side_modals.html
T
king 89ad338024 fix(project): review fixes — access leaks, open paths, save safety, concurrency
- Subproject tasks via parent /tasks are re-filtered by current access (FULL/READ kept)
- PUT /api/projects/order: every id must be manageable; bad/duplicate ids -> 400, all-or-nothing
- Inbox, web alert popup, PC notifier open tasks via /project/t/{id}; embed=1 survives redirect;
  old /p/{home}?task= redirects READ users to the linked project
- Project page / snapshot / workload include the opened archived or sub project only
- Alerts: DB-side filters + oldest-first paging (no 50-row cut); badges counted without caps;
  my tasks keep every open task (completed capped)
- Meeting results: next-week meeting open, or own meeting open when no next meeting;
  header edits + result checks under row locks (FOR UPDATE / FOR SHARE)
- Inbox panel waits for the task window save (same retry/discard flow) before switching/closing;
  read failures stay unread
- Attachment upload removes only its own file on DB failure
- New project modal: create once, retry only failed member assignments
- update_task / update_project: locked-row validation in one transaction; completion hints from real transition
- Creator added as explicit member when another owner is chosen
- _once lock lifetime managed by refcount (no leak on failure)
- Section default assignee must still be a registered project user; follower add uses can_assign
- Docs (PROJECT_MODULE 6-15, help), tests (DB-less, real PostgreSQL, jsdom, Chrome)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 11:08:56 +09:00

69 lines
3.7 KiB
HTML

{# ── 좌측 프로젝트 목록(project/_side.html)용 모달 (공용) ──────────────
"+" 새 프로젝트 / ✎ 프로젝트 수정 — 수신함·내 업무·휴지통·프로젝트 화면이
모두 include 한다(동작은 project.js 의 initSideTree). Pro user 이상만 쓰므로
그들에게만 그린다. 색상 원은 window.PJ_COLORS(color_palette, 32색),
아이콘은 window.PJ_ICONS(project_icons — Material Symbols 이름). #}
<script>
window.PJ_COLORS = {{ color_palette | tojson }};
window.PJ_ICONS = {{ (project_icons or []) | tojson }};
window.PJ_ASANA_ICONS = {{ (project_asana_icons or []) | tojson }}; {# 아사나 아이콘 탭 — 값은 "asana:" + 이름 #}
</script>
{% if pj_pro %}
<!-- 새 프로젝트 모달 — 좌측 프로젝트 목록의 + 버튼 -->
<div class="pj-modal" id="pj-modal-project" hidden>
<div class="pj-modal-card">
<h3>새 프로젝트</h3>
<label>이름<input type="text" id="pj-f-name" placeholder="프로젝트 이름" autocomplete="off" /></label>
<label>설명<textarea id="pj-f-desc" rows="2"></textarea></label>
{# 날짜 칸은 project.js enhanceDateInput 이 아사나식 날짜 버튼으로 바꾼다(input 은 숨긴 값 저장소).
label 로 감싸지 않는다 — label 안의 버튼을 누르면 숨긴 input 이 다시 눌리는 문제가 생긴다. #}
<div class="pj-field-label pj-field-inline">마감일<input type="date" id="pj-f-due" /></div>
{# 색상·아이콘은 label 로 감싸지 않는다 — label 글자를 누르면 첫 버튼이 눌린다. #}
<div class="pj-field-label">색상
<span class="pj-color-palette" id="pj-f-colors"></span>
</div>
<div class="pj-field-label">아이콘<span class="pj-icon-tabs"></span>
<div class="pj-icon-palette" id="pj-f-icons"></div>
</div>
<div class="pj-field-label">멤버
<div class="pj-member-picker" id="pj-f-members">불러오는 중…</div>
</div>
<p class="pj-modal-msg" id="pj-f-project-msg" role="status" hidden></p>
<div class="pj-modal-actions">
<button type="button" class="pj-btn" data-close>취소</button>
<button type="button" class="pj-btn pj-btn-primary" id="pj-save-project">만들기</button>
</div>
</div>
</div>
<!-- 프로젝트 수정 모달 — 좌측 프로젝트 목록의 ✎ 버튼 / 우클릭 "수정" -->
<div class="pj-modal" id="pj-modal-edit" hidden>
<div class="pj-modal-card">
<h3>프로젝트 수정</h3>
<input type="hidden" id="pj-e-id" />
<label>이름<input type="text" id="pj-e-name" placeholder="프로젝트 이름" autocomplete="off" /></label>
<label>설명<textarea id="pj-e-desc" rows="2"></textarea></label>
{# 마감일 — 오른쪽 달력 아이콘(없으면 점선 원). 시작일은 날짜 팝업의 "+ 시작일"로 — enhanceDateInput(startInput) #}
<div class="pj-field-label pj-field-inline">마감일
<input type="date" id="pj-e-start" />
<input type="date" id="pj-e-due" />
</div>
<div class="pj-field-label">색상
<span class="pj-color-palette" id="pj-e-colors"></span>
</div>
<div class="pj-field-label">아이콘<span class="pj-icon-tabs"></span>
<div class="pj-icon-palette" id="pj-e-icons"></div>
</div>
<label class="pj-time-toggle">
<input type="checkbox" id="pj-e-done" /> 프로젝트 완료 (목록 끝으로 이동·비활성)
</label>
<div class="pj-modal-actions">
<button type="button" class="pj-btn pj-btn-danger" id="pj-delete-project">삭제</button>
<span style="flex:1"></span>
<button type="button" class="pj-btn" data-close>취소</button>
<button type="button" class="pj-btn pj-btn-primary" id="pj-save-edit">저장</button>
</div>
</div>
</div>
{% endif %}