diff --git a/M02_MasterTemplete/DataFlow/M02_DF_Panel.ts b/M02_MasterTemplete/DataFlow/M02_DF_Panel.ts index 18c80030c..1d2c68ee0 100644 --- a/M02_MasterTemplete/DataFlow/M02_DF_Panel.ts +++ b/M02_MasterTemplete/DataFlow/M02_DF_Panel.ts @@ -10,12 +10,15 @@ import { currentLanguageIndex } from "@ui/ui_template_locale"; import { createButton, el } from "@ui/ui_template_elements"; +import { openModal } from "@ui/ui_template_modal"; import type { CfLogic } from "./M02_DF_Model"; import { createPaper } from "./M02_DF_Paper"; +import { renderStandards } from "./M02_DF_Standards"; import "./M02_DF_Panel.css"; const TEXT = { Big: ["크게 보기", "Full screen"], + Standards: ["표준 표", "Standards"], Toggle: ["흐름도", "Flow"], ToggleOpen: ["흐름도 펴기", "Open the flow panel"], ToggleClose: ["흐름도 접기", "Collapse the flow panel"], @@ -122,9 +125,24 @@ export function mountFlowPanel(host: HTMLElement, opts: FlowPanelOpts): FlowPane toggle, el("strong", { className: "m02-dfp__title", text: opts.title }), sm(tf("Big"), () => expand()), + sm(tf("Standards"), () => openStandards()), ], }); + /** 「표준 표」(단위 · 금액 표준) — 고치기는 시스템 관리자만(보기만이면 칸 · 단추를 막음) */ + const openStandards = (): void => { + openModal({ + title: tf("Standards"), + closeLabel: tf("Close"), + mount: (box: HTMLElement) => { + const lock = el("fieldset", { className: "m02-dfp__lock" }); + lock.disabled = !!opts.readOnly; + box.append(lock); + renderStandards(lock, { change: () => paper.redraw() }, { title: false }); + }, + }); + }; + /* 펼친 패널 */ const costBox = el("details", { className: "m02-dfp__cost",