feat(M02): 단가산출 자재 줄 누름 = 그 로직 [옵션] 모달 · 읽기 전용은 보기만(148-1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015sDZSjFvoiDjdGpgj3muc3
This commit is contained in:
2026-10-09 19:00:20 +09:00
co-authored by Claude Opus 5.5
parent 09b3b50efc
commit bb4450d729
3 changed files with 33 additions and 10 deletions
@@ -160,3 +160,19 @@ def test_입력이_바뀌면_걸린_고름만_풂_화면_짝():
assert _release(row, {"규격": "BX"}, mats)["고름"] == {"9": WIRE} # 규격에 걸린 줄만
row = {**row, "고름": {"4": "MT007895"}}
assert "고름" not in _release(row, {}, mats) # 다 풀리면 칸째 지움
def _src(name):
with open(os.path.join(HERE, "..", "..", "M02_MasterTemplete", name), encoding="utf-8") as f:
return f.read()
def test_로직_자재_줄_누름은_그_로직_옵션_모달_사용자_줄은_그대로():
"""148-1 — 고칠 때 · 읽기만 둘 다 `open: openRow` · 바꾸기 단추 칸은 swap 있을 때만 · 사용자 줄 = openMat."""
detail = _src("M02_MasterTemplete_Labor_Detail.ts")
assert "edit ? { open: openRow, swap: swapMat, reset: resetMat } : { open: openRow }" in detail
assert "edit ? { open: openMat, remove: removeMat } : { open: openMat }" in detail
mats = _src("M02_MasterTemplete_Labor_LogicMats.ts")
assert "const tools = swap" in mats
assert 'tr.addEventListener("click", () => on.open(r))' in mats
assert '${on ? " is-open" : ""}' in mats