feat(M01): 쉬운 단가산출 시험 단추 + 빈 창 — EasyCalc 폴더 신설

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PSXsvyDxjNmufteN5bqmt
This commit is contained in:
2026-10-01 09:15:57 +09:00
co-authored by Claude Sonnet 5.5
parent 1b1f482524
commit 85cd60da18
3 changed files with 43 additions and 0 deletions
@@ -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") })),
}),
});
}
@@ -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);
}
@@ -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,