feat(project): 연간 목표 — 사이드바 "목표" → 연도 → 그해 전체 목표 표

- 사이드바 휴지통 아래 "목표": 누르면 연도 목록이 펼쳐지고(올해는 항상), 관리자는 + 연도 추가
- /project/goals/{연도}: 매출(목표·실적·달성)·로아스(목표·실적) 월별 숫자 + 업무 영역
  (상품·마케팅·컨텐츠·유통[콜라보·인플·쿠팡·기타])별 연간·월별 글을 스프레드시트처럼 한 표에
- 매출 연간 합계·달성률은 화면에서 계산, 칸별 즉시 저장, 영역 이름·색·순서·줄 추가/삭제
- 입력·구조 변경은 관리자만, 조회는 project 권한자 전원
- 새 연도는 가장 가까운 이전 연도의 영역 구성을 복사(처음이면 기본 4개 영역)
- DB 마이그레이션 013(goal_years·goal_metrics·goal_areas·goal_rows·goal_cells), 문서·도움말 갱신
- project.js/css 캐시 버전 20260930a

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-30 11:13:54 +09:00
parent b95206dcf4
commit ec78dd328d
15 changed files with 1315 additions and 13 deletions
+109
View File
@@ -1971,3 +1971,112 @@ html.pj-ui-scale .pj-task-modal-card { height: calc(100vh / var(--pj-z)); max-he
html.pj-ui-scale .pj-modal-card { max-height: calc(90vh / var(--pj-z)); }
html.pj-ui-scale .pj-mt-list { max-height: calc(50vh / var(--pj-z)); }
html.pj-ui-scale .pj-modal-chat { max-height: calc(92vh / var(--pj-z)); }
/* ════════════════════════════════════════════════════════════
연간 목표 — 사이드바 "목표"(연도 펼침) + /project/goals/{연도} 표
════════════════════════════════════════════════════════════ */
.pj-side-goal-caret { margin-left: auto; font-size: 18px; color: #8a9099; transition: transform .15s; }
.pj-side-goal.is-open .pj-side-goal-caret { transform: rotate(180deg); }
.pj-side-goal-years { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 4px 37px; }
.pj-side-goal-years[hidden] { display: none; }
.pj-side-goal-year {
display: block; padding: 5px 8px; border-radius: 6px; font-size: 13px; font-weight: 600;
color: var(--pj-ink); text-decoration: none;
}
.pj-side-goal-year:hover { background: #f1f2f4; }
.pj-side-goal-year.is-active { background: var(--pj-accent-tint); color: var(--pj-accent-dark); }
.pj-side-goal-add {
align-self: flex-start; margin-top: 2px; padding: 4px 8px; border: none; background: transparent;
border-radius: 6px; color: var(--pj-ink-soft); font-size: 12.5px; cursor: pointer;
}
.pj-side-goal-add:hover { background: #f1f2f4; color: var(--pj-ink); }
/* 표는 화면 폭 전체 — 내 작업·수신함의 읽기 폭 제한(1180px)을 푼다 */
.pj-goal-view .pj-main { max-width: none; }
.pj-goal-head-acts { display: flex; align-items: center; gap: 10px; }
.pj-goal-unit { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--pj-ink-soft); }
.pj-goal-unit input {
width: 96px; height: 30px; padding: 0 8px; border: 1px solid var(--pj-border); border-radius: 7px;
font-size: 13px; color: var(--pj-ink);
}
.pj-goal-unit-ro { font-size: 12.5px; color: var(--pj-ink); }
.pj-goal-note { font-size: 12px; color: var(--pj-ink-soft); }
.pj-goal-empty p { margin: 0 0 10px; }
.pj-goal-empty-sub { font-size: 12.5px; }
/* 가로·세로 스크롤은 이 칸 하나가 맡고, 머리 줄과 왼쪽 두 칸(구분·항목)은 붙어 있다 */
.pj-goal-pane { flex: 1 1 auto; min-height: 0; overflow: auto; }
.pj-goal-table {
border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12.5px;
color: var(--pj-ink); background: #fff; border: 1px solid #dfe2e6; border-radius: 10px;
}
.pj-goal-table th, .pj-goal-table td {
border-right: 1px solid #e6e8eb; border-bottom: 1px solid #e6e8eb; padding: 0; vertical-align: top;
}
.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;
}
.pj-goal-table thead th:not(.pj-goal-c1):not(.pj-goal-c2) { width: 150px; min-width: 150px; }
.pj-goal-table thead th.pj-goal-year-col { width: 210px; min-width: 210px; }
.pj-goal-table thead th.is-now { color: var(--pj-accent-dark); box-shadow: inset 0 -2px 0 var(--pj-accent); }
.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;
}
.pj-goal-c1 { left: 0; }
.pj-goal-c2 { left: 72px; font-weight: 600; color: #3b4048; }
.pj-goal-table thead .pj-goal-c1, .pj-goal-table thead .pj-goal-c2 { z-index: 4; }
.pj-goal-table tbody th { padding: 7px 8px; }
/* 숫자 지표 */
.pj-goal-kpi td { height: 32px; vertical-align: middle; }
.pj-goal-kpi td.is-now { background: #faf9ff; }
input.pj-goal-num, span.pj-goal-num {
display: block; width: 100%; box-sizing: border-box; height: 32px; padding: 0 10px; border: none;
background: transparent; font: inherit; font-variant-numeric: tabular-nums; text-align: right; line-height: 32px;
}
input.pj-goal-num:focus { outline: 2px solid var(--pj-accent); outline-offset: -2px; background: #fff; }
.pj-goal-sum { padding: 0 10px !important; text-align: right; font-weight: 700; background: #fafafb;
font-variant-numeric: tabular-nums; }
.pj-goal-rate { padding: 0 10px !important; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.pj-goal-rate.is-good { color: #1f8a4c; }
.pj-goal-rate.is-low { color: #c2410c; }
.pj-goal-kpi tr:last-child > * { border-bottom: 2px solid #d5d9de; }
/* 업무 영역 — 영역 색(--goal-bg)이 줄 전체 배경(스프레드시트처럼) */
.pj-goal-area > tr > th, .pj-goal-area > tr > td { background: var(--goal-bg, #fff); border-color: rgba(0, 0, 0, .07); }
.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-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; }
.pj-goal-tools .pj-icon-btn .material-symbols-outlined { font-size: 15px; }
.pj-goal-tools .pj-icon-btn:hover { background: rgba(255, 255, 255, .7); }
textarea.pj-goal-text {
display: block; width: 100%; box-sizing: border-box; min-height: 46px; padding: 7px 9px; border: none;
background: transparent; font: inherit; line-height: 1.5; color: inherit; resize: none; overflow: hidden;
}
textarea.pj-goal-text:focus { outline: 2px solid var(--pj-accent); outline-offset: -2px; background: rgba(255, 255, 255, .75); }
textarea.pj-goal-text::placeholder { color: rgba(0, 0, 0, .3); }
.pj-goal-text-ro { min-height: 46px; padding: 7px 9px; 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; }
.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; } }
.pj-goal-foot { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; }
/* 영역 색 고르기 팝업(body 에 붙음) */
.pj-goal-colorpop {
position: fixed; z-index: 1000; display: grid; grid-template-columns: repeat(4, 26px); gap: 6px;
padding: 10px; background: #fff; border: 1px solid var(--pj-border); border-radius: 10px;
box-shadow: 0 8px 24px rgba(16, 24, 40, .16);
}
.pj-goal-swatch { width: 26px; height: 26px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .12); cursor: pointer; padding: 0; }
.pj-goal-swatch:hover { transform: scale(1.08); }
.pj-goal-swatch.is-on { outline: 2px solid var(--pj-accent); outline-offset: 1px; }