fix(b08): 할증률 「이내」 칸 — 안 고른 칸은 비우고 회색 제안값(지금 붙는 표값)만 · 기본값을 값처럼 안 채움
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BW6Jdsh18WPtYUR6THZJqn
This commit is contained in:
@@ -266,7 +266,9 @@ function surchargeCell(
|
||||
input.className = "b08-grid__select";
|
||||
input.style.width = "4.5em";
|
||||
const picked = picks[key];
|
||||
input.value = String(picked ?? row.surcharge_pct ?? cap);
|
||||
// 안 고른 칸은 **비워 두고 회색 제안값**(지금 붙는 표값)만 — 기본값을 값처럼 채우지 않음(폼 ② 규칙).
|
||||
input.value = picked === null || picked === undefined ? "" : String(picked);
|
||||
input.placeholder = String(row.surcharge_pct ?? cap);
|
||||
input.title = `표값 ${cap}% 이내(품셈 1-3-1) · 비우면 표값`;
|
||||
input.addEventListener("change", () => {
|
||||
const text = input.value.trim();
|
||||
@@ -278,7 +280,6 @@ function surchargeCell(
|
||||
}
|
||||
input.setCustomValidity("");
|
||||
picks[key] = text === "" ? null : value;
|
||||
if (text === "") input.value = String(cap);
|
||||
td.classList.add("is-changed");
|
||||
onChange();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user