feat(B09): 자재가 없을 때 빈 표 셋 대신 한 줄 안내 + 검증 함정 기록

화면 전수(다섯 탭)에서 드러난 것

- 자재가 아예 없는 프로젝트에서 **빈 표 셋이 「(0) — 0」 으로 늘어서** 있었음.
  「이 프로젝트에는 자재 줄이 없습니다」 한 줄로 바꿈
- 계획서 「검증 함정 모음」에 셋 적음
  · 세션은 DB 라 재시작으로 안 지워지되 **튕기면 브라우저 쿠키를 의심할 것**
  · 화면이 막혀도 **엔진은 파이썬에서 직접 부를 수 있음** — 단
    `await init_db_pool()` 을 먼저 부를 것(안 부르면 **빈 응답이 「자료 없음」으로
    잘못 읽힘**), 한 이벤트 루프 안에서 끝낼 것
  · 되받기 전후로 **인계 응답을 파일로 떠 둘 것** — 「합계가 221원 줄었다」를
    짚으려면 어느 줄이 얼마나 바뀌었는지 대조할 자료가 있어야 함

화면 전수 결과 (프로젝트 b269ea34, 포트 5174)
  ⑤ 원가계산서 26줄 · [재계산] 동작
  ④ 예산내역서 16줄 · 금액줄 1 (측구터파기 92.45 × 5,288.6 = 488,926)
     비고에 「단산 1 참조」 · 안내 5 · 미확보 16 (두 갈래로 갈려 뜸)
  일위대가 203줄 · 안내 3
  ③ 단가산출서 1장 · 본표와 참조 코드
  자재대 — 이 프로젝트는 자재 0건이라 한 줄 안내(다른 프로젝트에선 미정 4건 확인)
  ⚠ 바꾼 화면 상태는 원래 탭으로 되돌려 놓음

검증: pytest 211 통과, tsc 0건

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-08 06:11:22 +09:00
co-authored by Claude Opus 5
parent 736a5e7538
commit e714a80301
2 changed files with 14 additions and 0 deletions
+10
View File
@@ -1019,6 +1019,16 @@ export async function renderB09Estimation(root: HTMLElement): Promise<void> {
return; return;
} }
// 자재가 아예 없으면 **빈 표 셋을 늘어놓지 않는다** — 「없다」 한 줄이면 된다
// (2026-09-08 화면 전수에서 세 무리가 모두 「(0) — 0」 으로 뜨고 있었다).
if (sheet.contractor.length === 0 && sheet.owner.length === 0 && sheet.unknown.length === 0) {
const none = document.createElement("div");
none.className = "b09-empty";
none.textContent = L("B09_Estimation_Mat_None");
body.append(none);
return;
}
for (const [labelKey, rows, total] of [ for (const [labelKey, rows, total] of [
["B09_Estimation_Mat_Contractor", sheet.contractor, sheet.contractor_total_krw], ["B09_Estimation_Mat_Contractor", sheet.contractor, sheet.contractor_total_krw],
["B09_Estimation_Mat_Owner", sheet.owner, sheet.owner_total_krw], ["B09_Estimation_Mat_Owner", sheet.owner, sheet.owner_total_krw],
+4
View File
@@ -696,6 +696,10 @@ export const ui_locales_b2 = {
"관급·사급이 안 갈린 것 — 어느 합계에도 안 넣습니다", "관급·사급이 안 갈린 것 — 어느 합계에도 안 넣습니다",
"Supply type undecided — excluded from both totals", "Supply type undecided — excluded from both totals",
], ],
B09_Estimation_Mat_None: [
"이 프로젝트에는 자재 줄이 없습니다 — 구조물이 없거나 자재가 안 나온 상태입니다.",
"This project has no material rows yet.",
],
B09_Estimation_Mat_Empty: [ B09_Estimation_Mat_Empty: [
"설계내역서를 먼저 불러오면 자재대가 섭니다.", "설계내역서를 먼저 불러오면 자재대가 섭니다.",
"Load the bill first and the material sheet appears.", "Load the bill first and the material sheet appears.",