feat(project): 연간 목표 — 연간 열 90px, 머리·이름 가운데 정렬, 이름 칸 너비 조절·기억
- 연간 열 너비 90px 고정 - 맨 위 머리 줄과 왼쪽 이름 두 칸(구분·항목) 가운데 정렬 - 이름 두 칸은 머리 칸 오른쪽 끝을 끌어 너비 조절(48~320px, 더블클릭 = 기본 72px), 브라우저에 기억(localStorage pj_goal_col_w) - project.js/css 캐시 버전 20260930c 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=20260930b" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260930c" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -66,8 +66,9 @@
|
||||
data-admin="{{ 'true' if is_admin else 'false' }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="pj-goal-c1"></th>
|
||||
<th class="pj-goal-c2"></th>
|
||||
{# 오른쪽 끝을 끌어 이름 칸 너비 조절 — 브라우저에 기억(localStorage pj_goal_col_w) #}
|
||||
<th class="pj-goal-c1"><span class="pj-goal-colresize" data-col="c1" title="끌어서 너비 조절"></span></th>
|
||||
<th class="pj-goal-c2"><span class="pj-goal-colresize" data-col="c2" title="끌어서 너비 조절"></span></th>
|
||||
<th class="pj-goal-year-col">연간</th>
|
||||
{% for mo in months %}<th class="{% if mo == this_month %}is-now{% endif %}">{{ mo }}월</th>{% endfor %}
|
||||
</tr>
|
||||
@@ -168,5 +169,5 @@
|
||||
{% include "project/_side_modals.html" %}
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project.js?v=20260930b" defer></script>
|
||||
<script src="/static/project.js?v=20260930c" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260930b" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260930c" />
|
||||
<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=20260930b" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260930c" />
|
||||
<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=20260930b" defer></script>
|
||||
<script src="/static/project.js?v=20260930c" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260930b" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260930c" />
|
||||
<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=20260930b" defer></script>
|
||||
<script src="/static/project.js?v=20260930c" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260930b" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260930c" />
|
||||
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
<!-- 타임라인 vis-timeline — self-host -->
|
||||
@@ -491,5 +491,5 @@
|
||||
</script>
|
||||
|
||||
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
|
||||
<script src="/static/project.js?v=20260930b" defer></script>
|
||||
<script src="/static/project.js?v=20260930c" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260930b" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260930c" />
|
||||
<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=20260930b" defer></script>
|
||||
<script src="/static/project.js?v=20260930c" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
+21
-9
@@ -2018,20 +2018,32 @@ html.pj-ui-scale .pj-modal-chat { max-height: calc(92vh / var(--pj-z)); }
|
||||
.pj-goal-table tr > :last-child { border-right: none; }
|
||||
.pj-goal-table thead th {
|
||||
position: sticky; top: 0; z-index: 3; background: #f7f8f9; height: 32px; padding: 0 10px;
|
||||
font-weight: 700; text-align: left; vertical-align: middle; white-space: nowrap;
|
||||
font-weight: 700; text-align: center; vertical-align: middle; white-space: nowrap;
|
||||
}
|
||||
.pj-goal-table thead th { width: 85px; min-width: 85px; max-width: 85px; } /* 1~12월 */
|
||||
.pj-goal-table thead th.pj-goal-year-col { width: 210px; min-width: 210px; max-width: 210px; }
|
||||
.pj-goal-table thead th.pj-goal-year-col { width: 90px; min-width: 90px; max-width: 90px; }
|
||||
.pj-goal-table thead th.is-now { color: var(--pj-accent-dark); box-shadow: inset 0 -2px 0 var(--pj-accent); }
|
||||
/* 왼쪽 고정 두 칸(구분·항목) — 너비는 머리 칸 오른쪽 끝을 끌어 조절(initGoals, localStorage
|
||||
pj_goal_col_w). --goal-c1-w 가 c2 의 left 도 같이 정한다. */
|
||||
.pj-goal-table { --goal-c1-w: 72px; --goal-c2-w: 72px; }
|
||||
.pj-goal-c1, .pj-goal-c2 {
|
||||
position: sticky; z-index: 2; width: 72px; min-width: 72px; max-width: 72px;
|
||||
background: #fff; text-align: left; font-weight: 700;
|
||||
position: sticky; z-index: 2; background: #fff; text-align: center; font-weight: 700;
|
||||
}
|
||||
.pj-goal-c1 { left: 0; }
|
||||
.pj-goal-c2 { left: 72px; font-weight: 600; color: #3b4048; }
|
||||
.pj-goal-table thead th.pj-goal-c1, .pj-goal-table thead th.pj-goal-c2 {
|
||||
z-index: 4; width: 72px; min-width: 72px; max-width: 72px; /* 왼쪽 고정 두 칸 — c2 의 left:72px 와 맞춤 */
|
||||
.pj-goal-c1 { left: 0; width: var(--goal-c1-w); min-width: var(--goal-c1-w); max-width: var(--goal-c1-w); }
|
||||
.pj-goal-c2 {
|
||||
left: var(--goal-c1-w); width: var(--goal-c2-w); min-width: var(--goal-c2-w); max-width: var(--goal-c2-w);
|
||||
font-weight: 600; color: #3b4048;
|
||||
}
|
||||
.pj-goal-table thead th.pj-goal-c1 { z-index: 4; width: var(--goal-c1-w); min-width: var(--goal-c1-w); max-width: var(--goal-c1-w); }
|
||||
.pj-goal-table thead th.pj-goal-c2 { z-index: 4; width: var(--goal-c2-w); min-width: var(--goal-c2-w); max-width: var(--goal-c2-w); }
|
||||
.pj-goal-colresize {
|
||||
position: absolute; top: 0; right: -4px; bottom: 0; width: 8px; z-index: 5; cursor: col-resize;
|
||||
}
|
||||
.pj-goal-colresize::after {
|
||||
content: ""; position: absolute; top: 6px; bottom: 6px; left: 3px; width: 2px; border-radius: 2px; background: transparent;
|
||||
}
|
||||
.pj-goal-colresize:hover::after, .pj-goal-colresize.is-dragging::after { background: var(--pj-accent); }
|
||||
html.pj-goal-resizing, html.pj-goal-resizing * { cursor: col-resize !important; user-select: none !important; }
|
||||
.pj-goal-table tbody th { padding: 7px 8px; }
|
||||
|
||||
/* 숫자 지표 */
|
||||
@@ -2054,7 +2066,7 @@ input.pj-goal-num:focus { outline: 2px solid var(--pj-accent); outline-offset: -
|
||||
.pj-goal-area > tr:first-child > * { border-top: 1px solid rgba(0, 0, 0, .12); }
|
||||
.pj-goal-area-name { font-size: 13px; font-weight: 800 !important; }
|
||||
.pj-goal-area-text, .pj-goal-row-text { display: block; word-break: keep-all; overflow-wrap: anywhere; }
|
||||
.pj-goal-tools { display: flex; flex-wrap: wrap; gap: 0; margin-top: 4px; opacity: 0; transition: opacity .12s; }
|
||||
.pj-goal-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; margin-top: 4px; opacity: 0; transition: opacity .12s; }
|
||||
.pj-goal-area-name:hover .pj-goal-tools, .pj-goal-row-label:hover .pj-goal-tools,
|
||||
.pj-goal-tools:focus-within { opacity: 1; }
|
||||
.pj-goal-tools .pj-icon-btn { width: 20px; height: 20px; font-size: 13px; }
|
||||
|
||||
@@ -7460,6 +7460,55 @@
|
||||
const year = table.dataset.year;
|
||||
const isAdmin = table.dataset.admin === "true";
|
||||
|
||||
// ── 왼쪽 이름 두 칸(구분·항목) 너비 — 머리 칸 오른쪽 끝을 끌어 조절, 브라우저에 기억 ──
|
||||
// 화면 배율(uiZoom) 안이라 마우스 이동 거리는 배율로 나눈다.
|
||||
const COL_KEY = "pj_goal_col_w";
|
||||
const COL_MIN = 48, COL_MAX = 320;
|
||||
const colW = { c1: 72, c2: 72 };
|
||||
try {
|
||||
const saved = JSON.parse(localStorage.getItem(COL_KEY) || "null");
|
||||
if (saved) ["c1", "c2"].forEach(function (k) {
|
||||
const v = parseInt(saved[k], 10);
|
||||
if (v) colW[k] = Math.min(COL_MAX, Math.max(COL_MIN, v));
|
||||
});
|
||||
} catch (_) {}
|
||||
function applyColW() {
|
||||
table.style.setProperty("--goal-c1-w", colW.c1 + "px");
|
||||
table.style.setProperty("--goal-c2-w", colW.c2 + "px");
|
||||
}
|
||||
applyColW();
|
||||
table.querySelectorAll(".pj-goal-colresize").forEach(function (h) {
|
||||
h.addEventListener("mousedown", function (e) {
|
||||
if (e.button !== 0) return;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
const key = h.dataset.col;
|
||||
const startX = e.clientX, startW = colW[key];
|
||||
h.classList.add("is-dragging");
|
||||
document.documentElement.classList.add("pj-goal-resizing");
|
||||
function onMove(ev) {
|
||||
const w = Math.round(startW + (ev.clientX - startX) / uiZoom());
|
||||
colW[key] = Math.min(COL_MAX, Math.max(COL_MIN, w));
|
||||
applyColW();
|
||||
}
|
||||
function onUp() {
|
||||
document.removeEventListener("mousemove", onMove);
|
||||
document.removeEventListener("mouseup", onUp);
|
||||
h.classList.remove("is-dragging");
|
||||
document.documentElement.classList.remove("pj-goal-resizing");
|
||||
try { localStorage.setItem(COL_KEY, JSON.stringify(colW)); } catch (_) {}
|
||||
}
|
||||
document.addEventListener("mousemove", onMove);
|
||||
document.addEventListener("mouseup", onUp);
|
||||
});
|
||||
// 두 번 누르면 기본 너비(72px)로
|
||||
h.addEventListener("dblclick", function () {
|
||||
colW[h.dataset.col] = 72;
|
||||
applyColW();
|
||||
try { localStorage.setItem(COL_KEY, JSON.stringify(colW)); } catch (_) {}
|
||||
});
|
||||
});
|
||||
|
||||
// ── 합계·달성률 ──
|
||||
function numOf(node) {
|
||||
const raw = (node.tagName === "INPUT" ? node.value : node.textContent) || "";
|
||||
|
||||
@@ -487,7 +487,7 @@ description 을 항상 HTML로 취급하기 때문). 두 번 실행하면 이중
|
||||
(`initGoalSide`, localStorage `pj_goal_open`, 목표 화면에선 항상 펼침). 연도 목록은 `router._goal_years_nav`
|
||||
(`goal_years` 최근 연도 먼저 + **올해는 항상**, 013 미적용이면 올해만) — 사이드바를 그리는 모든 화면 컨텍스트에 `goal_years`.
|
||||
- 연도를 누르면 `/project/goals/{연도}`(`goals.html`) — 스프레드시트 같은 한 표. 머리 줄(연간·1~12월)과 왼쪽 두 칸은 고정,
|
||||
이번 달 열 강조. 월 칸 너비 85px·연간 210px(여백 포함, `box-sizing: border-box`).
|
||||
이번 달 열 강조. 월 칸 너비 85px·연간 90px(여백 포함, `box-sizing: border-box`), 머리·왼쪽 이름 가운데 정렬. 왼쪽 이름 두 칸(구분·항목)은 머리 칸 오른쪽 끝을 끌어 너비 조절(48~320px, 더블클릭 = 72px) — 브라우저별 localStorage `pj_goal_col_w`, CSS 변수 `--goal-c1-w`·`--goal-c2-w`.
|
||||
- **숫자 지표** `goal_metrics`(year·metric `sales|roas`·kind `target|actual`·month 1~12·value NUMERIC(18,2)) —
|
||||
매출 목표/실적/달성, 로아스 목표/실적. 매출 연간 = 월 합계, 달성률 = 실적÷목표(월별, 연간은 실적이 있는 달의 목표 합계 대비)는
|
||||
화면에서 계산(저장 안 함). 매출 단위 글자는 `goal_years.sales_unit`.
|
||||
|
||||
Reference in New Issue
Block a user