From 98fe87402f53d342afc460fa3f6538364e66679c Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sun, 20 Sep 2026 02:29:38 +0900 Subject: [PATCH] =?UTF-8?q?feat(M01):=20=EB=A1=9C=EC=A7=81=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20=EC=9B=90=EB=AC=B8=EB=B2=88=ED=98=B8=20=EC=B0=BE?= =?UTF-8?q?=EA=B8=B0=20=C2=B7=20=EB=A1=9C=EC=A7=81=20=EB=AA=A9=EB=A1=9D=20?= =?UTF-8?q?=EC=B0=A8=EB=A1=80=EC=88=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 로직 목록 찾기가 원문번호도 봄(키가 번호꼴이 아니라서) - 서버 로직 목록을 파일 머리 차례순으로 Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_016WRFJmmhPi4exAzHgPZHMT --- M01_MasterData/M01_MasterData_Store.py | 2 +- M01_MasterData/M01_MasterData_UI_Logic_List.ts | 11 ++++++++--- M01_MasterData/M01_MasterData_UI_Logic_Page.ts | 3 ++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/M01_MasterData/M01_MasterData_Store.py b/M01_MasterData/M01_MasterData_Store.py index 79aa3ed5..1a98bcf8 100644 --- a/M01_MasterData/M01_MasterData_Store.py +++ b/M01_MasterData/M01_MasterData_Store.py @@ -190,7 +190,7 @@ def logics(book: str, chapter: str, q: str, blocked: int | None) -> list[dict]: files = cm.load(folder=FOLDER) whole = cm.mf.Master(files) out = [] - for name, data in _logic_files(files): + for name, data in sorted(_logic_files(files), key=lambda f: f[1].get("차례") or 0): if (book and data.get("원문") != book) or (chapter and chapter_of(name, data) != chapter): continue for row in data.get("줄") or []: diff --git a/M01_MasterData/M01_MasterData_UI_Logic_List.ts b/M01_MasterData/M01_MasterData_UI_Logic_List.ts index 1c1c1ab1..0f681d0f 100644 --- a/M01_MasterData/M01_MasterData_UI_Logic_List.ts +++ b/M01_MasterData/M01_MasterData_UI_Logic_List.ts @@ -15,6 +15,7 @@ export interface ListItem { book: string; chapter: string; key: string; + number: string; name: string; blocked: boolean; reasons: string[]; @@ -65,7 +66,7 @@ export function buildList(onOpen: (item: ListItem) => void): ListHandle { (!book.value || x.book === book.value) && (!chapter.value || x.chapter === chapter.value) && (!blockedOnly.checked || x.blocked) && - (!q || x.key.toLowerCase().includes(q) || x.name.toLowerCase().includes(q)), + (!q || [x.key, x.number, x.name].some((v) => v.toLowerCase().includes(q))), ); count.textContent = tx("List_Count", { n: shown.length }); list.replaceChildren(...shown.slice(0, 500).map(line)); @@ -90,8 +91,11 @@ export function buildList(onOpen: (item: ListItem) => void): ListHandle { className: `m01-logic__item${item.id === active ? " is-active" : ""}`, attrs: { type: "button", title: item.key }, children: [ - el("span", { className: "m01-logic__muted", text: `${item.book} ${item.chapter}` }), - el("span", { text: item.name || item.key }), + el("span", { + className: "m01-logic__muted", + text: `${item.book} ${item.chapter} · ${item.number}`, + }), + el("span", { text: item.name || item.number || item.key }), el("span", { className: "m01-logic__badges", children: badges }), ], }); @@ -134,6 +138,7 @@ export function buildList(onOpen: (item: ListItem) => void): ListHandle { book: x.book, chapter: x.chapter, key: x.키, + number: x.원문번호, name: x.이름, blocked: x.blocked, reasons: x.reasons, diff --git a/M01_MasterData/M01_MasterData_UI_Logic_Page.ts b/M01_MasterData/M01_MasterData_UI_Logic_Page.ts index a84dd35f..b031e581 100644 --- a/M01_MasterData/M01_MasterData_UI_Logic_Page.ts +++ b/M01_MasterData/M01_MasterData_UI_Logic_Page.ts @@ -91,7 +91,8 @@ export async function mountM01Logic(host: HTMLElement, listHost: HTMLElement): P id, book: d.book, chapter: "", - key: d.row.키 || d.row.원문번호, + key: d.row.키, + number: d.row.원문번호, name: d.row.이름, blocked: false, reasons: [],