feat(z01): 줄에 없는 열은 「—」 · columns 밖 열은 안 그림 · main.py 에 시스템 관리자 전용 보호 미리 둠(라우터 import·등록 두 줄은 모듈이 올라오면 주석 풂 — 없는 모듈 import 는 서버를 못 띄움)(브레인)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016VBGFXB9AbJBwXP19z75Qq
This commit is contained in:
2026-09-15 19:09:35 +09:00
co-authored by Claude Opus 5
parent 7150fd8289
commit 399b219371
4 changed files with 24 additions and 4 deletions
@@ -33,6 +33,13 @@ export function cellText(value: unknown, unit?: string | null): string {
return String(value);
}
/** 한 줄의 칸들 — columns 차례대로만(columns 에 없는 열은 안 그림) · 줄에 그 열이 없으면 「—」. */
export function rowCells(row: Record<string, unknown>, columns: MasterColumn[]): string[] {
return columns.map((column) =>
Object.hasOwn(row, column.key) ? cellText(row[column.key], column.unit) : "—",
);
}
export function pageCount(total: number, size: number): number {
return Math.max(1, Math.ceil(total / size));
}