From 94b6869b9933501f3a237ff8634665e0f9fd8bbb Mon Sep 17 00:00:00 2001 From: umsangdon Date: Mon, 2 Nov 2026 23:34:37 +0900 Subject: [PATCH] =?UTF-8?q?refactor(751-2):=20calc=5Fsheet=20=EC=A7=81?= =?UTF-8?q?=EC=A0=91=20=EA=BC=B4=20=EA=B3=B5=EC=9A=A9=20=EA=BC=B4=EB=A1=9C?= =?UTF-8?q?=20=C2=B7=20test=5F719=5F4=20=EA=B3=B5=EC=9A=A9=20=EA=BC=B4=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EB=8D=94=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - calc_sheet.ts won = toLocaleString 직접 꼴 → formatMoney(0 자리) · formatLineMoney(1 자리) · 보이는 값 같음 - test_719_4 낡은 시험: node 로 붙이는 TS 목록에 common_util_money.ts 더함(751-1 뒤 formatNumber 미정의 ReferenceError) · 재는 것은 그대로 Co-Authored-By: Claude Sonnet 5.5 --- A00_Common/calc_sheet.ts | 3 ++- resources/tester/test_719_4_sangeun_sheet.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/A00_Common/calc_sheet.ts b/A00_Common/calc_sheet.ts index b7e9217af..cb14d8581 100644 --- a/A00_Common/calc_sheet.ts +++ b/A00_Common/calc_sheet.ts @@ -16,6 +16,7 @@ import { el } from "@ui/ui_template_elements"; import { createInputField, createSelectField } from "@ui/ui_template_input"; import { currentLanguageIndex } from "@ui/ui_template_locale"; import { createText } from "@ui/ui_template_text"; +import { formatLineMoney, formatMoney } from "../common_util/common_util_money"; import "./calc_sheet.css"; export interface SheetLine { @@ -148,7 +149,7 @@ const t = (k: keyof typeof TEXT): string => TEXT[k][currentLanguageIndex as 0 | const bundleName = (b: string): string => (b in TEXT ? t(b as keyof typeof TEXT) : b); const won = (v: number | null, digits = 0): string => - v === null ? "-" : v.toLocaleString("ko-KR", { maximumFractionDigits: digits }); + v === null ? "-" : digits ? formatLineMoney(v) : formatMoney(v); const out = (v: number | null, key = false, digits = 0): HTMLElement => el("span", { className: `ui-calc-row__out${key ? " is-key" : ""}`, text: won(v, digits) }); diff --git a/resources/tester/test_719_4_sangeun_sheet.py b/resources/tester/test_719_4_sangeun_sheet.py index 6308c46fd..540aefc77 100644 --- a/resources/tester/test_719_4_sangeun_sheet.py +++ b/resources/tester/test_719_4_sangeun_sheet.py @@ -36,6 +36,7 @@ def made(): def _ts(sg, machines): files = [ + "common_util/common_util_money.ts", "B09_Estimation/B09_Estimation_Calc_Base.ts", "A00_Common/calc_sheet.ts", "B09_Estimation/B09_Estimation_UI_Tabs_Sangeun_Sheet.ts",