feat(performance): 매출 실적 표 열 너비 자동·날짜 열 고정·그룹 구분·접기 애니메이션
- 열 너비 = 내용 길이(표가 100% 로 늘지 않음, 모든 기간 같음), 날짜 열 고정 너비 → 자동 - 가로 스크롤해도 날짜 열 고정(sticky) - 그룹 열(진한 보라·묶음 선)과 하위 열(옅은 보라·위 띠) 구분, 마지막 하위 열 오른쪽 선 - 접기 단추 22px ⊟/⊞, 펼치고 접을 때 열 너비 애니메이션 - perf_manual.test.js 를 10/21 변경(앞날 입력·계산식 글자 그대로 전송)에 맞게 고침 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -75,8 +75,9 @@ function gross(td) { return td.querySelector(".v-gross").textContent.trim(); }
|
||||
"날짜,카페24,네이버,쿠팡,토스,GS샵,11번가,오늘의집,G마켓,카카오,롯데ON,일 합계", heads);
|
||||
check("[수동] 수동 입력 쇼핑몰 제목에 ✎ 표시", /✎/.test(e.d.querySelectorAll(".perf-main thead th")[3].textContent) &&
|
||||
!/✎/.test(e.d.querySelectorAll(".perf-main thead th")[1].textContent));
|
||||
check("[수동] 오늘까지 날짜 칸만 입력 칸(앞으로의 날·주간합계 아님), 수동 값 칸은 파란 표시",
|
||||
!!cell(e, "coupang", "2026-10-07") && !cell(e, "coupang", "2026-10-08") && cell(e, "coupang", "2026-10-05").classList.contains("is-manual") &&
|
||||
// 2026-10-21 — 앞으로의 날도 입력 칸(사용자 요청). 주간합계 줄은 여전히 아님
|
||||
check("[수동] 날짜 칸은 앞으로의 날도 입력 칸(주간합계 아님), 수동 값 칸은 파란 표시",
|
||||
!!cell(e, "coupang", "2026-10-07") && !!cell(e, "coupang", "2026-10-08") && cell(e, "coupang", "2026-10-05").classList.contains("is-manual") &&
|
||||
!cell(e, "coupang", "2026-10-06").classList.contains("is-manual") && !e.d.querySelector(".perf-row-week td.is-manual-cell"));
|
||||
check("[수동] 입력 칸은 주문 상세 링크가 아님", !cell(e, "coupang", "2026-10-06").classList.contains("is-link") &&
|
||||
e.d.querySelector('td.is-link[data-code="cafe24"]') !== null);
|
||||
@@ -94,7 +95,8 @@ function gross(td) { return td.querySelector(".v-gross").textContent.trim(); }
|
||||
key(e, in5, "Enter");
|
||||
await settle();
|
||||
const put = e.calls.find(function (c) { return c.method === "PUT"; });
|
||||
check("[입력] Enter → 그 칸 저장(쉼표·원 빼고 숫자)", put && put.url === "/performance/api/manual-sales/coupang/2026-10-05" && put.body.amount === 90000, e.calls);
|
||||
// 2026-10-21 — 칸 입력은 글자 그대로(쉼표·원만 뺀) 보낸다: 계산식(1000+2000)도 서버가 계산(formula.parse_amount)
|
||||
check("[입력] Enter → 그 칸 저장(쉼표·원 빼고 보냄)", put && put.url === "/performance/api/manual-sales/coupang/2026-10-05" && put.body.amount === "90000", e.calls);
|
||||
check("[입력] 저장한 값 표시 + 아래 칸(10/6)으로 입력칸 이동", gross(td5) === "90,000" && !td5.querySelector(".perf-manual-input") &&
|
||||
!!cell(e, "coupang", "2026-10-06").querySelector(".perf-manual-input"));
|
||||
const in6 = cell(e, "coupang", "2026-10-06").querySelector(".perf-manual-input");
|
||||
@@ -168,7 +170,7 @@ function gross(td) { return td.querySelector(".v-gross").textContent.trim(); }
|
||||
const up = cell(e, "coupang_rocket", "2026-10-01"), man = cell(e, "google", "2026-10-02");
|
||||
check("[광고비] 업로드 값 = 주황(is-upload), 직접 입력 = 파랑(is-manual)", up.classList.contains("is-upload") &&
|
||||
!up.classList.contains("is-manual") && man.classList.contains("is-manual") && gross(up) === "220,000");
|
||||
check("[광고비] 앞으로의 날은 입력 칸 아님", !cell(e, "google", "2026-10-08") && !!cell(e, "google", "2026-10-07"));
|
||||
check("[광고비] 앞으로의 날도 입력 칸(2026-10-21)", !!cell(e, "google", "2026-10-08") && !!cell(e, "google", "2026-10-07"));
|
||||
const kpi = Array.from(e.d.querySelectorAll(".perf-kpi-value")).map(function (n) { return n.textContent.trim(); });
|
||||
// 렌더 데이터(render_performance.py)에 구글 광고 API 값 10/04 123,457 이 더해졌다(2026-10-15 구글 광고 API 연동)
|
||||
check("[광고비] KPI — 이번달 광고비 722,457(네이버 300,000·구글 API 123,457 포함) · 매출 대비 비율", kpi[0] === "₩722,457" && /%$/.test(kpi[1]), kpi);
|
||||
@@ -196,7 +198,7 @@ function gross(td) { return td.querySelector(".v-gross").textContent.trim(); }
|
||||
await settle();
|
||||
const put = e.calls.find(function (c) { return c.method === "PUT"; });
|
||||
check("[광고비] 저장 → /api/ad-spend/meta/2026-10-03 (33000)", put && put.url === "/performance/api/ad-spend/meta/2026-10-03" &&
|
||||
put.body.amount === 33000, e.calls);
|
||||
put.body.amount === "33000", e.calls);
|
||||
check("[광고비] 저장 후 파란 표시", gross(td) === "33,000" && td.classList.contains("is-manual"));
|
||||
// 파일 업로드 창
|
||||
e.d.getElementById("perf-ad-upload").click();
|
||||
|
||||
Reference in New Issue
Block a user