diff --git a/B05_Profile/B05_Profile_Api_Structures.ts b/B05_Profile/B05_Profile_Api_Structures.ts index ad1bfb6d..e16ae580 100644 --- a/B05_Profile/B05_Profile_Api_Structures.ts +++ b/B05_Profile/B05_Profile_Api_Structures.ts @@ -129,18 +129,28 @@ async function requestJson(path: string, init: RequestInit = {}): Promise /** 타입 레지스트리는 서버 배포 중에 바뀌지 않으므로 탭 수명 동안 한 번만 받는다. */ let typesCache: Promise | null = null; -export function fetchStructureTypes(): Promise { +/** + * 구조물 타입 목록. + * + * `includeDisabled` 를 주면 `enabled:false` 타입(B군 종단배수·F군 생태/녹화·G군 일부)도 + * 함께 준다. 레지스트리 주석(2026-08-17)이 「B05 선택지에서 빼고 **B06 개별 횡단도 + * 옵션으로 재사용**」이라 적어 둔 그 자리다 — 2026-09-07 사용자 지시 「A군뿐 아니라 + * 구조물 전체를 넣을 수 있어야 함」으로 B06 이 그 목록을 쓴다. B05 는 종전대로 켜진 것만. + */ +export function fetchStructureTypes(includeDisabled = false): Promise { if (!typesCache) { typesCache = requestJson("/projects/structure-types", { method: "GET", }) - .then((payload) => payload.types.filter((type) => type.enabled)) + .then((payload) => payload.types) .catch((error) => { typesCache = null; // 실패한 약속을 남겨 두면 다시 시도할 수 없다. throw error; }); } - return typesCache; + return typesCache.then((types) => + includeDisabled ? types : types.filter((type) => type.enabled), + ); } export async function fetchStructures(projectId: string): Promise { diff --git a/B06_Section/B06_Section_UI_Cross_Culvert_Geom.ts b/B06_Section/B06_Section_UI_Cross_Culvert_Geom.ts index 124858b3..6c484416 100644 --- a/B06_Section/B06_Section_UI_Cross_Culvert_Geom.ts +++ b/B06_Section/B06_Section_UI_Cross_Culvert_Geom.ts @@ -653,6 +653,10 @@ export function computeCulvertLayout( result.segments .filter((segment) => segment.kind !== "cut") .flatMap((segment) => segment.points); + // ↓ 되돌릴 자리(2026-09-07) — 「단이 2개 이상일 때만 반영」으로 좁히려면 아래 두 줄의 + // `drawnFillPoints(extras)` 를 `extras.walls.length ? drawnFillPoints(extras) : []` 로 + // 바꾸면 된다(basinExtras 도 같은 꼴). 다만 그러면 화면이 그리는 성토부선과 면적이 + // 다시 어긋난다 — 사용자 판단 대기 중인 항목임(PLAN 3-5 ⓑ). const extendTrimSlope = (points: OffsetPoint[], outward: number): void => { if (!points.length) return; if (outward > 0) { diff --git a/B06_Section/B06_Section_UI_Page_Structures_Panel.ts b/B06_Section/B06_Section_UI_Page_Structures_Panel.ts index 227dd80c..90d570f0 100644 --- a/B06_Section/B06_Section_UI_Page_Structures_Panel.ts +++ b/B06_Section/B06_Section_UI_Page_Structures_Panel.ts @@ -313,7 +313,10 @@ export function createB06StructuresPanel(deps: B06StructuresPanelDeps): B06Struc const projectId = deps.projectId; try { const [types, stored, pipeResponse] = await Promise.all([ - fetchStructureTypes(), + // B06 은 **구조물 전체**를 넣을 수 있어야 한다(2026-09-07 사용자 지시 5). B05 목록에서 + // 빠져 있던 B군 종단배수·F군 생태/녹화도 여기서는 고를 수 있다 — 레지스트리 주석이 + // 「B06 개별 횡단도 옵션으로 재사용」이라 적어 둔 그 자리다. + fetchStructureTypes(true), fetchStructures(projectId), fetchDetailPipePoints(projectId), ]);