feat(project): 목표 표 가로 스크롤 3열(연간)까지 고정, 연간·반기 달성률 = 기간 목표 합계 대비 실적

- 연간 열 sticky(left = 1열 + 2열 너비), 경계 그림자 — 머리·지표(틀 고정 줄)·업무 영역 칸 모두
- 매출 달성률 연간·상·하반기 = 입력된 실적 합계 ÷ 그 기간 목표 합계 전체(예: 2,910 ÷ 3,313 = 87.8%),
  예전 '실적이 있는 달의 목표만' 기준에서 변경, 말풍선 "연간 목표 합계 대비 실적"
- 캐시 버전 20261001v, 문서 갱신

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 15:10:22 +09:00
parent ec5d7e2efe
commit 6ea4a2e0f9
10 changed files with 34 additions and 21 deletions
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001u" />
<link rel="stylesheet" href="/static/project.css?v=20261001v" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -256,5 +256,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261001u" defer></script>
<script src="/static/project.js?v=20261001v" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001u" />
<link rel="stylesheet" href="/static/project.css?v=20261001v" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -189,5 +189,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261001u" defer></script>
<script src="/static/project.js?v=20261001v" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001u" />
<link rel="stylesheet" href="/static/project.css?v=20261001v" />
<link rel="stylesheet" href="/static/project-help.css?v=20260926v" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001u" />
<link rel="stylesheet" href="/static/project.css?v=20261001v" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -104,5 +104,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261001u" defer></script>
<script src="/static/project.js?v=20261001v" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001u" />
<link rel="stylesheet" href="/static/project.css?v=20261001v" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -100,5 +100,5 @@
"today": {{ today | tojson }}
}
</script>
<script src="/static/project.js?v=20261001u" defer></script>
<script src="/static/project.js?v=20261001v" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001u" />
<link rel="stylesheet" href="/static/project.css?v=20261001v" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<!-- 타임라인 vis-timeline — self-host -->
@@ -496,5 +496,5 @@
</script>
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
<script src="/static/project.js?v=20261001u" defer></script>
<script src="/static/project.js?v=20261001v" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001u" />
<link rel="stylesheet" href="/static/project.css?v=20261001v" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -70,5 +70,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261001u" defer></script>
<script src="/static/project.js?v=20261001v" defer></script>
{% endblock %}
+13
View File
@@ -2105,6 +2105,19 @@ textarea.pj-goal-text::placeholder { color: rgba(0, 0, 0, .3); }
.pj-goal-text-ro { min-height: 46px; padding: 6px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.pj-goal-area td.is-now { box-shadow: inset 2px 0 0 rgba(123, 104, 238, .35), inset -2px 0 0 rgba(123, 104, 238, .35); }
.pj-goal-texttd.pj-goal-year-col { font-weight: 600; }
/* 가로 스크롤 때 3열(구분·항목·연간)까지 고정 — 연간 열 left = 1열 + 2열 너비, 오른쪽에 경계 그림자.
z-index: 업무 영역 칸 2(이름 칸과 같게) · 지표 칸 8(지표 이름 칸과 같게, 틀 고정 줄) · 머리 칸 10 */
.pj-goal-table .pj-goal-year-col {
position: sticky; left: calc(var(--goal-c1-w) + var(--goal-c2-w)); z-index: 2;
box-shadow: 4px 0 6px -4px rgba(16, 24, 40, .18);
}
.pj-goal-kpi > tr > .pj-goal-year-col { z-index: 8; }
.pj-goal-table thead th.pj-goal-year-col { z-index: 10; }
.pj-goal-area > tr > td.pj-goal-year-col { background-color: var(--goal-bg, #fff); }
.pj-goal-table td.pj-goal-texttd.pj-goal-year-col:focus-within {
box-shadow: inset 0 0 0 2px var(--pj-accent), 4px 0 6px -4px rgba(16, 24, 40, .18);
}
.pj-goal-table td.pj-goal-year-col.is-merge-sel { box-shadow: inset 0 0 0 2px var(--pj-accent), 4px 0 6px -4px rgba(16, 24, 40, .18); }
.pj-goal-numtd.is-saved, .pj-goal-texttd.is-saved { animation: pj-goal-saved 1s ease-out; }
@keyframes pj-goal-saved { from { box-shadow: inset 0 0 0 2px #34a853; } to { box-shadow: inset 0 0 0 2px transparent; } }
+4 -5
View File
@@ -8074,21 +8074,20 @@
if (td) setRate(td, ac[m], tg[m]);
}
SUM_SCOPES.forEach(function (sc) {
let sumT = null, sumA = null, tUpTo = 0;
let sumT = null, sumA = null;
for (let m = sc[1]; m <= sc[2]; m++) {
if (tg[m] != null) sumT = (sumT || 0) + tg[m];
if (ac[m] != null) sumA = (sumA || 0) + ac[m];
// 달성률은 실적이 들어온 달까지만 비교(남은 달 목표까지 넣으면 기간 중엔 항상 낮게 나온다).
if (ac[m] != null && tg[m] != null) tUpTo += tg[m];
}
const st = table.querySelector('.pj-goal-sum[data-metric="sales"][data-kind="target"][data-scope="' + sc[0] + '"]');
const sa = table.querySelector('.pj-goal-sum[data-metric="sales"][data-kind="actual"][data-scope="' + sc[0] + '"]');
if (st) st.textContent = sumT == null ? "" : fmtNum(sumT);
if (sa) sa.textContent = sumA == null ? "" : fmtNum(sumA);
const rt = table.querySelector('.pj-goal-rate[data-month="' + sc[0] + '"]');
// 연간·반기 달성률 = 입력된 실적 합계 ÷ 그 기간 목표 합계 전체(2026-10-01 사용자 기준 — 예전엔 실적이 있는 달의 목표만)
if (rt) {
setRate(rt, sumA, tUpTo);
rt.dataset.tip = tUpTo ? "실적이 있는 달의 목표 합계 대비" : "";
setRate(rt, sumA, sumT);
rt.dataset.tip = sumT ? (sc[0] === 0 ? "연간" : sc[0] === 13 ? "상반기" : "하반기") + " 목표 합계 대비 실적" : "";
}
});
// 로아스 연간·반기 — 기간 로아스 = 기간 매출 ÷ 기간 광고비. 광고비를 따로 적지 않으니 월마다 매출 ÷ 로아스로 환산해