diff --git a/M01_MasterData/EasyCalc/M01_EasyCalc_Entry.ts b/M01_MasterData/EasyCalc/M01_EasyCalc_Entry.ts new file mode 100644 index 000000000..b930f56cb --- /dev/null +++ b/M01_MasterData/EasyCalc/M01_EasyCalc_Entry.ts @@ -0,0 +1,33 @@ +/* ============================================================================= + * M01_EasyCalc_Entry.ts + * 쉬운 단가산출 시험 길 — 들어가는 단추 + 빈 창(틀만). 이 폴더째 지워도 됨. + * ========================================================================== */ + +import { currentLanguageIndex } from "@ui/ui_template_locale"; +import { createButton, el } from "@ui/ui_template_elements"; +import { openModal } from "@ui/ui_template_modal"; +import "./M01_EasyCalc_Style.css"; + +const TEXT = { + Open: ["쉬운 단가산출(시험)", "Easy unit-price (trial)"], + Title: ["쉬운 단가산출", "Easy unit-price"], + Ready: ["준비 중", "Coming soon"], + Close: ["닫기", "Close"], +} as const; + +const te = (key: keyof typeof TEXT): string => TEXT[key][currentLanguageIndex]; + +/** 「식으로 새로 만들기」 옆에 놓는 단추 — 누르면 빈 창 */ +export function createEasyCalcButton(): HTMLButtonElement { + return createButton({ + label: te("Open"), + variant: "filled", + onClick: () => + openModal({ + title: te("Title"), + closeLabel: te("Close"), + mount: (body) => + body.append(el("p", { className: "m01-easycalc__ready", text: te("Ready") })), + }), + }); +} diff --git a/M01_MasterData/EasyCalc/M01_EasyCalc_Style.css b/M01_MasterData/EasyCalc/M01_EasyCalc_Style.css new file mode 100644 index 000000000..767d9150d --- /dev/null +++ b/M01_MasterData/EasyCalc/M01_EasyCalc_Style.css @@ -0,0 +1,6 @@ +.m01-easycalc__ready { + margin: 0; + padding: var(--spacing-16) 0; + color: var(--color-text-muted); + font-size: var(--text-body-sm); +} diff --git a/M01_MasterData/M01_MasterData_UI_LogicLab.ts b/M01_MasterData/M01_MasterData_UI_LogicLab.ts index c0d63c847..05942c5a5 100644 --- a/M01_MasterData/M01_MasterData_UI_LogicLab.ts +++ b/M01_MasterData/M01_MasterData_UI_LogicLab.ts @@ -39,6 +39,8 @@ import { openCopyScreen } from "./M01_MasterData_UI_LogicLab_Copy"; import { tl } from "./M01_MasterData_UI_LogicLab_Text"; import { buildNewLogic } from "./M01_MasterData_UI_LogicLab_New"; import { tn } from "./M01_MasterData_UI_LogicLab_New_Text"; +// 쉬운 단가산출 시험 길 — 폴더째 지우면 이 두 줄도 지움 +import { createEasyCalcButton } from "./EasyCalc/M01_EasyCalc_Entry"; import "./M01_MasterData_UI_Logic_Style.css"; /** 저장 안 한 로직 하나 — origKey null = 새 로직 · row null = 지움 */ @@ -398,6 +400,8 @@ export async function mountM01LogicLab( el("h2", { text: tx("Title") }), pending, createButton({ label: tn("Open"), variant: "filled", onClick: startNew }), + // 쉬운 단가산출 시험 길 — 폴더째 지우면 이 두 줄도 지움 + createEasyCalcButton(), createButton({ label: tx("Bar_Delete"), variant: "danger", onClick: () => void onDelete() }), discardButton, saveButton,