From e714a803015cf0454615082ad1b5a810996b8dd5 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Tue, 8 Sep 2026 06:11:22 +0900 Subject: [PATCH] =?UTF-8?q?feat(B09):=20=EC=9E=90=EC=9E=AC=EA=B0=80=20?= =?UTF-8?q?=EC=97=86=EC=9D=84=20=EB=95=8C=20=EB=B9=88=20=ED=91=9C=20?= =?UTF-8?q?=EC=85=8B=20=EB=8C=80=EC=8B=A0=20=ED=95=9C=20=EC=A4=84=20?= =?UTF-8?q?=EC=95=88=EB=82=B4=20+=20=EA=B2=80=EC=A6=9D=20=ED=95=A8?= =?UTF-8?q?=EC=A0=95=20=EA=B8=B0=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 화면 전수(다섯 탭)에서 드러난 것 - 자재가 아예 없는 프로젝트에서 **빈 표 셋이 「(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) --- B09_Estimation/B09_Estimation_UI_Page.ts | 10 ++++++++++ ui_template/ui_template_locale_b2.ts | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/B09_Estimation/B09_Estimation_UI_Page.ts b/B09_Estimation/B09_Estimation_UI_Page.ts index 7afc0166..ff6538f6 100644 --- a/B09_Estimation/B09_Estimation_UI_Page.ts +++ b/B09_Estimation/B09_Estimation_UI_Page.ts @@ -1019,6 +1019,16 @@ export async function renderB09Estimation(root: HTMLElement): Promise { 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 [ ["B09_Estimation_Mat_Contractor", sheet.contractor, sheet.contractor_total_krw], ["B09_Estimation_Mat_Owner", sheet.owner, sheet.owner_total_krw], diff --git a/ui_template/ui_template_locale_b2.ts b/ui_template/ui_template_locale_b2.ts index b25bbbb4..738e388e 100644 --- a/ui_template/ui_template_locale_b2.ts +++ b/ui_template/ui_template_locale_b2.ts @@ -696,6 +696,10 @@ export const ui_locales_b2 = { "관급·사급이 안 갈린 것 — 어느 합계에도 안 넣습니다", "Supply type undecided — excluded from both totals", ], + B09_Estimation_Mat_None: [ + "이 프로젝트에는 자재 줄이 없습니다 — 구조물이 없거나 자재가 안 나온 상태입니다.", + "This project has no material rows yet.", + ], B09_Estimation_Mat_Empty: [ "설계내역서를 먼저 불러오면 자재대가 섭니다.", "Load the bill first and the material sheet appears.",