feat(z01): 표 머리 세 줄을 모두 서버 글자로 — 고친 값이 닿는 자리(scope_notice · 보라 굵게) · 뒤처진 원본마다 한 줄(출처가 목록으로 옴 · outdated 참만 · null 은 모름이라 안 세움) · 알림은 서버 notice(요율 문구 화면 사전 뺌 — 두 벌 금지)

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-16 08:46:57 +09:00
co-authored by Claude Opus 5
parent 909b055aa9
commit dd6bd0620a
6 changed files with 81 additions and 37 deletions
+14 -8
View File
@@ -33,8 +33,6 @@ type Row = Record<string, unknown>;
export interface RowsSource {
title: string;
key: string;
/** 표 위 알림 한 줄(요율 — 법이 정한 값) */
notice?: string;
/** false 면 검색 칸을 숨김 — 서버에 검색이 없는 표(고친 것 모아 보기) */
searchable?: boolean;
load: (query: RowsQuery) => Promise<MasterRows>;
@@ -100,7 +98,8 @@ export function buildRowsView(): RowsView {
children: [hiddenToggle, L("Z01_MasterData_ShowHidden")],
});
const notice = el("p", { className: "z01-master__notice" });
const banner = el("p", { className: "z01-master__outdated" });
const scope = el("p", { className: "z01-master__scope" });
const banner = el("div", { className: "z01-master__outdated" });
const detail = el("div", { className: "z01-master__detail" });
const grid = el("div", { className: "z01-master__grid-wrap" });
const pageInput = el("input", {
@@ -128,6 +127,7 @@ export function buildRowsView(): RowsView {
className: "z01-master__panel",
children: [
el("div", { children: [title, titleKey] }),
scope,
banner,
notice,
toolbar,
@@ -141,6 +141,7 @@ export function buildRowsView(): RowsView {
detail.hidden = true;
notice.hidden = true;
banner.hidden = true;
scope.hidden = true;
function goTo(page: number): void {
const pages = pageCount(last?.total ?? 0, PAGE_SIZE);
@@ -190,10 +191,15 @@ export function buildRowsView(): RowsView {
function draw(): void {
if (!last) return;
const meta = last;
// 뒤처진 자료 띠 — 서버 outdated 만 봄(날짜 비교 안 함).
// 표 머리 세 줄 — 모두 서버가 주는 글자 그대로(화면이 사전을 가지면 두 벌이 됨).
// ① 고친 값이 닿는 자리 ② 뒤처진 원본(서버 outdated 만 · 날짜 비교 안 함) ③ 그 밖 알림
scope.textContent = meta.scope_notice ?? "";
scope.hidden = !meta.scope_notice;
const outdated = outdatedBanner(meta.source);
banner.textContent = outdated ? `⚠ ${outdated}` : "";
banner.hidden = !outdated;
banner.replaceChildren(...outdated.map((text) => el("p", { text: `⚠ ${text}` })));
banner.hidden = outdated.length === 0;
notice.textContent = meta.notice ?? "";
notice.hidden = !meta.notice;
const columns = shownColumns(meta.columns, showHidden);
const headRow = el("tr", { children: columns.map((column) => headCell(meta, column)) });
const body = el("tbody");
@@ -358,9 +364,9 @@ export function buildRowsView(): RowsView {
state.page = 1;
title.textContent = picked.title;
titleKey.textContent = picked.key;
notice.textContent = picked.notice ?? "";
notice.hidden = !picked.notice;
notice.hidden = true;
banner.hidden = true;
scope.hidden = true;
search.root.hidden = picked.searchable === false;
toolbar.hidden = false;
pager.hidden = false;