feat(project): 카드 하위 업무 담당자 배정 아이콘 + 아사나식 말풍선

담당자 없는 하위 업무 줄에 마우스를 올리면 점선 원 사람 아이콘이 나타나고
'이 작업 배정' 말풍선. 누르면 프로젝트 멤버 목록에서 바로 배정(그 카드
목록만 다시 채움). 공용 hovertip 에 아래쪽 꼬리 추가.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-24 00:15:35 +09:00
parent 08b5d84c08
commit 3563822087
5 changed files with 62 additions and 12 deletions
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260924d" />
<link rel="stylesheet" href="/static/project.css?v=20260924e" />
<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=20260924d" defer></script>
<script src="/static/project.js?v=20260924e" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260924d" />
<link rel="stylesheet" href="/static/project.css?v=20260924e" />
<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=20260924d" defer></script>
<script src="/static/project.js?v=20260924e" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260924d" />
<link rel="stylesheet" href="/static/project.css?v=20260924e" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — 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=20260924d" defer></script>
<script src="/static/project.js?v=20260924e" defer></script>
{% endblock %}
+13 -4
View File
@@ -335,11 +335,16 @@
/* 마우스를 따라다니는 작은 툴팁 — 제목 옆 멤버 아이콘의 이름 표시용. */
.pj-hovertip {
position: fixed; z-index: 1400; pointer-events: none;
background: #1e1f21; color: #fff; font-size: 11.5px; font-weight: 600;
padding: 4px 8px; border-radius: 6px; white-space: nowrap;
background: #1e1f21; color: #fff; font-size: 12.5px; font-weight: 600;
padding: 6px 10px; border-radius: 6px; white-space: nowrap;
/* left/top 은 커서 좌표 그대로 — 말풍선 아래-가운데를 그 점에 맞춰
커서 바로 위, 가로로는 커서 중앙에 오게 한다. */
transform: translate(-50%, -100%);
transform: translate(-50%, calc(-100% - 6px));
}
/* 아사나 말풍선처럼 아래쪽 가운데 꼬리 */
.pj-hovertip::after {
content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
border: 5px solid transparent; border-top-color: #1e1f21;
}
.pj-hovertip[hidden] { display: none; }
@@ -826,7 +831,11 @@
/* 마감일은 제목이 아무리 길어도 항상 보인다 — 줄어드는 건 제목(말줄임)뿐 */
.pj-card-sub-due { flex: 0 0 auto; white-space: nowrap; font-size: 12px; color: var(--pj-ink-soft); }
.pj-card-sub-due.is-overdue { color: #c22b10; }
.pj-card-sub-av { flex: 0 0 auto; display: inline-flex; }
.pj-card-sub-av { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; }
/* 담당자 없음 — 줄에 마우스를 올릴 때만 점선 원 아이콘(아사나) */
.pj-card-sub-av.is-empty { color: #6d6e6f; opacity: 0; transition: opacity .12s; }
.pj-card-sub:hover .pj-card-sub-av.is-empty { opacity: 1; }
.pj-card-sub-av.is-empty:hover { color: #1e1f21; background: #eceef0; }
.pj-card-sub-empty { padding: 8px 4px; font-size: 12px; color: #9aa1a9; }
/* 프로젝트 스코프 토글(이 프로젝트 / 전체 프로젝트) — 뷰 탭과 같은 모양 재사용 */
+43 -2
View File
@@ -2633,11 +2633,46 @@
(sub.due_date
? '<span class="pj-card-sub-due' + (overdue ? " is-overdue" : "") + '">' + escapeHtml(fmtDateKr(sub.due_date)) + "</span>"
: "") +
// 담당자 — 있으면 아바타, 없으면 아사나처럼 점선 원 사람 아이콘(줄에
// 마우스를 올리면 보임). 누르면 멤버 선택, 말풍선은 data-tip(initHoverTips).
(sub.assignee_email
? '<span class="pj-card-sub-av" title="' + escapeHtml(idOf(sub.assignee_email)) + '">' + avatarHtml(sub.assignee_email, "pj-gicon-sm") + "</span>"
: "") +
? '<span class="pj-card-sub-av" data-tip="' + escapeHtml(idOf(sub.assignee_email)) + '">' +
avatarHtml(sub.assignee_email, "pj-gicon-sm") + "</span>"
: '<span class="pj-card-sub-av is-empty" data-tip="이 작업 배정">' + ASSIGN_EMPTY_ICON_SVG + "</span>") +
"</div>";
}
// 담당자 미지정 아이콘(아사나 모양: 점선 원 안의 사람).
const ASSIGN_EMPTY_ICON_SVG =
'<svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="1.4" aria-hidden="true">' +
'<circle cx="12" cy="12" r="10.3" stroke-dasharray="2.6 2.2"/>' +
'<circle cx="12" cy="9.6" r="3.1"/>' +
'<path d="M6.8 17.2c1.1-2.2 3-3.3 5.2-3.3s4.1 1.1 5.2 3.3" stroke-linecap="round"/>' +
"</svg>";
// 하위 업무 담당자 선택 — 부모 업무의 프로젝트 멤버 중에서. 저장 후
// 보드 전체가 아니라 그 카드의 펼친 목록만 다시 채운다.
async function openSubAssigneePicker(t, sub, box, x, y) {
let list;
try { list = await membersOfProject(t.project_id); }
catch (e) { showToast("멤버 조회 실패: " + e.message, "error"); return; }
const cur = (sub.assignee_email || "").toLowerCase();
async function pick(email) {
try {
await api("PUT", "/project/api/tasks/" + sub.id,
{ assignee_email: email, assignee_name: email ? idOf(email) : "" });
sub.assignee_email = email;
if (box.isConnected) fillCardSubs(box, t);
} catch (e) { showToast("담당자 변경 실패: " + e.message, "error"); }
}
const items = [{ label: (cur ? "" : "✓ ") + "(미지정)", onClick: function () { pick(""); } }];
list.forEach(function (m) {
const email = m.user_email;
items.push({
label: (email.toLowerCase() === cur ? "✓ " : "") + idOf(email),
onClick: function () { pick(email); },
});
});
showContextMenu(x, y, items);
}
// 하위 업무를 받아 캐시. 카드 숫자가 옛 값이면(팝업에서 하위 업무를
// 추가·삭제) 맞춰 두고 true 를 돌려준다 — 그땐 보드를 다시 그려야 한다.
function loadCardSubs(t) {
@@ -2671,6 +2706,12 @@
box.querySelectorAll(".pj-card-sub").forEach(function (row) {
const sub = subs.find(function (x) { return String(x.id) === row.dataset.subId; });
if (!sub) return;
const av = row.querySelector(".pj-card-sub-av");
if (av && canManage) av.addEventListener("click", function (e) {
e.stopPropagation();
const r = av.getBoundingClientRect();
openSubAssigneePicker(t, sub, box, r.left, r.bottom + 4);
});
const check = row.querySelector(".pj-card-sub-check");
check.addEventListener("click", async function (e) {
e.stopPropagation();