From 9ef6298b220a56de460467e3218350a4ea83b214 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Fri, 9 Oct 2026 22:46:17 +0900 Subject: [PATCH] =?UTF-8?q?feat(b08):=20=EB=A9=94=EC=9D=B8=20=ED=83=AD=20?= =?UTF-8?q?=3D=20=EA=B5=AC=EC=A1=B0=EB=AC=BC=20=EC=A7=91=EA=B3=84=ED=91=9C?= =?UTF-8?q?=20=C2=B7=20=EC=9E=90=EC=9E=AC=20=C2=B7=20=ED=86=A0=EA=B3=B5=20?= =?UTF-8?q?=C2=B7=20=EC=88=98=EB=A6=AC=20=C2=B7=20=EC=9E=90=EC=9E=AC=20?= =?UTF-8?q?=ED=83=AD=20=EC=95=88=20=EC=B4=9D=EA=B4=84=20=C2=B7=20=EC=BD=98?= =?UTF-8?q?=ED=81=AC=EB=A6=AC=ED=8A=B8=EC=86=8C=EC=9A=94=20=C2=B7=20?= =?UTF-8?q?=EC=9E=90=EC=9E=AC=EC=88=98=EB=9F=89=20=C2=B7=20=EC=A2=8C?= =?UTF-8?q?=EC=B8=A1=20=EC=B9=B4=EB=93=9C=20=EB=91=98=EB=A1=9C(160-1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01STqEqztUthVFBmEP18wBSz --- B08_Quantity/B08_Quantity_UI_Options.ts | 10 +++++---- B08_Quantity/B08_Quantity_UI_Page.ts | 26 ++++++++++++------------ resources/tester/test_122_b08_options.py | 17 ++++++++++++++-- ui_template/ui_template_locale_b4.ts | 3 ++- 4 files changed, 36 insertions(+), 20 deletions(-) diff --git a/B08_Quantity/B08_Quantity_UI_Options.ts b/B08_Quantity/B08_Quantity_UI_Options.ts index 599fe4035..a6f645812 100644 --- a/B08_Quantity/B08_Quantity_UI_Options.ts +++ b/B08_Quantity/B08_Quantity_UI_Options.ts @@ -1,9 +1,10 @@ /* ============================================================================= * B08_Quantity_UI_Options.ts - * 좌측 패널(PLAN 122) — 메인 탭과 같은 컨테이너 셋(구조물 · 토공 · 수리집수면적표 · 접이) + [저장] 줄. + * 좌측 패널(PLAN 122 · 160-1) — 메인 탭과 같은 컨테이너 넷(구조물 집계표 · 자재 · 토공 · 수리집수면적표 · 접이) + * + [저장] 줄. * - * 구조물 › 배관 1본 길이(m) — 정본 = 프로젝트 층 M02 구조물집계표 변수 `파형강관_1본_m` - * 구조물 › 할증 모래 · 자갈 · 시멘트 %(PLAN 124) — 총괄자재수량집계표 그 세 줄 · 0~100 + * 구조물 집계표 › 배관 1본 길이(m) — 정본 = 프로젝트 층 M02 구조물집계표 변수 `파형강관_1본_m` + * 자재 › 할증 모래 · 자갈 · 시멘트 %(PLAN 124) — 총괄자재수량집계표 그 세 줄 · 0~100 * 토공 › 연암 % · 경암 %(암 전체 기준 · 한쪽 고치면 다른 쪽 = 100 − 값 · 0~100) * 수리집수면적표 — 빈 자리(다음 옵션) * 조작 = 캐시 `b08-options` 즉시 + 열린 표가 같은 식으로 바로 다시 셈(`…_Options_Calc`) · @@ -232,7 +233,8 @@ export function createOptionsPanel(projectId: string | null, onSaved: () => void const panel = document.createElement("div"); panel.className = "ui-sidebar-panel b08-options"; panel.append( - card("structure", "B08_Quantity_Tab_Structure", one.root, ...surchargeBlock), + card("summary", "B08_Quantity_Tab_StructureSummary", one.root), + card("material", "B08_Quantity_Tab_Materials", ...surchargeBlock), card("earthwork", "B08_Quantity_Tab_Earthwork", rockRow, hint("암 전체 기준 · 두 칸 합 100")), card("hydrology", "B08_Quantity_Tab_Hydrology", hint("다음 옵션 자리")), actions, diff --git a/B08_Quantity/B08_Quantity_UI_Page.ts b/B08_Quantity/B08_Quantity_UI_Page.ts index 779595939..ab156c57c 100644 --- a/B08_Quantity/B08_Quantity_UI_Page.ts +++ b/B08_Quantity/B08_Quantity_UI_Page.ts @@ -2,9 +2,9 @@ * B08_Quantity_UI_Page.ts * 로그인 후 08: 5차 워크플로우 (수량 산출) — 위 탭 화면 (PLAN 61) * - * 탭 = 구조물 · 토공 · 수리집수면적표 (PLAN 95-1). 위 탭 단추 = 공용 기본 크기(md) · 보조 탭 단추 = sm(PLAN 69-1). - * 구조물 아래 보조 탭 = 구조물 집계표(61-1) · 총괄자재수량집계표 · 콘크리트소요자재집계표 · - * 자재수량집계표(셋 = 121-1 `B08_Quantity_UI_Material`) — 구조물도는 집계표 행을 눌러 여는 모달(95-3). + * 탭 = 구조물 집계표(61-1) · 자재 · 토공 · 수리집수면적표 (PLAN 95-1 · 160-1). 위 탭 단추 = 공용 + * 기본 크기(md) · 보조 탭 단추 = sm(PLAN 69-1). 구조물도는 집계표 행을 눌러 여는 모달(95-3). + * 자재 아래 보조 탭 = 총괄자재수량집계표 · 콘크리트소요자재집계표 · 자재수량집계표(121-1 `…_UI_Material`). * 옛 수량 산출 코드(`old_code/B08_Quantity/`)는 가져오지 않음 — 새로 씀. * 좌측 패널 = 메인 탭과 같은 컨테이너 셋 + [저장] 줄(`B08_Quantity_UI_Options` · PLAN 122). * ========================================================================== */ @@ -28,16 +28,16 @@ function L(key: keyof typeof ui_locales): string { } const TABS = [ - { id: "structure", label: "B08_Quantity_Tab_Structure" }, + { id: "summary", label: "B08_Quantity_Tab_StructureSummary" }, + { id: "material", label: "B08_Quantity_Tab_Materials" }, { id: "earthwork", label: "B08_Quantity_Tab_Earthwork" }, { id: "hydrology", label: "B08_Quantity_Tab_Hydrology" }, ] as const; type TabId = (typeof TABS)[number]["id"]; -/** 구조물 탭 보조 탭 — 실무 엑셀 차례. */ +/** 자재 탭 보조 탭 — 실무 엑셀 차례. */ const SHEETS = [ - { id: "summary", label: "B08_Quantity_Tab_StructureSummary" }, { id: "material", label: "B08_Quantity_Tab_MaterialTotal" }, { id: "concrete", label: "B08_Quantity_Tab_ConcreteMaterial" }, { id: "quantity", label: "B08_Quantity_Tab_MaterialQuantity" }, @@ -52,8 +52,8 @@ function pendingNote(): HTMLElement { return pending; } -/** 구조물 탭 — 보조 탭 줄 + 몸통(보조 탭마다 새 몸통 · 늦은 응답이 다른 보조 탭을 덮지 않게). */ -function renderStructure(host: HTMLElement, projectId: string | null): void { +/** 자재 탭 — 보조 탭 줄 + 몸통(보조 탭마다 새 몸통 · 늦은 응답이 다른 보조 탭을 덮지 않게). */ +function renderMaterials(host: HTMLElement, projectId: string | null): void { const tabs = document.createElement("div"); tabs.className = "b08-quantity__tabs b08-structure__tabs"; tabs.setAttribute("role", "tablist"); @@ -76,18 +76,18 @@ function renderStructure(host: HTMLElement, projectId: string | null): void { const body = document.createElement("div"); view.replaceChildren(body); if (!projectId) body.append(pendingNote()); - else if (picked === "summary") void renderStructureSummary(body, projectId); else void renderMaterialSheet(body, projectId, picked); }; host.replaceChildren(tabs, view); - select("summary"); + select("material"); } /** 탭마다 새 몸통 — 늦게 온 응답이 다른 탭 화면을 덮지 않게(떨어진 몸통에만 그림). */ function renderTab(host: HTMLElement, tab: TabId, projectId: string | null): void { const view = document.createElement("div"); host.replaceChildren(view); - if (tab === "structure") return renderStructure(view, projectId); + if (tab === "material") return renderMaterials(view, projectId); + if (tab === "summary" && projectId) return void renderStructureSummary(view, projectId); if (tab === "hydrology" && projectId) return void renderHydro(view, projectId); if (tab === "earthwork" && projectId) return void renderEarthwork(view, projectId); view.append(pendingNote()); @@ -103,7 +103,7 @@ export function renderB08Quantity(root: HTMLElement): void { panel.className = "b08-quantity__panel"; panel.setAttribute("role", "tabpanel"); - let current: TabId = "structure"; + let current: TabId = "summary"; const select = (tab: TabId): void => { current = tab; tabBar.replaceChildren( @@ -125,7 +125,7 @@ export function renderB08Quantity(root: HTMLElement): void { const body = document.createElement("div"); body.className = "b08-quantity"; body.append(tabBar, panel); - select("structure"); + select("summary"); const layout = createWorkflowLayout({ title: L("B08_Quantity_Title"), diff --git a/resources/tester/test_122_b08_options.py b/resources/tester/test_122_b08_options.py index ddb457020..fa255f5d9 100644 --- a/resources/tester/test_122_b08_options.py +++ b/resources/tester/test_122_b08_options.py @@ -139,8 +139,21 @@ def test_좌측_패널_컨테이너_셋과_저장_줄(): page = (ROOT / "B08_Quantity/B08_Quantity_UI_Page.ts").read_text(encoding="utf-8") panel = (ROOT / "B08_Quantity/B08_Quantity_UI_Options.ts").read_text(encoding="utf-8") assert "leftPanel: createOptionsPanel(projectId, () => select(current))" in page - for tab in ("structure", "earthwork", "hydrology"): - assert f'card("{tab}", "B08_Quantity_Tab_' in panel, tab + # 160-1 — 메인 탭 차례 = 구조물 집계표 · 자재 · 토공 · 수리 · 카드도 같은 차례(1본 → 집계표 · 할증 → 자재) + tabs = ("summary", "material", "earthwork", "hydrology") + ids = re.findall(r'\{ id: "(\w+)", label: "B08_Quantity_Tab_', page) + assert ids == [ + *tabs, + "material", + "concrete", + "quantity", + ] # 자재 탭 안 = 총괄 · 콘크리트소요 · 자재수량 + assert 'select("material");' in page and 'select("summary");' in page + assert [panel.index(f'card("{tab}", "B08_Quantity_Tab_') for tab in tabs] == sorted( + panel.index(f'card("{tab}", "B08_Quantity_Tab_') for tab in tabs + ) + assert 'card("summary", "B08_Quantity_Tab_StructureSummary", one.root),' in panel + assert 'card("material", "B08_Quantity_Tab_Materials", ...surchargeBlock),' in panel assert "ui-collapsible ui-sidebar-section ui-sidebar-card" in panel assert ( 'actions.className = "ui-sidebar-actions"' in panel and "attachCollapsible(panel)" in panel diff --git a/ui_template/ui_template_locale_b4.ts b/ui_template/ui_template_locale_b4.ts index 2d52a5331..970bc5ae4 100644 --- a/ui_template/ui_template_locale_b4.ts +++ b/ui_template/ui_template_locale_b4.ts @@ -19,7 +19,7 @@ export const ui_locales_b4 = { ], B08_Quantity_Tab_Hydrology: ["수리집수면적표", "Hydraulic Catchment Table"], B08_Quantity_Tab_Pending: ["차례대로 만들 탭입니다.", "This tab comes later, in order."], - B08_Quantity_Tab_Structure: ["구조물", "Structure"], + B08_Quantity_Tab_Materials: ["자재", "Materials"], B08_Quantity_Tab_MaterialTotal: ["총괄자재수량집계표", "Total Material Quantity Table"], B08_Quantity_Tab_ConcreteMaterial: [ "콘크리트소요자재집계표", @@ -59,6 +59,7 @@ export const ui_locales_b4 = { ], B08_Quantity_Summary_Total: ["계", "Total"], B08_Quantity_Summary_Unlinked: ["미연결", "Unlinked"], + B08_Quantity_Summary_Unassigned: ["미지정", "Unassigned"], B08_Quantity_Link_Title: ["조합 연결", "Link combinations"], B08_Quantity_Link_Body: ["본체", "Body"], B08_Quantity_Link_Linked: ["연결됨", "Linked"],