feat(M02): 면적산출 범위 → 도면 표 화면 틀(41-3) — [도면으로 보내기] · 같은 열 도면에 넘겨 놓기 · 연결표 기록 · 다름 알림 [업데이트]
- 새 M02_MasterTemplete_AreaToDrawing.ts — 범위 · 글자 크기(기본 2.5) 창 · 저장 안 한 고침 먼저 저장 · 표 변환 길(41-1) · placeTable · updateTable(41-2 손잡이) · 표 여럿 = T번호 - UI_Main 갈고리(select · onArea · onDrawing · withLinks) · StructureDoc 연결표 칸 - 시험 test_m02_area_to_drawing.py(Node) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BVPp2o6Mh2FZJr72yW3ofZ
This commit is contained in:
@@ -28,6 +28,7 @@ import {
|
||||
} from "./M02_MasterTemplete_Structure";
|
||||
import { askSettle } from "./M02_MasterTemplete_TreePanel_Dialogs";
|
||||
import { buildAreaPanel, type AreaPanel } from "./M02_MasterTemplete_AreaPanel";
|
||||
import { createAreaToDrawing } from "./M02_MasterTemplete_AreaToDrawing";
|
||||
import type { SpreadsheetHandle } from "../A00_Common/spreadsheet/spreadsheet";
|
||||
import type { LinkOptions } from "../A00_Common/spreadsheet/spreadsheet_links";
|
||||
export interface Selection {
|
||||
@@ -220,6 +221,9 @@ export function createMain(
|
||||
back.hidden = !sel || !(sel.kind in NUMBER_FIELD);
|
||||
};
|
||||
|
||||
// 면적산출 범위 → 도면 표(41-3) — 몸은 `AreaToDrawing` · 여기는 갈고리만
|
||||
const toDrawing = createAreaToDrawing({ open, save: doSave, isDirty: busy, showNotice });
|
||||
|
||||
const drop = (): void => {
|
||||
editor?.destroy();
|
||||
editor = null;
|
||||
@@ -275,12 +279,13 @@ export function createMain(
|
||||
dirty = !readOnly;
|
||||
apanel?.refresh(); // 칸 값 · 연결이 바뀜 — 반영 금액을 바로 다시 곱함
|
||||
},
|
||||
onSelect: (s) => (picked = s.칸),
|
||||
onSelect: (s) => ((picked = s.칸), toDrawing.select(s)),
|
||||
links,
|
||||
},
|
||||
);
|
||||
editor = handle;
|
||||
sheetHandle = handle;
|
||||
toDrawing.onArea(at, readOnly, slot); // 머리 [도면으로 보내기]
|
||||
if (at.layer === "project") return;
|
||||
if (kind === "area") {
|
||||
// 오른쪽 일위대가 패널 — 담은 로직 + 자재목록(기준 · 반영) · 줄 누름 = 칸 지정 모달
|
||||
@@ -401,6 +406,7 @@ export function createMain(
|
||||
originMarker: at.kind === "structure",
|
||||
noArea: at.kind === "structure",
|
||||
});
|
||||
if (at.kind === "structure") toDrawing.onDrawing(editor, at, doc as StructureDoc);
|
||||
return;
|
||||
}
|
||||
empty(L("M02_NoDrawing"));
|
||||
@@ -460,7 +466,10 @@ export function createMain(
|
||||
// 면적산출은 스프레드시트 문서로 통째 갈아 끼우되 번호는 계약 밖(엔진이 모름)이라 옮겨 붙임.
|
||||
const doc =
|
||||
at.kind === "structure" && loaded
|
||||
? { ...(loaded as StructureDoc), 도면: edited as StructureDoc["도면"] }
|
||||
? toDrawing.withLinks({
|
||||
...(loaded as StructureDoc),
|
||||
도면: edited as StructureDoc["도면"],
|
||||
})
|
||||
: at.kind === "area" && loaded
|
||||
? { ...(loaded as Record<string, unknown>), ...(edited as Record<string, unknown>) }
|
||||
: edited;
|
||||
|
||||
Reference in New Issue
Block a user