feat(project): month-bounded meeting weeks, weekly sales targets, sticky header

- Weeks stay inside the month: week 1 starts on the 1st (through the next
  Sunday if the 1st is a weekend); a trailing Mon/Tue joins the last week.
  "Last week" is the previous period.
- Prev-week review columns: 전주 업무 | 결과(text, new result_note) |
  전주 목표 | 결과(amount).
- Header now shows month target, cumulative weekly target, month-to-date
  sales and gap (amount + %), with decisions/notes beside it; the area
  stays fixed while scrolling.
- Goals board: the monthly sales target is entered per week; the sum
  becomes the month target.
- Migration 020: result_note, goal_week_targets, drop Monday-only check,
  move absorbed Monday meetings to the new week start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-07 11:24:41 +09:00
parent 9194487217
commit cd3577b299
21 changed files with 751 additions and 250 deletions
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261003n" />
<link rel="stylesheet" href="/static/project.css?v=20261007a" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -56,14 +56,18 @@
{% set rm = board.metrics.roas %}
{# 월 칸은 pj-goal-m + data-h(분기 1~4) — 분기 접기(initGoals)가 이걸로 숨긴다.
분기 칸 클래스는 예전 이름 pj-goal-half-col 그대로(연간 칸처럼 굵게·회색 합계) #}
{# 매출 목표 칸(020) — 누르면 그 달 주차별 목표 입력 창(project.js initGoalWeekTargets), 합계 = 월 목표 #}
{% macro num_cell(metric, kind, labels, mo) -%}
<td class="pj-goal-numtd pj-goal-m{% if mo == this_month %} is-now{% endif %}" data-h="{{ (mo - 1) // 3 + 1 }}">
{%- set weekly = week_targets and metric == 'sales' and kind == 'target' -%}
<td class="pj-goal-numtd pj-goal-m{% if mo == this_month %} is-now{% endif %}{% if weekly %} is-weekly{% endif %}" data-h="{{ (mo - 1) // 3 + 1 }}">
{%- if is_admin -%}
<input type="text" class="pj-goal-num" inputmode="decimal" autocomplete="off"
data-metric="{{ metric }}" data-kind="{{ kind }}" data-month="{{ mo }}"
{%- if weekly %} readonly data-weekly="1" title="{{ mo }}월 주차별 목표 입력(합계 = 월 목표)"{% endif %}
value="{{ labels.get(mo, '') }}" />
{%- else -%}
<span class="pj-goal-num" data-metric="{{ metric }}" data-kind="{{ kind }}" data-month="{{ mo }}">{{ labels.get(mo, '') }}</span>
<span class="pj-goal-num" data-metric="{{ metric }}" data-kind="{{ kind }}" data-month="{{ mo }}"
{%- if weekly %} data-weekly="1" tabindex="0" title="{{ mo }}월 주차별 목표 보기"{% endif %}>{{ labels.get(mo, '') }}</span>
{%- endif -%}
</td>
{%- endmacro %}
@@ -198,9 +202,10 @@
</div>
{% if goal_area_colors %}<script>window.PJ_GOAL_COLORS = {{ goal_area_colors | tojson }};</script>{% endif %}
{% if week_targets %}<script>window.PJ_GOAL_WEEKS = {{ week_targets | tojson }}; window.PJ_GOAL_UNIT = {{ (board.sales_unit if board else '') | tojson }};</script>{% endif %}
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project-goal-text.js?v=20261003d" defer></script>
<script src="/static/project.js?v=20261006a" defer></script>
<script src="/static/project.js?v=20261007a" defer></script>
{% endblock %}