{% extends "erp_base.html" %} {% block head_extra %} {% 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). #}
{% with current_pid = 0, side_active = "goals" %}{% include "project/_side.html" %}{% endwith %}

{{ goal_year }}년 목표

{% if board %}
{% if is_admin %} {% else %} {% if board.sales_unit %}매출 단위: {{ board.sales_unit }}{% endif %} 목표는 관리자만 입력할 수 있습니다. {% endif %}
{% endif %}
{% if not goals_enabled %}
연간 목표가 아직 준비되지 않았습니다(DB 마이그레이션 013 필요).
{% elif not board %}

{{ goal_year }}년 목표가 아직 없습니다.

{% if is_admin %}

만들면 가장 가까운 이전 연도의 업무 영역 구성을 그대로 가져옵니다(처음이면 상품·마케팅·컨텐츠·유통).

{% endif %}
{% else %} {% set sm = board.metrics.sales %} {% set rm = board.metrics.roas %} {% macro num_cell(metric, kind, labels, mo) -%} {%- if is_admin -%} {%- else -%} {{ labels.get(mo, '') }} {%- endif -%} {%- endmacro %} {# 오른쪽 끝을 끌어 이름 칸 너비 조절 — 브라우저에 기억(localStorage pj_goal_col_w) #} {% for mo in months %}{% endfor %} {# ── 숫자 지표 ── #} {% for mo in months %}{{ num_cell("sales", "target", sm.target_label, mo) }}{% endfor %} {% for mo in months %}{{ num_cell("sales", "actual", sm.actual_label, mo) }}{% endfor %} {% for mo in months %}{% endfor %} {% for mo in months %}{{ num_cell("roas", "target", rm.target_label, mo) }}{% endfor %} {% for mo in months %}{{ num_cell("roas", "actual", rm.actual_label, mo) }}{% endfor %} {# ── 업무 영역 — 영역마다 tbody 하나, 배경은 영역 색 ── #} {% for area in board.areas %} {% for row in area.rows %} {% if loop.first %} {% endif %} {% for mo in [0] + months %} {% endfor %} {% endfor %} {% endfor %}
연간{{ mo }}월
매출 목표
실적
달성
로아스 목표
실적
{{ area.name }} {% if is_admin %} {% endif %} {{ row.label }} {% if is_admin %} {% if area.rows | length > 1 %} {% endif %} {% endif %} {%- if is_admin -%} {%- else -%}
{{ row.cells.get(mo, '') }}
{%- endif -%}
{% if is_admin %}
칸을 고치면 바로 저장됩니다. 숫자 칸을 비우면 지워집니다.
{% endif %} {% endif %}
{% if goal_area_colors %}{% endif %} {% include "project/_side_modals.html" %} {% include "project/_member_tasks_modal.html" %} {% endblock %}