feat(project): drop auto last-week results in weekly meetings
Last-week result is always entered by hand; remove shop sales auto-fill and the 자동입력 / 실적 미사용 badges next to item names. This-week sales under the target stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3027,7 +3027,7 @@ def _meeting_view(request: Request, st: Any, *, year: int, month: int, week: dat
|
||||
(f" · 갱신 성공 기록 없음: {', '.join(fresh['never'])}" if fresh["never"] else "")) if fresh else "",
|
||||
}
|
||||
if meeting:
|
||||
# 줄마다 지난주 결과 — 쇼핑몰 연결이면 그 주 실적(자동), 아니면 직접 입력한 결과(지난주 줄에 저장)
|
||||
# 줄마다 지난주 결과 — 늘 직접 입력한 결과(지난주 줄에 저장). 쇼핑몰 실적 자동 결과는 2026-10-06 요청으로 폐지.
|
||||
all_codes = [m["code"] for m in perf.markets]
|
||||
by_week: dict[str, dict[str, int] | None] = {}
|
||||
|
||||
@@ -3040,31 +3040,12 @@ def _meeting_view(request: Request, st: Any, *, year: int, month: int, week: dat
|
||||
|
||||
for it in meeting["items"]:
|
||||
prev = it.get("prev")
|
||||
if not prev:
|
||||
continue
|
||||
auto = None
|
||||
code = prev.get("marketplace_code") or ""
|
||||
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
|
||||
# 쇼핑몰 목록을 못 읽었으면 연결 쇼핑몰이 사용 중인지 알 수 없다 → 결과 미확인(직접 입력 칸·0 으로 바꾸지 않음)
|
||||
prev["auto_error"] = bool(code) and not prev["not_started"] and perf.state == "error"
|
||||
# 실적 모듈에서 사용 중이 아닌 쇼핑몰(설정에서 사용 OFF·없는 코드)은 늘 0 이라 자동으로 보지 않고 직접 입력
|
||||
prev["market_off"] = bool(code) and perf.state != "error" and code not in names
|
||||
if code and perf.readable and not prev["not_started"] and not prev["market_off"]:
|
||||
got = week_sales(prev["week_start"])
|
||||
if got is None:
|
||||
prev["auto_error"] = True
|
||||
else:
|
||||
auto = got.get(code, 0)
|
||||
prev["auto_result"] = auto
|
||||
prev["result"] = auto if auto is not None else (None if prev["auto_error"] else prev.get("result_amount"))
|
||||
prev["market_name"] = names.get(code, code)
|
||||
if prev:
|
||||
prev["result"] = prev.get("result_amount")
|
||||
for it in meeting["items"]:
|
||||
code = it["marketplace_code"]
|
||||
it["market_name"] = names.get(code, code) if code else ""
|
||||
it["market_off"] = bool(code) and perf.state != "error" and code not in names
|
||||
it["market_unknown"] = bool(code) and perf.state == "error"
|
||||
# 이번 주 진행 중 실적(쇼핑몰 연결 줄) — 정량 목표 칸 아래에 "이번주 실적"
|
||||
it["week_auto"], it["week_error"] = None, False
|
||||
if code and week <= today and not it["market_off"]:
|
||||
|
||||
Reference in New Issue
Block a user