feat(project): 주간 회의록 위에 이 달 계획 카드, 숫자 영역은 한 줄 막대로 축소

- 연간 목표 표의 그 달 열 글을 업무 영역별 카드로 표시(router._month_plan) — 빈 칸 제외,
  가로 병합 칸 글은 범위(9~10월) 표시, 묶인 줄은 묶음 항목 이름, 목표 표 미적용이면 숨김
- 머리 숫자 9칸을 한 줄 막대(.pj-meet-kpibar)로 — 값 15px, 설명 문구는 말풍선
- project.css 캐시 버전 올림

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 15:21:17 +09:00
parent 6ea4a2e0f9
commit 334b83c973
11 changed files with 109 additions and 32 deletions
+31
View File
@@ -2945,6 +2945,36 @@ def _meeting_view(request: Request, st: Any, *, year: int, month: int, week: dat
return {"meeting": meeting, "head": head, "markets": [{"code": m["code"], "name": m["name"]} for m in markets]}
def _month_plan(st: Any, year: int, month: int) -> list[dict[str, Any]] | None:
"""회의록 위 "N월 계획" — 연간 목표 표의 그 달 열 글을 업무 영역별로(빈 칸은 뺌). 목표 표가 없으면 None.
가로 병합(예: 9~10월 칸)에 적은 글도 그 달 계획으로, 세로 병합은 한 번만. 항목 이름이 묶인 줄(016)은 묶음 이름."""
try:
board = st.get_goal_board(year=year) if st.goals_enabled() else None
except Exception: # noqa: BLE001 — 목표 표를 못 읽어도 회의록은 열린다
logger.warning("goal board unavailable for meeting plan", exc_info=True)
return None
if not board:
return None
out = []
for area in board["areas"]:
rows = area["rows"]
_goal_area_layout(rows, 0)
_goal_label_spans(rows)
items, label = [], ""
for row in rows:
if not row.get("label_cont"):
label = row.get("label") or ""
cell = next((c for c in row["layout"] if c["kind"] == "month" and c["m"] <= month <= c["m"] + c["span"] - 1), None)
text = (row["cells"].get(cell["m"], "") if cell else "").strip()
if not text:
continue
rng = f"{cell['m']}~{cell['m'] + cell['span'] - 1}월" if cell["span"] > 1 else ""
items.append({"label": label, "text": text, "range": rng})
if items:
out.append({"name": area["name"], "color": area["color"], "lines": items}) # 키 lines — 템플릿의 a.items 는 dict.items 메서드
return out
def _meet_members() -> list[dict[str, str]]:
"""회의 참석자 후보 = 전체 멤버(project 모듈 권한 보유 등록 사용자) — 이름·이메일·사진."""
try:
@@ -3056,6 +3086,7 @@ def goal_meeting_page(request: Request, year: int, month: int, week: str | None
"sync_to": min(sel + timedelta(days=6), today).isoformat(),
"meeting_status": store.MEETING_STATUS,
"meet_members": members,
"month_plan": _month_plan(st, year, month),
"attendee_list": _parse_attendees((view.get("meeting") or {}).get("attendees", ""), members),
**view,
},
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001v" />
<link rel="stylesheet" href="/static/project.css?v=20261001w" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -70,6 +70,26 @@
<div class="pj-view pj-meet-pane" id="pj-meet-pane" data-week="{{ week }}" data-year="{{ goal_year }}"
data-month="{{ goal_month }}" data-admin="{{ 'true' if is_admin else 'false' }}">
{# 이 달 계획 — 연간 목표 표의 그 달 열 글(업무 영역별, router._month_plan) #}
{% if month_plan is not none %}
<section class="pj-meet-plan">
<div class="pj-meet-plan-head"><span class="material-symbols-outlined">event_note</span>{{ goal_month }}월 계획
<a href="/project/goals/{{ goal_year }}">목표 표에서 보기</a></div>
{% if month_plan %}
<div class="pj-meet-plan-grid">
{% for a in month_plan %}
<div class="pj-meet-plan-area" style="--goal-bg: {{ a.color or '#f4f5f7' }}">
<b class="pj-meet-plan-name">{{ a.name }}</b>
{% for it in a.lines %}
<div class="pj-meet-plan-item">{% if it.label %}<span class="pj-meet-plan-label">{{ it.label }}</span>{% endif %}<span class="pj-meet-plan-text">{{ it.text }}</span>{% if it.range %}<em>{{ it.range }}</em>{% endif %}</div>
{% endfor %}
</div>
{% endfor %}
</div>
{% else %}<p class="pj-meet-plan-empty">목표 표에 {{ goal_month }}월 계획이 아직 없습니다.</p>{% endif %}
</section>
{% endif %}
{% if not meetings_enabled %}
<div class="pj-empty">주간 회의록이 아직 준비되지 않았습니다(DB 마이그레이션 015 필요).</div>
{% elif not meeting %}
@@ -87,7 +107,8 @@
{# 매출 자료 갱신 — 주차를 열면 표시 없이 실적 모듈 매출 업데이트(지난주 월요일 ~ 이번 주 오늘)를 한 번 더 돌리고
숫자 칸만 다시 그린다(project.js initMeetingSync, 같은 주는 10분에 한 번). 상태 줄은 2026-10-01 요청으로 뺐다. #}
{% if h.perf and sync_from %}<div id="pj-meet-sync" hidden data-from="{{ sync_from }}" data-to="{{ sync_to }}"></div>{% endif %}
{# ── 머리 — 월 목표 대비 누적·남은 주 필요 매출 / 전주 리뷰 / 금주 목표 ── #}
{# ── 숫자 — 한 줄 막대(월 목표 대비 누적·남은 주 필요 매출 | 전주 리뷰 | 금주 목표) ── #}
<div class="pj-meet-kpibar">
<div class="pj-meet-kpis">
<div class="pj-meet-kpi">
<span class="pj-meet-kpi-label">월 목표 매출</span>
@@ -99,10 +120,9 @@
<span class="pj-meet-kpi-val">{% if h.mtd is not none %}{{ won(h.mtd) }}<small>원</small>{% else %}<span class="pj-muted">—</span>{% endif %}</span>
{% if h.month_target_won and h.mtd is not none %}<span class="pj-meet-kpi-sub">달성 {{ "%.1f" | format(h.mtd / h.month_target_won * 100) }}%</span>{% endif %}
</div>
<div class="pj-meet-kpi is-accent">
<span class="pj-meet-kpi-label">주당 필요 매출 <small>(남은 {{ h.weeks_left }}주)</small></span>
<div class="pj-meet-kpi is-accent" title="월 목표 − 누적을 이번 주 포함 남은 주로 나눈 값">
<span class="pj-meet-kpi-label">주당 필요 <small>(남은 {{ h.weeks_left }}주)</small></span>
<span class="pj-meet-kpi-val">{% if h.need_per_week is not none %}{{ won(h.need_per_week) }}<small>원</small>{% else %}<span class="pj-muted">—</span>{% endif %}</span>
<span class="pj-meet-kpi-sub">월 목표 − 누적을 이번 주 포함 남은 주로 나눈 값</span>
</div>
<div class="pj-meet-kpi">
<span class="pj-meet-kpi-label">목표 ROAS</span>
@@ -141,6 +161,7 @@
{% if meeting.week_target and h.week_result is not none %}<span class="pj-meet-kpi-sub">목표의 {{ "%.1f" | format(h.week_result / meeting.week_target * 100) }}%</span>{% endif %}
</div>
</div>
</div>
{% if not h.perf %}<p class="pj-goal-note">실적 모듈이 연결되지 않아 실적·누적·쇼핑몰 자동 결과는 비어 있습니다(결과는 직접 입력).</p>{% endif %}
{# 참석자 — 전체 멤버에서 고른다(칩, [참석자] = 고르기 창). 저장은 이메일을 쉼표로 이어서, 예전 자유 입력 글자도 칩으로 #}
@@ -256,5 +277,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261001v" defer></script>
<script src="/static/project.js?v=20261001w" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001v" />
<link rel="stylesheet" href="/static/project.css?v=20261001w" />
<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=20261001v" defer></script>
<script src="/static/project.js?v=20261001w" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001v" />
<link rel="stylesheet" href="/static/project.css?v=20261001w" />
<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=20261001v" />
<link rel="stylesheet" href="/static/project.css?v=20261001w" />
<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=20261001v" defer></script>
<script src="/static/project.js?v=20261001w" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001v" />
<link rel="stylesheet" href="/static/project.css?v=20261001w" />
<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=20261001v" defer></script>
<script src="/static/project.js?v=20261001w" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001v" />
<link rel="stylesheet" href="/static/project.css?v=20261001w" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — 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=20261001v" defer></script>
<script src="/static/project.js?v=20261001w" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001v" />
<link rel="stylesheet" href="/static/project.css?v=20261001w" />
<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=20261001v" defer></script>
<script src="/static/project.js?v=20261001w" defer></script>
{% endblock %}