From e011d48cb46a880278d576771438ca1c4dfd9687 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Fri, 9 Oct 2026 19:07:46 +0900 Subject: [PATCH] =?UTF-8?q?feat(m02):=20=EC=88=98=EB=9F=89=EC=82=B0?= =?UTF-8?q?=EC=B6=9C=20=EC=8B=9C=ED=8A=B8=20=EC=9C=84=20=EC=83=81=ED=83=9C?= =?UTF-8?q?=20=C2=B7=20=EC=95=88=EB=82=B4=20=EA=B8=80=20=EC=A7=80=EC=9B=80?= =?UTF-8?q?=20=C2=B7=20[=EC=97=B0=EA=B2=B0=20=ED=92=80=EA=B8=B0]=20?= =?UTF-8?q?=EB=88=84=EB=A5=B4=EB=A9=B4=20=EB=8B=A8=EC=B6=94=20=EA=BA=BC?= =?UTF-8?q?=EC=A7=90(147-5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QND7Co43B24zK2P937rdxt --- .../M02_MasterTemplete_AreaPanel.css | 3 +-- .../M02_MasterTemplete_Labor_QtyModal.ts | 21 ++++++------------- .../M02_MasterTemplete_Labor_Text.ts | 6 ------ resources/tester/test_modal_head_actions.py | 15 +++++++++++++ 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/M02_MasterTemplete/M02_MasterTemplete_AreaPanel.css b/M02_MasterTemplete/M02_MasterTemplete_AreaPanel.css index 169333d9a..8d8a682f7 100644 --- a/M02_MasterTemplete/M02_MasterTemplete_AreaPanel.css +++ b/M02_MasterTemplete/M02_MasterTemplete_AreaPanel.css @@ -52,8 +52,7 @@ gap: var(--spacing-8); } -.m02-cellpick__now, -.m02-cellpick__hint { +.m02-cellpick__now { margin: 0 0 var(--spacing-8); color: var(--color-text-secondary); } diff --git a/M02_MasterTemplete/M02_MasterTemplete_Labor_QtyModal.ts b/M02_MasterTemplete/M02_MasterTemplete_Labor_QtyModal.ts index 9718335f6..1aaacd84f 100644 --- a/M02_MasterTemplete/M02_MasterTemplete_Labor_QtyModal.ts +++ b/M02_MasterTemplete/M02_MasterTemplete_Labor_QtyModal.ts @@ -62,10 +62,6 @@ export function openQtyModal(opt: QtyModalOptions): void { text: opt.now, attrs: { "data-labor-qty-now": "" }, }); - const state = el("small", { - className: "m02-labin__muted", - attrs: { "data-labor-qty-state": "" }, - }); const hand = el("input", { className: "ui-input m02-inputval__control", attrs: { @@ -77,7 +73,8 @@ export function openQtyModal(opt: QtyModalOptions): void { }) as HTMLInputElement; hand.readOnly = opt.readOnly; if (opt.hand !== null) hand.value = String(opt.hand); - const unlink = + // 시트 위 상태 · 안내 글 없음(147-5) — [연결 풀기] 누르면 그 단추가 꺼짐 · 칸을 고르면 다시 켜짐 + const unlink: HTMLButtonElement | null = opt.linked && !opt.readOnly ? createButton({ label: tc("Labor_Unlink"), @@ -85,7 +82,7 @@ export function openQtyModal(opt: QtyModalOptions): void { onClick: () => { pending = { kind: "unlink" }; hand.value = ""; - state.textContent = tc("Labor_UnlinkPending"); + if (unlink) unlink.disabled = true; }, }) : null; @@ -104,17 +101,14 @@ export function openQtyModal(opt: QtyModalOptions): void { onPick: (pick) => { if (opt.readOnly) return; pending = { kind: "cell", pick }; - hand.value = ""; // 칸을 고르면 손 값은 지움(칸을 따름) - state.textContent = tc("Labor_CellPending").replace("{value}", pick.칸); + hand.value = ""; // 칸을 고르면 수기 값은 지움(칸을 따름) + if (unlink) unlink.disabled = false; }, }); } else host.replaceChildren( el("p", { className: "m02-labin__muted", text: tc("Labor_PickWait") }), ); - hand.addEventListener("input", () => { - if (hand.value.trim() !== "") state.textContent = ""; - }); const ok = (): void => { const raw = hand.value.trim(); if (raw !== "") { @@ -142,10 +136,7 @@ export function openQtyModal(opt: QtyModalOptions): void { ...(unlink ? [unlink] : []), ], }), - state, - ...(opt.handOnly - ? [] - : [el("p", { className: "m02-cellpick__hint", text: tc("Labor_SheetHint") }), host]), + ...(opt.handOnly ? [] : [host]), ); // [확인] = 머리 [닫기] 왼쪽 · 아래 [닫기] 없음(147-3) · 읽기만 = 머리 [닫기]만 if (!opt.readOnly) diff --git a/M02_MasterTemplete/M02_MasterTemplete_Labor_Text.ts b/M02_MasterTemplete/M02_MasterTemplete_Labor_Text.ts index ec2e896d4..6252a143b 100644 --- a/M02_MasterTemplete/M02_MasterTemplete_Labor_Text.ts +++ b/M02_MasterTemplete/M02_MasterTemplete_Labor_Text.ts @@ -77,12 +77,6 @@ const TEXT = { Labor_BadCell: ["칸 주소가 틀림", "Invalid cell"], Labor_QtyNow: ["지금 수량", "Now"], Labor_Unlink: ["연결 풀기", "Unlink"], - Labor_UnlinkPending: ["연결 풀기 — [확인]을 누르면 풂", "Unlink on OK"], - Labor_CellPending: ["고른 칸 {value} — [확인]을 누르면 이음", "Cell {value} — link on OK"], - Labor_SheetHint: [ - "면적산출 시트 — 칸을 누르면 그 칸을 고름 · 손 입력이 있으면 손이 앞섬", - "Area sheet — click a cell to pick it · manual value wins", - ], Labor_Base: ["기준", "Base"], Labor_Applied: ["반영", "Applied"], Labor_BasePrice: ["기준 단가", "Base price"], diff --git a/resources/tester/test_modal_head_actions.py b/resources/tester/test_modal_head_actions.py index d08bbe82a..a4fef5604 100644 --- a/resources/tester/test_modal_head_actions.py +++ b/resources/tester/test_modal_head_actions.py @@ -4,6 +4,7 @@ · 147-2 연결창 단추 넷 → 머리 · 큰 창 · 글 묻는 창 [확인] 머리 · [취소] 없음 · 147-3 M02 입력 · 수량산출 · 참조 창 — 아래 단추 줄 없음 · [확인] 머리 · 읽기만이면 없음 · 147-4 「손 입력」 → 「수기 입력」 · 짧은 글 「손」 → 「수기」 · [면적산출에서 잇기] · goArea 없음 +· 147-5 수량산출 시트 위 「고른 칸 … [확인]」 · 「면적산출 시트 — …」 없음 · [연결 풀기] 누르면 꺼짐 """ from __future__ import annotations @@ -93,3 +94,17 @@ def test_147_4_수기_입력_잇기_없음(): for path in m02.glob("*.ts"): src = path.read_text(encoding="utf-8") assert "goArea" not in src and "GoArea" not in src, path.name + + +def test_147_5_시트_위_글_없음_풀기_꺼짐(): + qty = _text("M02_MasterTemplete/M02_MasterTemplete_Labor_QtyModal.ts") + text = _text("M02_MasterTemplete/M02_MasterTemplete_Labor_Text.ts") + for key in ("Labor_SheetHint", "Labor_CellPending", "Labor_UnlinkPending"): + assert key not in qty and key not in text, key + assert "data-labor-qty-state" not in qty and "m02-cellpick__hint" not in qty + assert ".m02-cellpick__hint" not in _text("M02_MasterTemplete/M02_MasterTemplete_AreaPanel.css") + # [연결 풀기] = 누르면 꺼짐 · 칸을 고르면 다시 켜짐 · 고름 상태는 [확인] 때 씀 + assert 'pending = { kind: "unlink" };' in qty + assert "if (unlink) unlink.disabled = true;" in qty + assert "if (unlink) unlink.disabled = false;" in qty + assert "...(opt.handOnly ? [] : [host])," in qty