diff --git a/app/modules/project/templates/project/inbox.html b/app/modules/project/templates/project/inbox.html index 8655cec..f2c0929 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 %} @@ -99,5 +99,5 @@ {% include "project/_side_modals.html" %} {% include "project/_member_tasks_modal.html" %} - + {% endblock %} diff --git a/app/modules/project/templates/project/mytasks.html b/app/modules/project/templates/project/mytasks.html index bca00c4..91bccdd 100644 --- a/app/modules/project/templates/project/mytasks.html +++ b/app/modules/project/templates/project/mytasks.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} @@ -98,5 +98,5 @@ "today": {{ today | tojson }} } - + {% endblock %} diff --git a/app/modules/project/templates/project/project.html b/app/modules/project/templates/project/project.html index 0a0b5f6..a4676d2 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 %} - + @@ -301,14 +301,14 @@ -
@@ -465,5 +465,5 @@ - + {% endblock %} diff --git a/app/modules/project/templates/project/trash.html b/app/modules/project/templates/project/trash.html index d5e7eb0..b66ae24 100644 --- a/app/modules/project/templates/project/trash.html +++ b/app/modules/project/templates/project/trash.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} @@ -68,5 +68,5 @@ {% include "project/_side_modals.html" %} {% include "project/_member_tasks_modal.html" %} - + {% endblock %} diff --git a/app/static/project.css b/app/static/project.css index be2fd0f..7489939 100644 --- a/app/static/project.css +++ b/app/static/project.css @@ -1499,22 +1499,25 @@ img.pj-person-ic { width: 22px; height: 22px; } .pj-fb-reset:hover { color: var(--pj-ink); } /* ── 업무 팝업 — 팔로워 ── */ -.pj-followers { flex-wrap: wrap; row-gap: 6px; padding: 5px 0; } -.pj-follower-chips { display: flex; flex-wrap: wrap; gap: 6px; } -.pj-follower-chip { - display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 4px 0 4px; - border-radius: 999px; background: #f1f2f4; font-size: 12.5px; font-weight: 600; color: var(--pj-ink); -} -.pj-follower-chip .pj-gicon-sm { font-size: 18px; } +/* 담당자 칸과 같은 모양 — 라벨(.pj-meta-cell-label) 바로 뒤에 "아이콘 + 이름"들 */ +.pj-followers-row { gap: 10px; padding: 3px 0; } +.pj-meta-cell-followers { flex: 1 1 auto; flex-wrap: wrap; row-gap: 4px; } +.pj-follower-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; min-width: 0; } +.pj-follower-chip { cursor: default; } +.pj-follower-chip:hover { border-color: transparent; background: #f6f7f8; } +/* 빼기(×) — 마우스를 올린 사람에게만 */ .pj-follower-x { border: none; background: transparent; color: #8a9099; cursor: pointer; font-size: 14px; line-height: 1; width: 18px; height: 18px; border-radius: 50%; padding: 0; display: inline-flex; align-items: center; justify-content: center; + visibility: hidden; } +.pj-follower-chip:hover .pj-follower-x { visibility: visible; } .pj-follower-x:hover { background: #dfe2e6; color: #1e1f21; } .pj-follower-add { - width: 26px; height: 26px; border-radius: 50%; border: 1px dashed #b8bec6; background: #fff; + width: 24px; height: 24px; border-radius: 50%; border: 1px dashed #b8bec6; background: #fff; color: #6b6f76; font-size: 16px; line-height: 1; cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; } +.pj-follower-add[hidden] { display: none; } .pj-follower-add:hover { border-color: var(--pj-accent); color: var(--pj-accent); } .pj-follow-toggle { margin-left: auto; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--pj-border); diff --git a/app/static/project.js b/app/static/project.js index a5c1d47..7353077 100644 --- a/app/static/project.js +++ b/app/static/project.js @@ -4296,14 +4296,21 @@ function renderFollowers() { const box = el("pj-follower-chips"); if (!box) return; + // 담당자 버튼과 같은 "아이콘 + 이름". × 는 마우스를 올릴 때만. 없으면 점선 원 + // "협업자 없음"(누르면 추가 메뉴) — 이땐 옆 + 버튼은 숨긴다. box.innerHTML = followers.map(function (e) { - return '' + - avatarHtml(e, "pj-gicon-sm") + '' + escapeHtml(idOf(e)) + "" + + return '' + + personIconHtml(e) + '' + escapeHtml(idOf(e)) + "" + ''; - }).join("") || '없음'; + }).join("") || + ''; + el("pj-follower-add").hidden = !followers.length; box.querySelectorAll(".pj-follower-x").forEach(function (b) { b.addEventListener("click", function () { setFollower(b.dataset.email, false); }); }); + const empty = box.querySelector(".pj-follower-empty"); + if (empty) empty.addEventListener("click", openFollowerAddMenu); const followingMe = followers.indexOf(me) >= 0; const tog = el("pj-follow-toggle"); tog.textContent = followingMe ? "협업자에서 나가기" : "협업자로 참여"; @@ -4333,18 +4340,20 @@ el("pj-follow-toggle").addEventListener("click", function () { setFollower(me, followers.indexOf(me) < 0); }); - el("pj-follower-add").addEventListener("click", async function (e) { - if (!followersTask) return; - const r = e.currentTarget.getBoundingClientRect(); - let list = []; - try { list = await membersOfProject(followersTask.project_id); } catch (_) {} - const cands = list.map(function (m) { return (m.user_email || "").toLowerCase(); }) - .filter(function (em) { return em && followers.indexOf(em) < 0; }); - if (!cands.length) { showToast("추가할 수 있는 멤버가 없습니다."); return; } - showContextMenu(r.left, r.bottom + 4, cands.map(function (em) { - return { label: idOf(em), onClick: function () { setFollower(em, true); } }; - })); - }); + el("pj-follower-add").addEventListener("click", openFollowerAddMenu); + } + // 협업자 추가 메뉴 — 담당자 메뉴처럼 "아이콘 + 이름". + async function openFollowerAddMenu(e) { + if (!followersTask) return; + const r = e.currentTarget.getBoundingClientRect(); + let list = []; + try { list = await membersOfProject(followersTask.project_id); } catch (_) {} + const cands = list.map(function (m) { return (m.user_email || "").toLowerCase(); }) + .filter(function (em) { return em && followers.indexOf(em) < 0; }); + if (!cands.length) { showToast("추가할 수 있는 멤버가 없습니다."); return; } + showContextMenu(r.left, r.bottom + 4, cands.map(function (em) { + return { label: idOf(em), icon: personIconHtml(em), onClick: function () { setFollower(em, true); } }; + })); } async function loadTaskExtras(task) {