feat(z01): 뒤처진 자료 띠(서버 source.outdated 만 · 「이 자료는 ○ 판 · 최신은 ○ 공표 · 받는 자리」) · 고친 것 모아 보기는 서버 쪽 나눔 그대로(page·size · 검색 칸 숨김 · 값에 unit) · 부동소수 끝자리 떠돌이 자름(손료계수 0.0001811) · 실제 API 로 노임 한 칸 고치고 되돌림 확인(브레인)

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 22:08:08 +09:00
co-authored by Claude Opus 5
parent 4dd41590da
commit 43cb7c90d0
6 changed files with 110 additions and 19 deletions
+20 -1
View File
@@ -15,6 +15,7 @@ import {
clampPage,
columnTitle,
latestOnly,
outdatedBanner,
pageCount,
parseCellInput,
rowCells,
@@ -34,6 +35,8 @@ export interface RowsSource {
key: string;
/** 표 위 알림 한 줄(요율 — 법이 정한 값) */
notice?: string;
/** false 면 검색 칸을 숨김 — 서버에 검색이 없는 표(고친 것 모아 보기) */
searchable?: boolean;
load: (query: RowsQuery) => Promise<MasterRows>;
/** 있으면 editable 칸을 고침 — 응답은 고친 뒤 그 줄 */
save?: (rowId: string, values: Row) => Promise<Row>;
@@ -97,6 +100,7 @@ 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 detail = el("div", { className: "z01-master__detail" });
const grid = el("div", { className: "z01-master__grid-wrap" });
const pageInput = el("input", {
@@ -122,12 +126,21 @@ export function buildRowsView(): RowsView {
});
const root = el("section", {
className: "z01-master__panel",
children: [el("div", { children: [title, titleKey] }), notice, toolbar, detail, grid, pager],
children: [
el("div", { children: [title, titleKey] }),
banner,
notice,
toolbar,
detail,
grid,
pager,
],
});
toolbar.hidden = true;
pager.hidden = true;
detail.hidden = true;
notice.hidden = true;
banner.hidden = true;
function goTo(page: number): void {
const pages = pageCount(last?.total ?? 0, PAGE_SIZE);
@@ -177,6 +190,10 @@ export function buildRowsView(): RowsView {
function draw(): void {
if (!last) return;
const meta = last;
// 뒤처진 자료 띠 — 서버 outdated 만 봄(날짜 비교 안 함).
const outdated = outdatedBanner(meta.source);
banner.textContent = outdated ? `⚠ ${outdated}` : "";
banner.hidden = !outdated;
const columns = shownColumns(meta.columns, showHidden);
const headRow = el("tr", { children: columns.map((column) => headCell(meta, column)) });
const body = el("tbody");
@@ -343,6 +360,8 @@ export function buildRowsView(): RowsView {
titleKey.textContent = picked.key;
notice.textContent = picked.notice ?? "";
notice.hidden = !picked.notice;
banner.hidden = true;
search.root.hidden = picked.searchable === false;
toolbar.hidden = false;
pager.hidden = false;
detail.hidden = true;