refactor(B08,B09): 폴더째 old_code 로 옮기고 빈 화면 둘만 남김 (PLAN 7-3)

B08_Quantity 86 · B09_Estimation 111 파일을 old_code/ 로 옮김(지우지 않음).
화면은 메뉴·주소·단계 막대만 남은 빈 틀 둘 — main.py 라우터 13 개는 끊음.
B07 이 빌려 쓰던 비탈 길이·면적은 필요한 함수만 B07_DesignDetail_Engine_SlopeGeometry
로 옮겨 적음(면적 적분·노면 면적·측점 묶음은 안 옮김) · 시험 하나를 새로 둠.
B07 구조물도 조립(Cad_StandardSheet)은 2026-09-13 에 이미 도면 목록에서 빠져
부르는 곳이 없어 old_code 로 같이 보냄 — 구조물 그림은 되살리지 않음.
B06 구조물 몫 조회는 빈 값으로 두어 화면이 그대로 서게 함.
B08·B09 를 부르던 시험 25 개도 old_code/resources/tester 로 옮김.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PAdA5ThqmtVSsbzjusk1cJ
This commit is contained in:
2026-09-22 12:27:45 +09:00
co-authored by Claude Opus 5
parent 185f800d23
commit 8472fc9f40
231 changed files with 1617 additions and 1216 deletions
@@ -0,0 +1,66 @@
/* =============================================================================
* B09_Estimation_UI_Table.ts
* 옛 B09 화면에서 옮겨 온 **설명 표** 공용 — 머리글 한 줄 · 제목 · 안내 글 · 근거 호버 (PLAN 12장)
*
* - 옛 `B09_Estimation_UI_BaseData.ts` 의 `head`·`note`·`table` 을 그대로 옮김(옛 파일을 지우려고).
* - 칸마다 근거 호버(`keys`·`sheet`) — 사전은 **개발환경에서만** 오고, 없으면 아무 일도 안 함.
* - 숫자 칸은 오른쪽, `leftCols` 칸은 왼쪽(옛 `.b09-left` 와 같음).
* ========================================================================== */
import {
attachProvenance,
markProvenanceCell,
type ProvenanceSheet,
} from "@ui/ui_template_provenance";
import { el } from "./B09_Estimation_UI_Sheet";
/** 금액 글 → 천 단위 쉼표(옛 `money` 그대로 — 소수부를 자르지 않음). */
export function money(value: string | null | undefined): string {
if (value === null || value === undefined || value === "") return "";
const parsed = Number(value);
return Number.isFinite(parsed) ? parsed.toLocaleString("ko-KR") : value;
}
/** 구역 제목. */
export function head(text: string): HTMLElement {
return el("div", "b09s-hint b09s-head", text);
}
/** 안내 한 줄. */
export function note(text: string): HTMLElement {
return el("div", "b09s-hint", text);
}
/** 설명 표 한 장 — 가로로 넘치면 제 칸 안에서만 밀림. */
export function infoTable(
headers: string[],
rows: string[][],
leftCols: number[],
keys?: string[],
sheet?: ProvenanceSheet,
): HTMLElement {
const wrap = el("div", "b09s-wrap");
const table = el("table", "b09s-table b09s-info");
const thead = el("thead");
const headRow = el("tr");
headers.forEach((text, index) => {
headRow.append(el("th", leftCols.includes(index) ? "b09s-left" : "", text));
});
thead.append(headRow);
const tbody = el("tbody");
for (const cells of rows) {
const tr = el("tr");
cells.forEach((text, index) => {
const td = el("td", leftCols.includes(index) ? "b09s-left" : "", text);
const key = keys?.[index];
const column = key ? sheet?.columns[key] : undefined;
if (key && column) markProvenanceCell(td, key, column.tier);
tr.append(td);
});
tbody.append(tr);
}
table.append(thead, tbody);
attachProvenance(table, sheet);
wrap.append(table);
return wrap;
}