fix(project): 회의록 쇼핑몰 연결 결과 — 진행 전 주·실적 미사용 쇼핑몰을 0 대신 구분, 이번주 실적 표시

- 지난 회의록 주가 아직 시작 전이면 자동 0 대신 "진행 전"
- 실적 모듈에서 사용 중이 아닌 쇼핑몰(사용 OFF·없는 코드)에 연결된 줄은 "실적 미사용" 표시 + 결과 직접 입력
- 자동 결과 말풍선에 쇼핑몰·기간, 0 이면 매출 업데이트 안내
- 쇼핑몰 연결 줄의 목표 금액 아래에 이번주 실적(월요일~오늘, 목표 대비 %)
- project.css/js 캐시 버전 20261001d, 문서 갱신

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 11:54:06 +09:00
parent c9bce7c976
commit 601971d43d
10 changed files with 47 additions and 24 deletions
+22 -8
View File
@@ -2868,26 +2868,40 @@ def _meeting_view(request: Request, st: Any, *, year: int, month: int, week: dat
}
if meeting:
# 줄마다 전주 결과 — 쇼핑몰 연결이면 그 주 실적(자동), 아니면 직접 입력한 결과
all_codes = [m["code"] for m in markets]
by_week: dict[str, dict[str, int] | None] = {}
def week_sales(ws: str) -> dict[str, int] | None:
"""그 주(월~일, 오늘까지) 쇼핑몰별 실적 — 아직 시작 안 한 주는 None."""
if ws not in by_week:
a = date.fromisoformat(ws)
by_week[ws] = _perf_sum(perf, a, min(a + timedelta(days=6), today), all_codes) if a <= today else None
return by_week[ws]
for it in meeting["items"]:
prev = it.get("prev")
if not prev:
continue
auto = None
code = prev.get("marketplace_code") or ""
if code:
ws = prev["week_start"]
if ws not in by_week:
a = date.fromisoformat(ws)
by_week[ws] = _perf_sum(perf, a, min(a + timedelta(days=6), today),
[m["code"] for m in markets]) if a <= today else {}
got = by_week[ws]
a = date.fromisoformat(prev["week_start"])
prev["period"] = f"{a.month}/{a.day}~{(a + timedelta(days=6)).month}/{(a + timedelta(days=6)).day}"
prev["not_started"] = bool(code) and a > today
# 실적 모듈에서 사용 중이 아닌 쇼핑몰(설정에서 사용 OFF·없는 코드)은 늘 0 이라 자동으로 보지 않고 직접 입력
prev["market_off"] = bool(code) and code not in names
if code and perf is not None and not prev["not_started"] and not prev["market_off"]:
got = week_sales(prev["week_start"])
auto = None if got is None else got.get(code, 0)
prev["auto_result"] = auto
prev["result"] = auto if auto is not None else prev.get("result_amount")
prev["market_name"] = names.get(code, code)
for it in meeting["items"]:
it["market_name"] = names.get(it["marketplace_code"], it["marketplace_code"]) if it["marketplace_code"] else ""
code = it["marketplace_code"]
it["market_name"] = names.get(code, code) if code else ""
it["market_off"] = bool(code) and code not in names
# 이번 주 진행 중 실적(쇼핑몰 연결 줄) — 목표 금액 칸 아래에 "이번주 실적"
got = week_sales(meeting["week_start"]) if code and perf is not None and not it["market_off"] else None
it["week_auto"] = None if got is None else got.get(code, 0)
p = it.get("prev")
it["rate"] = (round(p["result"] / p["target_amount"] * 100, 1)
if p and p.get("result") is not None and p.get("target_amount") else None)
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001c" />
<link rel="stylesheet" href="/static/project.css?v=20261001d" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -169,7 +169,8 @@
{% endif %}
<th class="pj-meet-c-label">
<span class="pj-meet-label"{% if edit %} data-meet-edit="label" title="눌러서 이름 수정 · 우클릭 = 줄 메뉴"{% endif %}>{{ it.label }}</span>
{% if it.market_name %}<span class="pj-meet-market" title="결과를 실적 모듈 {{ it.market_name }} 매출에서 자동으로">{{ it.market_name }}</span>{% endif %}
{% if it.market_off %}<span class="pj-meet-market is-off" title="실적 모듈에서 사용 중인 쇼핑몰이 아닙니다(실적 설정에서 사용 OFF 이거나 없는 쇼핑몰) — 결과는 직접 입력">{{ it.market_name }} · 실적 미사용</span>
{% elif it.market_name %}<span class="pj-meet-market" title="결과를 실적 모듈 {{ it.market_name }} 매출에서 자동으로">{{ it.market_name }}</span>{% endif %}
{% if edit %}<button type="button" class="pj-icon-btn pj-meet-more" data-meet-act="menu" title="줄 메뉴"><span class="material-symbols-outlined">more_horiz</span></button>{% endif %}
</th>
<td class="pj-meet-c-text">
@@ -179,13 +180,16 @@
<td class="pj-meet-c-amt">
{% if edit %}<input type="text" class="pj-meet-amount" data-field="target_amount" inputmode="decimal" autocomplete="off" value="{{ won(it.target_amount) }}" />
{% else %}{{ won(it.target_amount) }}{% endif %}
{% if it.week_auto is not none %}<span class="pj-meet-week-auto" title="실적 모듈 {{ it.market_name }} 이번 주({{ week[5:] | replace('-', '/') }}~ 오늘까지) 매출">이번주 실적 {{ won(it.week_auto) }}{% if it.target_amount %} · {{ "%.0f" | format(it.week_auto / it.target_amount * 100) }}%{% endif %}</span>{% endif %}
</td>
{% if p %}
<td class="pj-meet-c-text is-prev"><div class="pj-meet-ro">{{ p.content }}</div></td>
<td class="pj-meet-c-amt is-prev">{{ won(p.target_amount) }}</td>
<td class="pj-meet-c-amt is-prev">
{% if p.auto_result is not none %}
<span class="pj-meet-auto" title="실적 모듈 {{ p.market_name }} {{ p.week_start }} 주 매출(자동)">{{ won(p.auto_result) }}</span>
{% if p.not_started %}
<span class="pj-muted" title="지난 회의록의 주({{ p.period }})가 아직 시작되지 않았습니다">진행 전</span>
{% elif p.auto_result is not none %}
<span class="pj-meet-auto" title="실적 모듈 {{ p.market_name }} {{ p.period }} 매출(자동){% if not p.auto_result %} — 0 이면 그 기간 실적이 아직 없습니다(실적 화면 [매출 업데이트]){% endif %}">{{ won(p.auto_result) }}</span>
{% elif edit %}<input type="text" class="pj-meet-amount" data-field="result_amount" data-target="prev" inputmode="decimal" autocomplete="off" value="{{ won(p.result_amount) }}" placeholder="결과" />
{% else %}{{ won(p.result_amount) }}{% endif %}
</td>
@@ -228,5 +232,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261001c" defer></script>
<script src="/static/project.js?v=20261001d" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001c" />
<link rel="stylesheet" href="/static/project.css?v=20261001d" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -206,5 +206,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261001c" defer></script>
<script src="/static/project.js?v=20261001d" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001c" />
<link rel="stylesheet" href="/static/project.css?v=20261001d" />
<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=20261001c" />
<link rel="stylesheet" href="/static/project.css?v=20261001d" />
<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=20261001c" defer></script>
<script src="/static/project.js?v=20261001d" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001c" />
<link rel="stylesheet" href="/static/project.css?v=20261001d" />
<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=20261001c" defer></script>
<script src="/static/project.js?v=20261001d" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001c" />
<link rel="stylesheet" href="/static/project.css?v=20261001d" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — 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=20261001c" defer></script>
<script src="/static/project.js?v=20261001d" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001c" />
<link rel="stylesheet" href="/static/project.css?v=20261001d" />
<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=20261001c" defer></script>
<script src="/static/project.js?v=20261001d" defer></script>
{% endblock %}