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 = []; }