Merge remote-tracking branch 'origin/main_laptop_1' into main_desktop_1

This commit is contained in:
2026-09-09 23:48:26 +09:00
3 changed files with 52 additions and 3 deletions
+18 -1
View File
@@ -11,6 +11,8 @@
* ⚠ 반올림은 여기서만 한다(PLAN 8-16 표기 자리 ≠ 계산 자리). 서버가 준 값은 전정밀이다.
* ========================================================================== */
import { stationLabel } from "./B08_Quantity_UI_EarthworkGrid";
export interface MaterialRow {
name: string;
unit: string;
@@ -45,6 +47,10 @@ export interface UnitQuantityStructure {
name: string;
length_m: number;
height_m: number;
/** 구조물이 덮는 구간(m) — 표기(`NO.4 ~ NO.4+10`)는 화면 몫이다
* (`B08_Quantity_Engine_Handoff_Rows_Prep.py:182` 「표기는 만들지 않는다」). */
start_m?: number | null;
end_m?: number | null;
notes: string[];
components: {
name: string;
@@ -97,6 +103,12 @@ export interface MaterialResponse {
}[];
}
/** 구조물이 덮는 구간을 실무 표기로 — 값이 없으면 빈 문자열(지어내지 않는다). */
function stationRange(startM?: number | null, endM?: number | null): string {
if (typeof startM !== "number" || typeof endM !== "number") return "";
return startM === endM ? stationLabel(startM) : `${stationLabel(startM)} ~ ${stationLabel(endM)}`;
}
/** 거푸집·동바리 안내에 쓰는 값. */
export interface FormworkInfo {
formwork_notes?: string[];
@@ -420,7 +432,12 @@ export function renderUnitQuantityGrid(response: MaterialResponse): HTMLElement
const body = document.createElement("tbody");
for (const structure of unit.structures) {
const spec = `H=${num(structure.height_m, 1)} · L=${num(structure.length_m, 1)}m`;
// 규격 + **구간 표기** — 구간은 길이와 같은 값에서 나오므로 둘이 갈릴 수 없다
// (`length_m` 은 겹침을 지운 구간 목록의 합, 2026-09-09 확인).
const span = stationRange(structure.start_m, structure.end_m);
const spec =
`H=${num(structure.height_m, 1)} · L=${num(structure.length_m, 1)}m` +
(span ? ` · ${span}` : "");
if (!structure.components.length) {
const tr = document.createElement("tr");
tr.append(textCell(structure.name, "b08-grid__station"));