diff --git a/app/modules/project/templates/project/inbox.html b/app/modules/project/templates/project/inbox.html index 1df813a..a123116 100644 --- a/app/modules/project/templates/project/inbox.html +++ b/app/modules/project/templates/project/inbox.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} @@ -45,5 +45,5 @@ {% endif %} - + {% endblock %} diff --git a/app/modules/project/templates/project/index.html b/app/modules/project/templates/project/index.html index ee65ef3..dc37065 100644 --- a/app/modules/project/templates/project/index.html +++ b/app/modules/project/templates/project/index.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} @@ -330,5 +330,5 @@ - + {% endblock %} diff --git a/app/modules/project/templates/project/project.html b/app/modules/project/templates/project/project.html index 040ab54..b195963 100644 --- a/app/modules/project/templates/project/project.html +++ b/app/modules/project/templates/project/project.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + @@ -291,5 +291,5 @@ - + {% endblock %} diff --git a/app/static/project.css b/app/static/project.css index abd7650..46c4937 100644 --- a/app/static/project.css +++ b/app/static/project.css @@ -17,6 +17,7 @@ .pj-icon-btn { border: none; background: transparent; color: #6b7280; cursor: pointer; font-size: 16px; line-height: 1; width: 24px; height: 24px; border-radius: 6px; + padding: 0; display: inline-flex; align-items: center; justify-content: center; } .pj-icon-btn:hover { background: #eceef0; color: #1e1f21; } @@ -370,7 +371,12 @@ box-shadow: 0 1px 2px rgba(0,0,0,.06); } .pj-chat-msg.mine .pj-chat-bubble { background: #fee500; border-radius: 14px 14px 4px 14px; } -.pj-chat-time { font-size: 10px; color: #9aa1a9; margin-top: 3px; padding: 0 2px; } +.pj-chat-meta { display: flex; align-items: center; gap: 3px; margin-top: 3px; padding: 0 2px; } +.pj-chat-time { font-size: 10px; color: #9aa1a9; } +/* 본인 댓글만 보이는 삭제 버튼 */ +.pj-chat-del { width: 16px; height: 16px; color: #b7bdc5; } +.pj-chat-del .material-symbols-outlined { font-size: 13px; } +.pj-chat-del:hover { color: #c22b10; background: #fbecea; } /* ── 보드 단계 컨트롤 ── */ .pj-col-head { position: relative; } diff --git a/app/static/project.js b/app/static/project.js index c1adab8..b7fb7b5 100644 --- a/app/static/project.js +++ b/app/static/project.js @@ -453,8 +453,21 @@ li.innerHTML = (mine ? "" : '' + escapeHtml(idOf(c.author_email)) + "") + '
' + - '' + (c.created_at || "").slice(0, 16).replace("T", " ") + ""; + '' + + (mine ? '' : "") + + '' + (c.created_at || "").slice(0, 16).replace("T", " ") + "" + + ""; li.querySelector(".pj-chat-bubble").textContent = c.body; + if (mine) { + li.querySelector(".pj-chat-del").addEventListener("click", async function () { + if (!confirm("이 댓글을 삭제할까요?")) return; + try { + await api("DELETE", "/project/api/comments/" + c.id); + const n = await renderChat(taskId); + if (n !== null) { markSeen(taskId, n); syncBadge(taskId, n); } + } catch (e) { alert("삭제 실패: " + e.message); } + }); + } list.appendChild(li); }); list.scrollTop = list.scrollHeight;