feat(project): remove per-row this-week sales in weekly meetings
Drop the "이번주 실적" line under each row's target and the now-unused shop link menu. Performance sales stay only in the header cards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -329,7 +329,7 @@ const server = http.createServer(function (req, res) {
|
||||
border: parseFloat(cs.borderTopWidth) + parseFloat(cs.borderBottomWidth),
|
||||
topDifference: (short.getBoundingClientRect().top - long.getBoundingClientRect().top) / zoom,
|
||||
oneLine: document.querySelector('tr[data-item="4"]').getBoundingClientRect().height / zoom,
|
||||
emptySlot: document.querySelector('tr[data-item="4"] .pj-meet-week-slot').getBoundingClientRect().height,
|
||||
noSlot: !document.querySelector(".pj-meet-week-slot"),
|
||||
cellsAtTop: Array.from(row.querySelectorAll("td")).every(c => getComputedStyle(c).verticalAlign === "top"),
|
||||
namesCentered: Array.from(document.querySelectorAll(".pj-meet-sec th")).every(th => {
|
||||
const box = th.getBoundingClientRect(), line = th.querySelector(".pj-meet-label-line");
|
||||
@@ -352,7 +352,7 @@ const server = http.createServer(function (req, res) {
|
||||
assert(Math.abs(m.row - m.long - m.border) <= 1, JSON.stringify(m));
|
||||
assert(Math.abs(m.topDifference) <= 1 && m.cellsAtTop && !m.clipped, JSON.stringify(m));
|
||||
assert(m.namesCentered, "meeting section and item names must stay vertically centered");
|
||||
assert(m.oneLine <= m.line + m.top + m.bottom + m.border + 1 && m.emptySlot === 0, JSON.stringify(m));
|
||||
assert(m.oneLine <= m.line + m.top + m.bottom + m.border + 1 && m.noSlot, JSON.stringify(m));
|
||||
assert.deepEqual(m.labels, [], "shop link badges (자동입력·실적 미사용) were removed 2026-10-06");
|
||||
}
|
||||
const initial = await meetingMetrics();
|
||||
|
||||
@@ -487,32 +487,16 @@ function meetServer(env, st) {
|
||||
check("[3d] 저장 실패 → 병합 요청 안 보냄, 글 유지", !st.merged && ta.value === "draft before merge");
|
||||
});
|
||||
|
||||
// ════════════════════ [7] 정량 목표 저장 → 이번주 실적 % 즉시 갱신, 다시 그리기와 엇갈려도 ════════════════════
|
||||
// ════════════════════ [7] 줄별 이번주 실적 표시 폐지(2026-10-06) — 정량 목표 저장만, 실적 글자 없음 ════════════════════
|
||||
await section(async function () {
|
||||
const env = makeEnv(PAGE.meeting_admin, MEET_URL, { session: { "pj_meet_sync:2026-09-28": JSON.stringify({ at: Date.now(), state: "ok" }) } });
|
||||
const st = meetServer(env);
|
||||
meetServer(env);
|
||||
await boot(env);
|
||||
const slot = function () { return env.d.querySelector('tr[data-item="1"] .pj-meet-week-slot').textContent.trim(); };
|
||||
check("[7] 처음 = 실적 100 · 목표 100 → 100%", /100%/.test(slot()), slot());
|
||||
const tin = env.d.querySelector('tr[data-item="1"] input[data-field="target_amount"]');
|
||||
const row = env.d.querySelector('tr[data-item="1"]');
|
||||
check("[7] 이번주 실적 표시 없음", !row.querySelector(".pj-meet-week-slot") && !/이번주 실적/.test(row.textContent), row.textContent);
|
||||
const tin = row.querySelector('input[data-field="target_amount"]');
|
||||
tin.focus(); tin.value = "200"; tin.blur(); await settle(); await wait(10); await settle();
|
||||
check("[7] 목표 200 저장 → 50%", /· 50%$/.test(slot()), slot());
|
||||
tin.focus(); tin.value = "0"; tin.blur(); await settle(); await wait(10); await settle();
|
||||
check("[7] 목표 0 → % 없음", slot() === "이번주 실적 100", slot());
|
||||
tin.focus(); tin.value = ""; tin.blur(); await settle(); await wait(10); await settle();
|
||||
check("[7] 목표 삭제 → % 없음", slot() === "이번주 실적 100", slot());
|
||||
// 다시 그리기(옛 화면: 목표 100·100%)가 목표 저장 뒤에 도착해도 옛 비율이 들어오지 않는다
|
||||
const gate = deferred();
|
||||
st.getHook = async function () { await gate.promise; };
|
||||
const p = env.w.eval("null"); void p;
|
||||
tin.focus(); tin.value = "400"; tin.blur(); await settle(); await wait(10); await settle();
|
||||
check("[7] 목표 400 → 25%", /· 25%$/.test(slot()), slot());
|
||||
gate.resolve(); await settle(); await wait(10); await settle();
|
||||
check("[7] 늦게 온 옛 화면(100%)이 덮지 않음 — 지금 목표 기준 25%", /· 25%$/.test(slot()), slot());
|
||||
// 저장 실패 — 확정 목표(400)는 그대로라 25% 유지, 입력값은 남김
|
||||
st.itemHook = function () { return { status: 503, body: { detail: "x" } }; };
|
||||
tin.focus(); tin.value = "800"; tin.blur(); await settle(); await wait(10); await settle();
|
||||
check("[7] 저장 실패 → 비율은 확정값(25%), 입력 800 유지", /· 25%$/.test(slot()) && tin.value === "800", [slot(), tin.value]);
|
||||
check("[7] 목표 200 저장 → 확정값 반영", row.dataset.targetAmount === "200" && tin.value === "200", [row.dataset.targetAmount, tin.value]);
|
||||
});
|
||||
await section(async function () { // 실적 조회 실패 화면 — 미확인(0원·0% 아님)
|
||||
const env = makeEnv(PAGE.meeting_err, MEET_URL, { session: { "pj_meet_sync:2026-09-28": JSON.stringify({ at: Date.now(), state: "ok" }) } });
|
||||
@@ -524,8 +508,8 @@ function meetServer(env, st) {
|
||||
check("[6] 주당 필요 = 미확인(목표로 계산하지 않음)", /미확인/.test(kpi.find(function (t) { return /주당 필요/.test(t); })));
|
||||
check("[6] 전주 결과·금주 실적 = 미확인", /미확인/.test(kpi.find(function (t) { return /전주 결과/.test(t); })) && /미확인/.test(kpi.find(function (t) { return /금주 현재 실적/.test(t); })));
|
||||
const row = env.d.querySelector('tr[data-item="1"]');
|
||||
check("[6] 쇼핑몰 연결 줄 결과 = 미확인, 직접 입력 칸으로 바뀌지 않음", /미확인/.test(row.querySelector(".pj-meet-c-result").textContent) && !row.querySelector(".pj-meet-c-result input"));
|
||||
check("[6] 이번주 실적 미확인 · 달성률 비움", /미확인/.test(row.querySelector(".pj-meet-week-slot").textContent) && row.querySelector("[data-rate]").textContent.trim() === "");
|
||||
check("[6] 쇼핑몰 줄도 결과 = 직접 입력 칸(자동 결과 폐지)", !!row.querySelector(".pj-meet-c-result input") && !/미확인/.test(row.querySelector(".pj-meet-c-result").textContent));
|
||||
check("[6] 줄별 이번주 실적 표시 없음 · 달성률 비움", !row.querySelector(".pj-meet-week-slot") && row.querySelector("[data-rate]").textContent.trim() === "");
|
||||
check("[6] 회의록 입력은 그대로 가능", !!row.querySelector(".pj-meet-text") && !!env.d.getElementById("pj-meet-target"));
|
||||
check("[6] 조회 실패 안내 문구", /미확인/.test(env.d.querySelector(".pj-meet-perf-warn").textContent));
|
||||
});
|
||||
|
||||
@@ -46,12 +46,12 @@ const server = http.createServer(function (req, res) {
|
||||
assert.ok(rect.y >= 0 && rect.y < 300, "앵커 이동 후 소제목이 화면 위에 표시");
|
||||
await page.screenshot({ path: path.join(OUT, "help-goals.png") });
|
||||
await page.keyboard.press("/");
|
||||
await page.locator("#pjh-query").fill("쇼핑몰 연결");
|
||||
await page.locator("#pjh-query").fill("매출 갱신");
|
||||
await page.locator("#pjh-query").press("Enter");
|
||||
assert.equal(await page.evaluate(() => document.activeElement.id), "meetings-markets");
|
||||
await page.reload();
|
||||
await page.locator("#pjh-query").waitFor({ state: "visible" });
|
||||
assert.equal(await page.locator("#pjh-query").inputValue(), "쇼핑몰 연결");
|
||||
assert.equal(await page.locator("#pjh-query").inputValue(), "매출 갱신");
|
||||
assert.equal(await page.evaluate(() => document.activeElement.id), "meetings-markets");
|
||||
await page.goBack();
|
||||
assert.equal(await page.evaluate(() => document.activeElement.id), "goals-merge");
|
||||
|
||||
@@ -42,7 +42,7 @@ assert.equal(new URL(w.location.href).searchParams.get("q"), "셀 병합");
|
||||
|
||||
search("7일 전");
|
||||
assert.ok(links().some(a => a.hash === "#meetings-review"), "제목에 없는 본문 단어도 검색");
|
||||
search("쇼핑몰 연결");
|
||||
search("매출 갱신");
|
||||
assert.equal(links()[0].hash, "#meetings-markets");
|
||||
d.getElementById("pjh-search-form").dispatchEvent(new w.Event("submit", { bubbles: true, cancelable: true }));
|
||||
assert.equal(d.activeElement.id, "meetings-markets", "Enter/submit은 첫 결과 이동");
|
||||
@@ -54,7 +54,7 @@ search("로아스");
|
||||
assert.ok(links().length > 0, "한글 검색");
|
||||
search("원");
|
||||
assert.ok(links().length > 0, "한 글자 검색");
|
||||
search(" 쇼핑몰 연결 ");
|
||||
search(" 매출 갱신 ");
|
||||
assert.equal(links()[0].hash, "#meetings-markets", "연속 공백·여러 단어 검색");
|
||||
search("zz-no-help-match");
|
||||
assert.equal(links().length, 0);
|
||||
@@ -88,8 +88,8 @@ assert.equal(links()[0].hash, "#goals-merge", "조합 중 검색 안 함");
|
||||
input.dispatchEvent(new w.CompositionEvent("compositionend", { bubbles: true }));
|
||||
assert.ok(links().some(a => a.hash === "#meetings-intro"), "조합 확정 뒤 검색");
|
||||
|
||||
const restored = boot("http://localhost/project/help?q=" + encodeURIComponent("쇼핑몰 연결") + "#meetings-markets");
|
||||
assert.equal(restored.window.document.getElementById("pjh-query").value, "쇼핑몰 연결");
|
||||
const restored = boot("http://localhost/project/help?q=" + encodeURIComponent("매출 갱신") + "#meetings-markets");
|
||||
assert.equal(restored.window.document.getElementById("pjh-query").value, "매출 갱신");
|
||||
assert.equal(restored.window.document.activeElement.id, "meetings-markets", "공유 링크·새로고침 복원");
|
||||
w.history.pushState(null, "", "/project/help?q=" + encodeURIComponent("셀 병합") + "#goals-merge");
|
||||
w.dispatchEvent(new w.PopStateEvent("popstate"));
|
||||
|
||||
@@ -56,7 +56,7 @@ def goals_ctx(admin: bool) -> dict:
|
||||
|
||||
|
||||
def meeting_view(err: bool) -> dict:
|
||||
"""회의록 2026-09-28 주 — 유통 쿠팡(쇼핑몰 연결, 이번주 실적 100, 정량 목표 100), 상품1(직접 입력 결과)."""
|
||||
"""회의록 2026-09-28 주 — 유통 쿠팡(쇼핑몰 연결 — 화면엔 자동 실적 없음, 정량 목표 100), 상품1(직접 입력 결과)."""
|
||||
prev_cou = {"id": 901, "week_start": "2026-09-21", "content": "지난주 행사", "target_amount": 100, "result_amount": None,
|
||||
"status": "", "marketplace_code": "coupang", "period": "9/21~9/27", "not_started": False,
|
||||
"market_off": False, "auto_error": err, "auto_result": None if err else 80,
|
||||
|
||||
Reference in New Issue
Block a user