feat(project): 업무 팝업 담당자·세션·우선순위·마감일 한 줄 + 마감일 달력 아이콘

- 네 항목을 한 줄(칸 사이 세로선)로 묶었다. 칸 안 아이콘은 빼고 라벨 글자만,
  담당자·세션 칸이 남는 폭을 나눠 갖는다. "담당자 없음" → "없음".
- 마감일은 달력 아이콘 버튼 하나. 날짜가 있으면 옆에 "09/25(목)", 지났으면
  빨간색. 누르면 showPicker() 로 브라우저 달력(지우기 포함). 실제 값은 숨긴
  #pj-t-due 가 그대로 들고 있어 저장·변경감지 로직은 바뀌지 않는다.
- 패널이 520px 이하면 2×2(담당자|세션 / 우선순위|마감일)로 접힌다.
- 캐시 버전 20260923e.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-23 13:42:46 +09:00
parent 4c2f4fce6a
commit 1471e0f89e
6 changed files with 74 additions and 41 deletions
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260923d" />
<link rel="stylesheet" href="/static/project.css?v=20260923e" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -96,5 +96,5 @@
</div>
</div>
<script src="/static/project.js?v=20260923d" defer></script>
<script src="/static/project.js?v=20260923e" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260923d" />
<link rel="stylesheet" href="/static/project.css?v=20260923e" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -117,5 +117,5 @@
"today": {{ today | tojson }}
}
</script>
<script src="/static/project.js?v=20260923d" defer></script>
<script src="/static/project.js?v=20260923e" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260923d" />
<link rel="stylesheet" href="/static/project.css?v=20260923e" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<!-- 타임라인 vis-timeline — self-host -->
@@ -291,27 +291,24 @@
<div class="pj-modal-col-main">
<!-- 메타 정보 — 아사나처럼 "라벨(좌) + 아이콘/값(우)" 목록형 한 줄씩. -->
<div class="pj-meta-list">
<div class="pj-meta-row2">
<span class="pj-meta-label2">담당자</span>
<span class="pj-meta-value2">
<span class="material-symbols-outlined pj-meta-ic">account_circle</span>
<!-- 담당자 · 세션 · 우선순위 · 마감일 — 한 줄에 넷을 나란히(칸 사이 세로선).
칸 안 아이콘은 빼고 라벨 글자만 둔다. 마감일은 달력 아이콘 버튼 하나 —
날짜가 있으면 옆에 "09/25(목)" 처럼 짧게. 누르면 브라우저 달력이 뜬다
(진짜 값은 숨긴 #pj-t-due 가 들고 있다). 패널이 좁으면 2×2 로 접힌다. -->
<div class="pj-meta-row2 pj-meta-row-multi">
<div class="pj-meta-cell pj-meta-cell-assignee">
<span class="pj-meta-cell-label">담당자</span>
<select id="pj-t-assignee">
<option value="">담당자 없음</option>
<option value="">없음</option>
{% for m in members %}
<option value="{{ m.user_email }}" data-name="{{ m.user_email.split('@')[0] }}">
{{ m.user_email.split('@')[0] }}
</option>
{% endfor %}
</select>
</span>
</div>
<!-- 세션 · 우선순위 · 마감일 — 짧은 값이라 한 줄에 셋을 나란히 둔다
(예전엔 한 줄씩 3행). 아이콘은 첫 칸만(나머지는 라벨 글자로 충분하고
폭을 아낀다). 패널이 좁으면 마감일 칸이 다음 줄로 넘어간다. -->
<div class="pj-meta-row2 pj-meta-row-multi">
</div>
<div class="pj-meta-cell pj-meta-cell-stage">
<span class="pj-meta-cell-label">세션</span>
<span class="material-symbols-outlined pj-meta-ic">view_column</span>
<select id="pj-t-stage">
{% for s in stages %}
<option value="{{ s.id }}">{{ s.name }}</option>
@@ -327,8 +324,11 @@
</select>
</div>
<div class="pj-meta-cell pj-meta-cell-due">
<span class="pj-meta-cell-label">마감일</span>
<input type="date" id="pj-t-due" />
<button type="button" class="pj-due-btn" id="pj-t-due-btn" title="마감일 지정">
<span class="material-symbols-outlined">calendar_month</span>
<span class="pj-due-text" id="pj-t-due-text"></span>
</button>
<input type="date" id="pj-t-due" class="pj-due-native" tabindex="-1" aria-label="마감일" />
</div>
</div>
<!-- 팔로워(아사나의 협업자) — 완료·댓글 알림을 받는 사람. 만든 사람·담당자·
@@ -516,5 +516,5 @@
</script>
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
<script src="/static/project.js?v=20260923d" defer></script>
<script src="/static/project.js?v=20260923e" defer></script>
{% endblock %}
+30 -19
View File
@@ -481,28 +481,39 @@
.pj-meta-cell select:focus, .pj-meta-cell input:focus {
border-color: var(--pj-border) !important; background: #f6f7f8 !important; outline: none;
}
/* 세션 · 우선순위 · 마감일 한 줄 — 칸마다 "작은 라벨 + 아이콘 + 값". 칸 사이는
얇은 세로선. 패널이 좁아 한 줄에 안 들어가면 칸 단위로 다음 줄로 넘어간다. */
.pj-meta-row-multi { gap: 0; flex-wrap: wrap; padding: 2px 0; }
.pj-meta-cell { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 36px; }
.pj-meta-cell-stage { flex: 1 1 150px; }
.pj-meta-cell-priority { flex: 0 1 auto; }
.pj-meta-cell-due { flex: 0 1 auto; }
/* 담당자 · 세션 · 우선순위 · 마감일 한 줄 — 칸마다 "작은 라벨 + 값", 칸 사이는
얇은 세로선. 이름이 길 수 있는 담당자·세션 칸이 남는 폭을 나눠 갖는다. */
.pj-meta-row-multi { gap: 0; padding: 2px 0; }
.pj-meta-cell { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 36px; }
.pj-meta-cell + .pj-meta-cell { border-left: 1px solid #eef0f2; padding-left: 10px; margin-left: 10px; }
.pj-meta-cell-label { font-size: 13px; font-weight: 600; color: var(--pj-ink-soft); white-space: nowrap; }
/* 첫 칸 라벨은 위아래 행 라벨(.pj-meta-label2 92px + 간격 12px)과 폭을 맞춰
아이콘(104px)·값(130px)이 담당자/팔로워 행과 같은 세로선에 오게 한다. */
.pj-meta-cell-stage .pj-meta-cell-label { flex: 0 0 92px; margin-right: 4px; }
.pj-meta-cell select { flex: 1 1 auto; min-width: 0; width: 100%; }
.pj-meta-cell-assignee, .pj-meta-cell-stage { flex: 1 1 0; }
.pj-meta-cell-priority, .pj-meta-cell-due { flex: 0 0 auto; }
.pj-meta-cell-label { font-size: 13px; font-weight: 600; color: var(--pj-ink-soft); white-space: nowrap; flex: none; }
.pj-meta-cell select { flex: 1 1 auto; min-width: 0; width: 100%; text-overflow: ellipsis; }
.pj-meta-cell-priority select { width: auto; }
/* .pj-modal-card input[type=date]{width:100%} 가 파일 뒤쪽에 있어 선택자를 한 단계 더 세게 */
.pj-meta-row-multi .pj-meta-cell-due input[type=date] { width: 132px; flex: none; }
/* 패널이 좁으면(너비 조절/작은 화면) 마감일 칸만 다음 줄로 — 그때는 세로선 없이
값이 위아래 행 값(130px)과 같은 세로선에 오게 라벨 폭을 맞춘다. */
/* 마감일 — 달력 아이콘 버튼 하나. 진짜 값은 숨긴 input[type=date] 가 들고 있고,
버튼을 누르면 JS 가 showPicker() 로 브라우저 달력을 띄운다(달력의 "삭제"로 지움). */
.pj-meta-cell-due { position: relative; }
.pj-due-btn {
display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 6px;
border: 1px solid transparent; border-radius: 6px; background: transparent; cursor: pointer;
color: #6b6f76; font-size: 13.5px; font-weight: 600; font-family: inherit; white-space: nowrap;
}
.pj-due-btn .material-symbols-outlined { font-size: 20px; }
.pj-due-btn:hover { border-color: var(--pj-border); background: #f6f7f8; color: var(--pj-ink); }
.pj-due-btn.has-date { color: var(--pj-ink); }
.pj-due-btn.is-overdue { color: #c22b10; }
.pj-due-text:empty { display: none; }
/* 화면엔 안 보이지만 달력이 버튼 자리에 뜨도록 렌더는 유지(display:none 이면 showPicker 불가) */
.pj-meta-row-multi .pj-meta-cell-due input.pj-due-native {
position: absolute; left: 10px; bottom: 2px; width: 1px !important; height: 1px;
padding: 0 !important; margin: 0 !important; border: 0 !important; opacity: 0; pointer-events: none;
}
/* 패널이 좁으면(너비 조절/작은 화면) 2×2 로 접는다 — 담당자|세션 / 우선순위|마감일. */
.pj-task-modal-card { container-type: inline-size; container-name: pjpanel; }
@container pjpanel (max-width: 560px) {
.pj-meta-cell-due { flex-basis: 100%; border-left: none !important; padding-left: 0 !important; margin-left: 0 !important; }
.pj-meta-cell-due .pj-meta-cell-label { flex: 0 0 122px; } /* +간격 8 = 값 130px */
@container pjpanel (max-width: 520px) {
.pj-meta-row-multi { display: grid; grid-template-columns: 1fr 1fr; }
.pj-meta-cell:nth-child(3) { border-left: none; padding-left: 0; margin-left: 0; }
}
.pj-extra-label { font-size: 12.5px; font-weight: 700; color: var(--pj-ink-soft); margin-right: auto; }
.pj-modal-card label { display: block; font-size: 12.5px; font-weight: 600; color: #525860; margin-bottom: 12px; }
+23 -1
View File
@@ -2996,7 +2996,7 @@
// 선택지에 넣는다 — 없으면 칸이 비고, 저장하면 담당자가 지워졌다.
const cur = (currentEmail || "").toLowerCase();
if (cur && !emails.some(function (e) { return (e || "").toLowerCase() === cur; })) emails.push(currentEmail);
sel.innerHTML = '<option value="">담당자 없음</option>' + emails.map(function (e) {
sel.innerHTML = '<option value="">없음</option>' + emails.map(function (e) {
const name = idOf(e);
return '<option value="' + escapeHtml(e) + '" data-name="' + escapeHtml(name) + '">' + escapeHtml(name) + "</option>";
}).join("");
@@ -3020,6 +3020,7 @@
el("pj-t-priority").value = task ? (task.priority || "normal") : "normal";
el("pj-t-due").value = task ? (task.due_date || "") : "";
currentTaskData = task || null;
syncDueBtn(); // 완료 여부(지남 표시)를 보려면 currentTaskData 다음에
el("pj-delete-task").hidden = !task;
el("pj-toggle-complete").hidden = !task;
// 공유 링크는 저장된 업무에만 있다(새 업무는 아직 id 가 없다).
@@ -3038,6 +3039,27 @@
taskSnapshot = taskFormSnapshot();
}
// 마감일 — 달력 아이콘 버튼(날짜가 있으면 옆에 "09/25(목)"). 진짜 값은 숨긴
// #pj-t-due(input[type=date])가 들고 있어 저장·변경감지 코드는 그대로다.
function syncDueBtn() {
const v = el("pj-t-due").value;
const btn = el("pj-t-due-btn");
if (!btn) return;
el("pj-t-due-text").textContent = v ? fmtDateKr(v) : "";
btn.classList.toggle("has-date", !!v);
btn.classList.toggle("is-overdue", !!v && v < todayIso && !(currentTaskData && currentTaskData.completed_at));
btn.title = v ? "마감일 " + v + " (눌러서 변경)" : "마감일 지정";
}
if (el("pj-t-due-btn")) {
el("pj-t-due-btn").addEventListener("click", function () {
const inp = el("pj-t-due");
try { inp.showPicker(); } // 크롬·엣지·파이어폭스·사파리 최신
catch (_) { inp.focus(); inp.click(); } // 구형 브라우저 폴백
});
el("pj-t-due").addEventListener("change", syncDueBtn);
el("pj-t-due").addEventListener("input", syncDueBtn);
}
function setCompleteBtn(done) {
const btn = el("pj-toggle-complete");
btn.textContent = done ? "↩ 완료 취소" : "✓ 완료로 표시";
+1 -1
View File
@@ -210,7 +210,7 @@ description 을 항상 HTML로 취급하기 때문). 두 번 실행하면 이중
- **댓글** `task_comments` — 업무 모달 하단. 등록/삭제(본인·관리자). 새 댓글 시 관련자 인앱 알림.
- **업무 편집 팝업** — 버튼 줄(공유·완료·삭제·취소·저장)은 **팝업 맨 위에 고정**
(`.pj-modal-actions-top`) — 카드가 flex column 이고 `.pj-modal-body` 만 스크롤하므로 sticky 없이 고정된다(sticky 는 카드 padding 안쪽에 붙어 바가 밀려 내려오고 제목을 덮었다). 설명/하위업무가 길어도 스크롤 없이 저장·취소한다.
그 아래 메타(담당자 | 세션·우선순위·마감일 한 줄 | 팔로워), 다시 그 아래 **설명란**과
그 아래 메타(담당자·세션·우선순위·마감일 한 줄 — 마감일은 달력 아이콘 버튼, 좁으면 2×2 | 팔로워), 다시 그 아래 **설명란**과
**하위 업무**가 각각 팝업 너비 전체를 쓰는 별도 행(`.pj-desc-block` / `.pj-subtask-full`,
그리드 `1 / -1`). 하위 업무는 제목 왼쪽 체크박스로 완료를 토글하고, 완료된 줄은
반투명(50%) + 취소선. 좁은 화면과 "새 업무"(compact)에서는 단일 컬럼으로 흐른다.