diff --git a/Z01_MasterData/Z01_MasterData_Api_Fetch.ts b/Z01_MasterData/Z01_MasterData_Api_Fetch.ts index ca287649..d2113c51 100644 --- a/Z01_MasterData/Z01_MasterData_Api_Fetch.ts +++ b/Z01_MasterData/Z01_MasterData_Api_Fetch.ts @@ -22,8 +22,12 @@ export interface MasterFile { tables: MasterTable[]; } +/** 표가 아닌 낱값(한 값짜리 요율 따위)을 모은 마디 — 여느 표처럼 이름·값 두 칸으로 옴. */ +export const VALUES_TABLE_ID = "@values"; + export interface MasterGroup { - key: "logic" | "base" | "byproduct" | "seed"; + /** fingerprint = 폴더 지문(_manifest) — 어느 판으로 셈했는지 못박는 자리(부산물 아님). */ + key: "logic" | "base_value" | "byproduct" | "seed" | "fingerprint"; label: string; files: MasterFile[]; } diff --git a/Z01_MasterData/Z01_MasterData_UI_Page.ts b/Z01_MasterData/Z01_MasterData_UI_Page.ts index b87be416..df8c6f5b 100644 --- a/Z01_MasterData/Z01_MasterData_UI_Page.ts +++ b/Z01_MasterData/Z01_MasterData_UI_Page.ts @@ -26,6 +26,7 @@ import { type MasterGroup, type MasterRows, type MasterTable, + VALUES_TABLE_ID, } from "./Z01_MasterData_Api_Fetch"; import { clampPage, @@ -92,7 +93,11 @@ function buildTree( file.label, file.label === file.key ? "" : file.key, ); - for (const table of file.tables) { + // 낱값 마디는 표들 밑에 — 누르면 여느 표와 같은 길로 그림(2026-09-15 브레인). + const ordered = [...file.tables].sort( + (a, b) => Number(a.id === VALUES_TABLE_ID) - Number(b.id === VALUES_TABLE_ID), + ); + for (const table of ordered) { const button = el("button", { className: "z01-master__table", attrs: { type: "button", title: table.key },