feat(project): 세션 기본 담당자 선택을 아이콘+이름 카드로
멤버 추가 창과 같은 모양(단일 선택 라디오, 맨 앞 '없음'), 고른 사람 강조. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260923k" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260923l" />
|
||||
<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=20260923k" defer></script>
|
||||
<script src="/static/project.js?v=20260923l" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260923k" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260923l" />
|
||||
<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=20260923k" defer></script>
|
||||
<script src="/static/project.js?v=20260923l" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260923k" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260923l" />
|
||||
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
<!-- 타임라인 vis-timeline — self-host -->
|
||||
@@ -250,10 +250,10 @@
|
||||
<label>색상
|
||||
<span class="pj-color-palette" id="pj-stg-colors"></span>
|
||||
</label>
|
||||
<label>기본 담당자
|
||||
<select id="pj-stg-assignee"><option value="">없음</option></select>
|
||||
<div class="pj-field-label">기본 담당자
|
||||
<div class="pj-member-picker" id="pj-stg-assignee"></div>
|
||||
<span class="pj-modal-hint pj-stg-assignee-hint">이 세션에 업무를 새로 만들거나 카드를 옮겨오면, 담당자가 비어 있는 업무만 이 사람에게 자동 배정됩니다.</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="pj-modal-actions">
|
||||
<span style="flex:1"></span>
|
||||
<button type="button" class="pj-btn" data-close>취소</button>
|
||||
@@ -505,5 +505,5 @@
|
||||
</script>
|
||||
|
||||
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
|
||||
<script src="/static/project.js?v=20260923k" defer></script>
|
||||
<script src="/static/project.js?v=20260923l" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -250,6 +250,10 @@
|
||||
.pj-col-assignee .pj-gicon { font-size: 20px; color: var(--pj-ink-soft); }
|
||||
.pj-col-head-colored .pj-col-assignee .pj-gicon { color: #fff; }
|
||||
.pj-stg-assignee-hint { display: block; margin: 4px 0 0; font-weight: 400; }
|
||||
/* 세션 기본 담당자 카드 — 고른 사람은 배경 강조 */
|
||||
.pj-stg-pick { cursor: pointer; }
|
||||
.pj-stg-pick:has(input:checked) { background: var(--pj-accent-tint); box-shadow: inset 0 0 0 1.5px var(--pj-accent); }
|
||||
.pj-stg-pick .pj-member-pick-icon.material-symbols-outlined { color: #9aa1a9; }
|
||||
/* 이름 클릭 → 인라인 이름 변경 */
|
||||
.pj-col-name.pj-col-name-editable { cursor: text; border-radius: 6px; padding: 1px 4px; margin: -1px -4px; }
|
||||
.pj-col-name.pj-col-name-editable:hover { background: rgba(0,0,0,.06); }
|
||||
|
||||
+20
-9
@@ -2068,12 +2068,21 @@
|
||||
e = (e || "").toLowerCase();
|
||||
if (e && emails.indexOf(e) < 0) emails.push(e);
|
||||
});
|
||||
const sel = el("pj-stg-assignee");
|
||||
sel.innerHTML = '<option value="">없음</option>' + emails.map(function (e) {
|
||||
return '<option value="' + escapeHtml(e) + '">' + escapeHtml(idOf(e)) + "</option>";
|
||||
}).join("");
|
||||
sel.value = cur.toLowerCase();
|
||||
sel.dataset.orig = sel.value;
|
||||
// 멤버 추가 창과 같은 아이콘+이름 카드(한 명만 고르는 라디오). 맨 앞 "없음".
|
||||
const picker = el("pj-stg-assignee");
|
||||
function pickCard(value, icon, label) {
|
||||
return '<label class="pj-member-pick pj-member-pick-stacked pj-stg-pick">' +
|
||||
'<span class="pj-member-pick-avatar">' + icon + "</span>" +
|
||||
'<span class="pj-member-pick-name">' + escapeHtml(label) + "</span>" +
|
||||
'<input type="radio" name="pj-stg-assignee" value="' + escapeHtml(value) + '" />' +
|
||||
"</label>";
|
||||
}
|
||||
picker.innerHTML =
|
||||
pickCard("", '<span class="material-symbols-outlined pj-gicon pj-member-pick-icon">person_off</span>', "없음") +
|
||||
emails.map(function (e) { return pickCard(e, avatarHtml(e, "pj-member-pick-icon"), idOf(e)); }).join("");
|
||||
const curVal = cur.toLowerCase();
|
||||
picker.querySelectorAll("input").forEach(function (r) { r.checked = r.value === curVal; });
|
||||
picker.dataset.orig = curVal;
|
||||
openModal(stageModal);
|
||||
}
|
||||
const saveStageBtn = el("pj-save-stage");
|
||||
@@ -2085,9 +2094,11 @@
|
||||
const body = { name: name, color: color };
|
||||
// 기본 담당자는 바뀐 경우에만 보낸다 — DB 마이그레이션 009 전이라도
|
||||
// 이름·색상 편집은 그대로 되게.
|
||||
const assigneeSel = el("pj-stg-assignee");
|
||||
if (assigneeSel && assigneeSel.value !== (assigneeSel.dataset.orig || "")) {
|
||||
body.default_assignee_email = assigneeSel.value;
|
||||
const picker = el("pj-stg-assignee");
|
||||
if (picker) {
|
||||
const checked = picker.querySelector("input:checked");
|
||||
const val = checked ? checked.value : "";
|
||||
if (val !== (picker.dataset.orig || "")) body.default_assignee_email = val;
|
||||
}
|
||||
try {
|
||||
if (id) {
|
||||
|
||||
Reference in New Issue
Block a user