From 833e8e5772a896d8a952ef5f5986f1a4fd54ed81 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Thu, 1 Oct 2026 16:51:27 +0900 Subject: [PATCH] =?UTF-8?q?fix(m02-cf):=20=EC=9B=90=EA=B0=80=20=ED=95=A9?= =?UTF-8?q?=EA=B3=84=20=E3=80=8C=EA=B3=A0=EC=B9=A0=20=EA=B2=83=E3=80=8D=20?= =?UTF-8?q?=EA=B2=80=EC=82=AC=EC=97=90=20=EB=B0=9B=EC=9D=80=20=EC=9E=85?= =?UTF-8?q?=EB=A0=A5=20=EA=B0=92=EC=9D=84=20=EB=84=98=EA=B9=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit renderSummary 다섯째 인자 opts.values 를 checkLogic 에 전달. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01EauA2ATmqNRbeV48s9CcBr --- M02_MasterTemplete/CostFlow/M02_CF_Summary.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/M02_MasterTemplete/CostFlow/M02_CF_Summary.ts b/M02_MasterTemplete/CostFlow/M02_CF_Summary.ts index f0cfb9284..94164b86b 100644 --- a/M02_MasterTemplete/CostFlow/M02_CF_Summary.ts +++ b/M02_MasterTemplete/CostFlow/M02_CF_Summary.ts @@ -9,7 +9,7 @@ import { currentLanguageIndex } from "@ui/ui_template_locale"; import { createSelectField, el } from "@ui/ui_template_elements"; import { formatMoney } from "../../M01_MasterData/M01_MasterData_UI_Logic_Money"; -import { checkLogic, type CfEvalResult } from "./M02_CF_Eval"; +import { checkLogic, type CfEvalResult, type CfValues } from "./M02_CF_Eval"; import type { CfBox, CfLogic, CfVariable } from "./M02_CF_Model"; import { showValue } from "./M02_CF_OutputPanel"; import "./M02_CF_Summary.css"; @@ -109,12 +109,13 @@ function sampleField( return el("label", { className: "m01-cfsum__field", children: [label, control] }); } -/** 원가 합계 칸 — result = 화면 계산 결과 · on 이 있으면 예시값을 바꿀 수 있음 */ +/** 원가 합계 칸 — result = 화면 계산 결과 · on 이 있으면 예시값을 바꿀 수 있음 · opts.values = 받은 입력 값(검사가 씀) */ export function renderSummary( host: HTMLElement, lg: CfLogic, result: CfEvalResult, on?: { change(lg: CfLogic): void }, + opts?: { values?: CfValues }, ): void { const money = !lg.resultUnit || lg.resultUnit.startsWith("원"); const perUnit = lg.resultUnit.split("/").slice(1).join("/"); @@ -187,7 +188,7 @@ export function renderSummary( /* 고칠 것 — 빈 받는 자리 · 검사 · 계산 오류 */ let checked: string[] = []; try { - checked = checkLogic(lg); + checked = checkLogic(lg, opts?.values ?? {}); } catch { checked = []; }