feat(project): manual monthly sales target with weekly diff
Week target popup now has its own "month total" input at the top; the monthly target is saved as entered instead of being the sum of weeks. Bottom shows week sum and diff (month target - week sum), colored for remaining / over / even. Requests without `month` (stale cached JS) still fall back to the week sum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -56,14 +56,14 @@
|
||||
{% set rm = board.metrics.roas %}
|
||||
{# 월 칸은 pj-goal-m + data-h(분기 1~4) — 분기 접기(initGoals)가 이걸로 숨긴다.
|
||||
분기 칸 클래스는 예전 이름 pj-goal-half-col 그대로(연간 칸처럼 굵게·회색 합계) #}
|
||||
{# 매출 목표 칸(020) — 누르면 그 달 주차별 목표 입력 창(project.js initGoalWeekTargets), 합계 = 월 목표 #}
|
||||
{# 매출 목표 칸(020) — 누르면 그 달 월 목표(직접 입력)·주차별 목표 입력 창, 맨 아래 차이(월 목표 − 주차 합계) #}
|
||||
{% macro num_cell(metric, kind, labels, mo) -%}
|
||||
{%- 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 %}
|
||||
{%- 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 }}"
|
||||
|
||||
Reference in New Issue
Block a user