From 8a9721fa8f0f6bb61e031ad845b18371647872be Mon Sep 17 00:00:00 2001 From: umsangdon Date: Mon, 21 Sep 2026 20:53:04 +0900 Subject: [PATCH] =?UTF-8?q?fix(M01):=20=EB=A1=9C=EC=A7=81=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0=20=EC=8B=9C=ED=97=98=20=E2=80=94=20=EC=9E=90=EC=B2=B4?= =?UTF-8?q?=20=EB=A1=9C=EC=A7=81(GX)=EC=97=90=EB=8A=94=20=E3=80=8C?= =?UTF-8?q?=EA=B8=B0=EB=B3=B8=20=EB=A1=9C=EC=A7=81=EC=9D=80=20=EA=B3=A0?= =?UTF-8?q?=EC=B9=98=EC=A7=80=20=EB=AA=BB=ED=95=A8=E3=80=8D=20=EB=AC=B8?= =?UTF-8?q?=EA=B5=AC=20=EB=8C=80=EC=8B=A0=20=EA=B3=A0=EC=B9=98=EB=8A=94=20?= =?UTF-8?q?=ED=8E=B8=EC=A7=91=EA=B8=B0=EB=A5=BC=20=EB=83=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - `isOwnLogic`(키 GX…)이면 기본정보 · 호표 자리에 정본 화면과 같은 편집기 · 정본 로직은 그대로 읽기 전용 - ORCA 견본 GX 초안 — 문구 없음 · 입력칸 51개 · 정본 13-4-1 소계 203,281.2 그대로 Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_016WRFJmmhPi4exAzHgPZHMT --- .../M01_MasterData_UI_LogicLab_Detail.ts | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/M01_MasterData/M01_MasterData_UI_LogicLab_Detail.ts b/M01_MasterData/M01_MasterData_UI_LogicLab_Detail.ts index ff323a85..5d81ccc7 100644 --- a/M01_MasterData/M01_MasterData_UI_LogicLab_Detail.ts +++ b/M01_MasterData/M01_MasterData_UI_LogicLab_Detail.ts @@ -15,7 +15,8 @@ import type { NamedFormula, TextAnswer, } from "./M01_MasterData_UI_Logic_Api"; -import { formatNumber, qtyKind } from "./M01_MasterData_UI_Logic_Edit"; +import { buildEditor, formatNumber, qtyKind } from "./M01_MasterData_UI_Logic_Edit"; +import { openPicker } from "./M01_MasterData_UI_Logic_Pick"; import { tx } from "./M01_MasterData_UI_Logic_Text"; import { buildFormula } from "./M01_MasterData_UI_LogicLab_Formula"; import { openMaterialModal } from "./M01_MasterData_UI_LogicLab_Modal"; @@ -280,13 +281,33 @@ function hoBox(ctx: DetailContext): HTMLElement { return section(tl("Ho_Title"), blocks, hint); } +/** 자체 로직(키 GX…) — 정본은 아님 */ +export const isOwnLogic = (row: LogicRow): boolean => row.키.startsWith("GX"); + +/** 자체 로직은 고치는 화면(정본 로직 화면과 같은 편집기) 하나로 기본정보 · 호표를 대신함 */ +function ownBox(ctx: DetailContext): HTMLElement { + const host = el("div"); + buildEditor(host, { + row: ctx.row, + file: ctx.file, + isNew: false, + files: [], + reasons: ctx.reasons, + prices: ctx.prices, + lines: ctx.lines, + onChange: ctx.onChange, + onFile: () => undefined, + onPick: openPicker, + }); + return section(tl("Info_Title"), [host]); +} + /** 상세 화면 넷을 `host` 에 쌓음 */ export function buildLabDetail(host: HTMLElement, ctx: DetailContext): void { const formula = el("div", { className: "m01lab__formula" }); buildFormula(formula, { text: ctx.text }); host.replaceChildren( - infoBox(ctx), - hoBox(ctx), + ...(isOwnLogic(ctx.row) ? [ownBox(ctx)] : [infoBox(ctx), hoBox(ctx)]), section(tl("Formula_Title"), [formula]), section(tl("Calc_Title"), [ctx.calcHost]), );