Merge remote-tracking branch 'origin/sub_laptop_4' into sub_laptop_2

This commit is contained in:
2026-10-09 19:14:56 +09:00
4 changed files with 22 additions and 23 deletions
@@ -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);
}
@@ -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)
@@ -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"],
@@ -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