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
60 lines
2.3 KiB
TypeScript
60 lines
2.3 KiB
TypeScript
/* =============================================================================
|
|
* B08_Quantity_UI_Side_RootRemoval.ts
|
|
* 산출 조건 「제근 굴착기 크기」 칸 — 임목축적 등급 바로 밑(PLAN 10-A · 9-21 크기 칸 서버 64a52df6).
|
|
*
|
|
* 페이지 본문(`B08_Quantity_UI_Page.ts`)이 700줄을 넘어 새 칸을 이 파일로 뺌(CLAUDE.md 4장).
|
|
* ⚠ 선택지·제안은 **서버가 내려준 그대로**(`root_removal_excavator_choices`) — 화면에 다시 적지 않음.
|
|
* ⚠ 스스로 안 고름 — 첫 보기가 「안 정함」이고 비면 뿌리뽑기 줄이 입력 사유로 섬. 제안 0.7 은
|
|
* 회색 근거 + [제안값 넣기]를 **누른 때만**(면고르기 성토면과 같은 모양).
|
|
* ========================================================================== */
|
|
|
|
import { ui_locales, currentLanguageIndex } from "@ui/ui_template_locale";
|
|
import { createButton } from "@ui/ui_template_elements";
|
|
import type { SideFieldHelpers } from "./B08_Quantity_UI_Side_TreeWaste";
|
|
|
|
function L(key: keyof typeof ui_locales): string {
|
|
return ui_locales[key][currentLanguageIndex];
|
|
}
|
|
|
|
export interface RootRemovalChoices {
|
|
choices: string[];
|
|
suggested?: { value: string; basis: string };
|
|
}
|
|
|
|
export function appendRootRemovalFields(
|
|
panel: HTMLElement,
|
|
draft: { root_removal_excavator_m3: string; dirty: boolean },
|
|
choices: RootRemovalChoices | undefined,
|
|
h: SideFieldHelpers,
|
|
): void {
|
|
if (!choices) return;
|
|
const row = h.selectField(
|
|
L("B08_Quantity_Side_RootRemoval_Label"),
|
|
draft.root_removal_excavator_m3,
|
|
[
|
|
{ value: "", label: L("B08_Quantity_RootRemoval_Unset") },
|
|
...choices.choices.map((size) => ({ value: size, label: `${size}㎥` })),
|
|
],
|
|
(picked) => {
|
|
draft.root_removal_excavator_m3 = picked;
|
|
draft.dirty = true;
|
|
},
|
|
);
|
|
panel.append(row);
|
|
const suggested = choices.suggested;
|
|
if (!suggested?.value) return;
|
|
panel.append(
|
|
h.hintRow(`${L("B08_Quantity_RootRemoval_Suggest")} ${suggested.value}㎥ — ${suggested.basis}`),
|
|
createButton({
|
|
label: L("B08_Quantity_RootRemoval_FillSuggested"),
|
|
variant: "ghost",
|
|
onClick: () => {
|
|
const select = row.querySelector("select");
|
|
if (select) select.value = suggested.value;
|
|
draft.root_removal_excavator_m3 = suggested.value;
|
|
draft.dirty = true;
|
|
},
|
|
}),
|
|
);
|
|
}
|