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:
2026-10-06 15:52:05 +09:00
parent d18e801e08
commit df36a5a917
14 changed files with 37 additions and 74 deletions
+7 -5
View File
@@ -967,22 +967,23 @@ def test_meeting_perf_unknown_vs_zero():
assert h["mtd"] is None and h["prev_result"] is None and h["need_per_week"] is None
assert {"mtd", "prev_result"} <= set(h["unknown"]), h
row = coupang_row(v)
assert row["prev"]["auto_error"] is True and row["prev"]["result"] is None and row["rate"] is None
assert row["market_unknown"] is True and row["market_off"] is False
# 지난주 결과는 실적에서 자동으로 채우지 않는다(2026-10-06) — 직접 입력이 없으면 비어 있음
assert row["prev"]["result"] is None and row["rate"] is None
assert row["market_off"] is False
assert v["markets"] == []
# 매출 조회 장애(목록은 정상) — 전부 미확인
v = view(_FakePerf(sales_error=lambda a, b: True))
h = v["head"]
assert h["perf_state"] == "ok" and h["mtd"] is None and h["need_per_week"] is None
assert {"mtd", "prev_result"} <= set(h["unknown"])
assert coupang_row(v)["prev"]["auto_error"] is True and coupang_row(v)["rate"] is None
assert coupang_row(v)["prev"]["result"] is None and coupang_row(v)["rate"] is None
# 정상 조회 0 건 — 진짜 0원(미확인 아님), 필요 매출 = 목표 ÷ 남은 주
v = view(_FakePerf())
h = v["head"]
assert h["mtd"] == 0 and h["prev_result"] == 0 and h["unknown"] == [], h
assert h["need_per_week"] == 1000 // h["weeks_left"]
row = coupang_row(v)
assert row["prev"]["auto_result"] == 0 and row["prev"]["auto_error"] is False and row["rate"] == 0.0
assert "auto_result" not in row["prev"] and row["prev"]["result"] is None and row["rate"] is None
assert h["fresh_oldest"] == "10/01 14:20" and "쿠팡 10/01 14:20" in h["fresh_tip"]
# 부분 실패 — 월 누적(1일부터) 조회만 실패: 누적·필요 매출만 미확인, 전주 결과·줄 결과는 정상
prev_start = w - timedelta(days=7)
@@ -991,7 +992,8 @@ def test_meeting_perf_unknown_vs_zero():
h = v["head"]
assert "mtd" in h["unknown"] and "prev_result" not in h["unknown"], h
assert h["mtd"] is None and h["need_per_week"] is None and h["prev_result"] == 70
assert coupang_row(v)["prev"]["auto_result"] == 70 and coupang_row(v)["rate"] == 70.0
# 쇼핑몰 지난주 매출(70)이 있어도 줄 결과·달성률은 자동으로 채우지 않는다
assert coupang_row(v)["prev"]["result"] is None and coupang_row(v)["rate"] is None
# 매출 집계 쇼핑몰 없음 — 0 원으로 보이지 않게(empty, 미확인도 아님)
v = view(_FakePerf(markets=[{"code": "coupang", "name": "쿠팡", "enabled": True, "include_in_sales": False}]))
assert v["head"]["perf_state"] == "empty" and v["head"]["mtd"] is None and v["head"]["unknown"] == []