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:
@@ -7,7 +7,9 @@
|
||||
my_open_total 진행 중인 내 업무 개수 (내 업무 배지)
|
||||
nav_projects 프로젝트 목록(평면)
|
||||
current_pid 지금 보고 있는 프로젝트 id (내 업무/수신함 화면이면 0)
|
||||
side_active 'inbox' | 'mytasks' | 'trash' | '' — 개인 메뉴 활성 표시
|
||||
side_active 'inbox' | 'mytasks' | 'trash' | 'goals' | '' — 개인 메뉴 활성 표시
|
||||
goal_years "목표" 아래 연도 목록(router._goal_years_nav — 올해는 항상 포함)
|
||||
goal_year_active 목표 화면에서 보고 있는 연도
|
||||
is_admin 프로젝트 생성/수정/삭제 권한
|
||||
목록 동작은 project.js 의 initSideTree(첫 화면을 같은 마크업으로 다시 그림),
|
||||
새 프로젝트/수정 모달은 각 화면이 include 하는 project/_side_modals.html. #}
|
||||
@@ -46,6 +48,29 @@
|
||||
<span class="pj-side-navtext">휴지통</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{# 목표 — 누르면 바로 아래에 연도가 펼쳐지고, 연도를 누르면 오른쪽에 그해 전체 목표
|
||||
(/project/goals/{연도}). 펼침 상태는 localStorage(pj_goal_open), 목표 화면에서는 항상 펼침.
|
||||
연도 추가는 관리자만(마이그레이션 013). #}
|
||||
{% set goal_open = side_active == 'goals' %}
|
||||
<div class="pj-side-goal{% if goal_open %} is-open{% endif %}" id="pj-side-goal"
|
||||
data-force-open="{{ 'true' if goal_open else 'false' }}">
|
||||
<button type="button" class="pj-side-navlink pj-side-goal-toggle" id="pj-side-goal-toggle"
|
||||
aria-expanded="{{ 'true' if goal_open else 'false' }}">
|
||||
<span class="material-symbols-outlined pj-side-navic">flag</span>
|
||||
<span class="pj-side-navtext">목표</span>
|
||||
<span class="material-symbols-outlined pj-side-goal-caret">expand_more</span>
|
||||
</button>
|
||||
<div class="pj-side-goal-years" id="pj-side-goal-years"{% if not goal_open %} hidden{% endif %}>
|
||||
{% for y in (goal_years or []) %}
|
||||
<a class="pj-side-goal-year{% if side_active == 'goals' and y == goal_year_active %} is-active{% endif %}"
|
||||
href="/project/goals/{{ y }}">{{ y }}년</a>
|
||||
{% endfor %}
|
||||
{% if is_admin %}
|
||||
<button type="button" class="pj-side-goal-add" id="pj-goal-year-add"
|
||||
data-next="{{ ((goal_years or [0]) | max) + 1 }}">+ 연도 추가</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="pj-side-block pj-tree-block">
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260930a" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
{% block topbar_after_logout %}{% include "project/_help_btn.html" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{# 연간 목표 — 좌측 사이드바 "목표" → 연도. 스프레드시트처럼 한 표에
|
||||
① 매출(목표·실적·달성)·로아스(목표·실적) 월별 숫자
|
||||
② 업무 영역(상품·마케팅·컨텐츠·유통 …)별 연간·월별 글.
|
||||
입력·구조 변경은 관리자만(칸별 즉시 저장, project.js initGoals), 나머지는 보기만.
|
||||
DB: project_db 013 (goal_years·goal_metrics·goal_areas·goal_rows·goal_cells). #}
|
||||
<div class="pj-wrap pj-inbox-view pj-goal-view">
|
||||
<div class="pj-layout">
|
||||
{% with current_pid = 0, side_active = "goals" %}{% include "project/_side.html" %}{% endwith %}
|
||||
|
||||
<section class="pj-main">
|
||||
<div class="pj-section-head">
|
||||
<h2>{{ goal_year }}년 목표</h2>
|
||||
{% if board %}
|
||||
<div class="pj-goal-head-acts">
|
||||
{% if is_admin %}
|
||||
<label class="pj-goal-unit">매출 단위
|
||||
<input type="text" id="pj-goal-unit" maxlength="20" placeholder="예: 백만원"
|
||||
value="{{ board.sales_unit }}" data-year="{{ goal_year }}" />
|
||||
</label>
|
||||
<button type="button" class="pj-btn pj-btn-danger" id="pj-goal-year-del"
|
||||
data-year="{{ goal_year }}">연도 삭제</button>
|
||||
{% else %}
|
||||
{% if board.sales_unit %}<span class="pj-goal-unit-ro">매출 단위: {{ board.sales_unit }}</span>{% endif %}
|
||||
<span class="pj-goal-note">목표는 관리자만 입력할 수 있습니다.</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="pj-view pj-goal-pane" id="pj-goal-pane">
|
||||
{% if not goals_enabled %}
|
||||
<div class="pj-empty">연간 목표가 아직 준비되지 않았습니다(DB 마이그레이션 013 필요).</div>
|
||||
{% elif not board %}
|
||||
<div class="pj-empty pj-goal-empty">
|
||||
<p>{{ goal_year }}년 목표가 아직 없습니다.</p>
|
||||
{% if is_admin %}
|
||||
<p class="pj-goal-empty-sub">만들면 가장 가까운 이전 연도의 업무 영역 구성을 그대로 가져옵니다(처음이면 상품·마케팅·컨텐츠·유통).</p>
|
||||
<button type="button" class="pj-btn pj-btn-primary" id="pj-goal-create" data-year="{{ goal_year }}">{{ goal_year }}년 목표 만들기</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% set sm = board.metrics.sales %}
|
||||
{% set rm = board.metrics.roas %}
|
||||
{% macro num_cell(metric, kind, labels, mo) -%}
|
||||
<td class="pj-goal-numtd{% if mo == this_month %} is-now{% endif %}">
|
||||
{%- if is_admin -%}
|
||||
<input type="text" class="pj-goal-num" inputmode="decimal" autocomplete="off"
|
||||
data-metric="{{ metric }}" data-kind="{{ kind }}" data-month="{{ mo }}"
|
||||
value="{{ labels.get(mo, '') }}" />
|
||||
{%- else -%}
|
||||
<span class="pj-goal-num" data-metric="{{ metric }}" data-kind="{{ kind }}" data-month="{{ mo }}">{{ labels.get(mo, '') }}</span>
|
||||
{%- endif -%}
|
||||
</td>
|
||||
{%- endmacro %}
|
||||
<table class="pj-goal-table" id="pj-goal-table" data-year="{{ goal_year }}"
|
||||
data-admin="{{ 'true' if is_admin else 'false' }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="pj-goal-c1"></th>
|
||||
<th class="pj-goal-c2"></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>
|
||||
</thead>
|
||||
|
||||
{# ── 숫자 지표 ── #}
|
||||
<tbody class="pj-goal-kpi">
|
||||
<tr>
|
||||
<th class="pj-goal-c1" rowspan="3">매출</th>
|
||||
<th class="pj-goal-c2">목표</th>
|
||||
<td class="pj-goal-sum" data-metric="sales" data-kind="target"></td>
|
||||
{% for mo in months %}{{ num_cell("sales", "target", sm.target_label, mo) }}{% endfor %}
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="pj-goal-c2">실적</th>
|
||||
<td class="pj-goal-sum" data-metric="sales" data-kind="actual"></td>
|
||||
{% for mo in months %}{{ num_cell("sales", "actual", sm.actual_label, mo) }}{% endfor %}
|
||||
</tr>
|
||||
<tr class="pj-goal-rate-row">
|
||||
<th class="pj-goal-c2">달성</th>
|
||||
<td class="pj-goal-rate" data-month="0"></td>
|
||||
{% for mo in months %}<td class="pj-goal-rate{% if mo == this_month %} is-now{% endif %}" data-month="{{ mo }}"></td>{% endfor %}
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="pj-goal-c1" rowspan="2">로아스</th>
|
||||
<th class="pj-goal-c2">목표</th>
|
||||
<td class="pj-goal-sum pj-goal-sum-na"></td>
|
||||
{% for mo in months %}{{ num_cell("roas", "target", rm.target_label, mo) }}{% endfor %}
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="pj-goal-c2">실적</th>
|
||||
<td class="pj-goal-sum pj-goal-sum-na"></td>
|
||||
{% for mo in months %}{{ num_cell("roas", "actual", rm.actual_label, mo) }}{% endfor %}
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
{# ── 업무 영역 — 영역마다 tbody 하나, 배경은 영역 색 ── #}
|
||||
{% for area in board.areas %}
|
||||
<tbody class="pj-goal-area" data-area-id="{{ area.id }}" style="--goal-bg: {{ area.color }}">
|
||||
{% for row in area.rows %}
|
||||
<tr data-row-id="{{ row.id }}">
|
||||
{% if loop.first %}
|
||||
<th class="pj-goal-c1 pj-goal-area-name" rowspan="{{ area.rows | length }}">
|
||||
<span class="pj-goal-area-text">{{ area.name }}</span>
|
||||
{% if is_admin %}
|
||||
<span class="pj-goal-tools">
|
||||
<button type="button" class="pj-icon-btn" data-goal-act="area-rename" data-name="{{ area.name }}" title="이름 바꾸기">✎</button>
|
||||
<button type="button" class="pj-icon-btn" data-goal-act="area-color" data-color="{{ area.color }}" title="색 바꾸기"><span class="material-symbols-outlined">palette</span></button>
|
||||
<button type="button" class="pj-icon-btn" data-goal-act="area-up" title="위로">↑</button>
|
||||
<button type="button" class="pj-icon-btn" data-goal-act="area-down" title="아래로">↓</button>
|
||||
<button type="button" class="pj-icon-btn" data-goal-act="row-add" title="줄 추가">+</button>
|
||||
<button type="button" class="pj-icon-btn" data-goal-act="area-del" data-name="{{ area.name }}" title="영역 삭제">×</button>
|
||||
</span>
|
||||
{% endif %}
|
||||
</th>
|
||||
{% endif %}
|
||||
<th class="pj-goal-c2 pj-goal-row-label">
|
||||
<span class="pj-goal-row-text">{{ row.label }}</span>
|
||||
{% if is_admin %}
|
||||
<span class="pj-goal-tools">
|
||||
<button type="button" class="pj-icon-btn" data-goal-act="row-rename" data-label="{{ row.label }}" title="줄 이름 바꾸기">✎</button>
|
||||
{% if area.rows | length > 1 %}
|
||||
<button type="button" class="pj-icon-btn" data-goal-act="row-up" title="위로">↑</button>
|
||||
<button type="button" class="pj-icon-btn" data-goal-act="row-down" title="아래로">↓</button>
|
||||
<button type="button" class="pj-icon-btn" data-goal-act="row-del" data-label="{{ row.label }}" title="줄 삭제">×</button>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</th>
|
||||
{% for mo in [0] + months %}
|
||||
<td class="pj-goal-texttd{% if mo == 0 %} pj-goal-year-col{% endif %}{% if mo == this_month %} is-now{% endif %}">
|
||||
{%- if is_admin -%}
|
||||
<textarea class="pj-goal-text" rows="1" data-row="{{ row.id }}" data-month="{{ mo }}"
|
||||
placeholder="{{ '연간 목표' if mo == 0 else '' }}">{{ row.cells.get(mo, '') }}</textarea>
|
||||
{%- else -%}
|
||||
<div class="pj-goal-text-ro">{{ row.cells.get(mo, '') }}</div>
|
||||
{%- endif -%}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% if is_admin %}
|
||||
<div class="pj-goal-foot">
|
||||
<button type="button" class="pj-btn" id="pj-goal-area-add">+ 업무 영역 추가</button>
|
||||
<span class="pj-goal-note">칸을 고치면 바로 저장됩니다. 숫자 칸을 비우면 지워집니다.</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if goal_area_colors %}<script>window.PJ_GOAL_COLORS = {{ goal_area_colors | tojson }};</script>{% endif %}
|
||||
{% include "project/_side_modals.html" %}
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project.js?v=20260930a" defer></script>
|
||||
{% endblock %}
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260929h" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260930a" />
|
||||
<link rel="stylesheet" href="/static/project-help.css?v=20260926v" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
@@ -79,7 +79,7 @@
|
||||
<h2><span class="pjh-num">2</span>화면 구성</h2>
|
||||
<div class="pjh-map" aria-hidden="true">
|
||||
<div class="pjh-map-top"><span><b>위쪽 바</b>화면 이름</span><span>🔔 알림 · 내 이름 · 로그아웃 · <b style="display:inline">?</b> 도움말</span></div>
|
||||
<div class="pjh-map-side"><b>왼쪽 사이드바</b>전체 검색<br>수신함 · 내 작업 · 휴지통<br>프로젝트 목록<br>완료 프로젝트<br>전체 멤버</div>
|
||||
<div class="pjh-map-side"><b>왼쪽 사이드바</b>전체 검색<br>수신함 · 내 작업 · 휴지통 · 목표<br>프로젝트 목록<br>완료 프로젝트<br>전체 멤버</div>
|
||||
<div class="pjh-map-main"><b>가운데 작업 영역</b>왼쪽 위: 프로젝트 제목 · 멤버<br>그 아래: 보기 탭(보드 · 목록 · 캘린더 · 타임라인 · 대시보드)<br>오른쪽 위: 범위(이 프로젝트 / 전체 프로젝트)<br>필터 바<br>작업들</div>
|
||||
</div>
|
||||
<h3>왼쪽 사이드바</h3>
|
||||
@@ -88,6 +88,11 @@
|
||||
<li><b>수신함</b> — 나를 태그한 작업과 알림. 숫자 배지는 아직 확인하지 않은 @태그 수입니다. (<a href="#inbox">17장</a>)</li>
|
||||
<li><b>내 작업</b> — 내가 담당자인 작업 모음. 숫자 배지는 아직 끝나지 않은 작업 수입니다. (<a href="#mytasks">15장</a>)</li>
|
||||
<li><b>휴지통</b> — 지운 작업을 3개월 보관합니다. 관리자에게만 보입니다. (<a href="#trash">19장</a>)</li>
|
||||
<li><b>목표</b> — 누르면 바로 아래에 연도가 펼쳐집니다. 연도를 누르면 오른쪽에 그해 전체 목표가 한 표로 나옵니다 —
|
||||
맨 위에 <b>매출</b>(목표·실적·달성률)과 <b>로아스</b>(목표·실적)를 달마다, 그 아래에 <b>업무 영역</b>(상품·마케팅·컨텐츠·유통 등)별로
|
||||
연간·월별 계획을 적습니다. 매출의 <b>연간</b> 칸은 월 합계, <b>달성</b>은 실적÷목표(100% 이상 초록)로 저절로 계산됩니다.
|
||||
<b>입력은 관리자만</b> 할 수 있고(칸을 고치면 바로 저장), 다른 직원은 보기만 합니다. 관리자는 <b>+ 연도 추가</b>로 새해 목표를
|
||||
만들고(이전 연도의 업무 영역 구성을 그대로 가져옴), 영역 이름 칸에 마우스를 올려 이름·색·순서·줄 추가·삭제를 합니다.</li>
|
||||
<li><b>프로젝트</b> — 내가 멤버인 프로젝트 목록입니다. 누르면 그 프로젝트 화면으로 갑니다. 완료한 프로젝트는 아래 <b>완료 프로젝트</b>에 흐리게 모입니다.</li>
|
||||
<li><b>전체 멤버</b> — 관리자에게만 보입니다. 사람 아이콘을 누르면 그 사람이 맡은 모든 작업을 한눈에 봅니다.</li>
|
||||
</ul>
|
||||
@@ -116,6 +121,7 @@
|
||||
<tr><td>새 프로젝트, 프로젝트 수정·순서 바꾸기</td><td>관리자 (<span class="pjh-ui">+</span> · <span class="pjh-ui">✎</span> · <span class="pjh-ui">⣿</span> 버튼이 관리자에게만 보입니다)</td></tr>
|
||||
<tr><td>멤버 배정·제외</td><td>관리자</td></tr>
|
||||
<tr><td>휴지통 보기·복구, 전체 멤버, 대시보드의 담당자별 차트</td><td>관리자</td></tr>
|
||||
<tr><td>목표 보기</td><td>누구나 · <b>목표 입력·연도 추가·업무 영역 편집</b>은 관리자</td></tr>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260929h" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260930a" />
|
||||
<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=20260929h" defer></script>
|
||||
<script src="/static/project.js?v=20260930a" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260929h" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260930a" />
|
||||
<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=20260929h" defer></script>
|
||||
<script src="/static/project.js?v=20260930a" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260929h" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260930a" />
|
||||
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — 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=20260929h" defer></script>
|
||||
<script src="/static/project.js?v=20260930a" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260929h" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260930a" />
|
||||
<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=20260929h" defer></script>
|
||||
<script src="/static/project.js?v=20260930a" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user