feat(z01): 표 머리 알림을 서버 목록 그대로 — 줄마다 한 줄(첫 줄 「새로 만드는 프로젝트부터」 · 요율은 법정값 경고까지) · 글자 속 **굵게** 를 굵은 조각으로 폄(별표 안 보임) · 보라 굵은 칸으로 또렷이
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016VBGFXB9AbJBwXP19z75Qq
This commit is contained in:
@@ -11,10 +11,12 @@ import { createButton, createInputField, el, showToast } from "@ui/ui_template_e
|
||||
import { t as L } from "@ui/ui_template_locale";
|
||||
import type { MasterRows, RowsQuery } from "./Z01_MasterData_Api_Fetch";
|
||||
import {
|
||||
boldSegments,
|
||||
cellInfo,
|
||||
clampPage,
|
||||
columnTitle,
|
||||
latestOnly,
|
||||
noticeLines,
|
||||
outdatedBanner,
|
||||
pageCount,
|
||||
parseCellInput,
|
||||
@@ -97,8 +99,7 @@ export function buildRowsView(): RowsView {
|
||||
className: "z01-master__check",
|
||||
children: [hiddenToggle, L("Z01_MasterData_ShowHidden")],
|
||||
});
|
||||
const notice = el("p", { className: "z01-master__notice" });
|
||||
const scope = el("p", { className: "z01-master__scope" });
|
||||
const notice = el("div", { className: "z01-master__notice" });
|
||||
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" });
|
||||
@@ -127,9 +128,8 @@ export function buildRowsView(): RowsView {
|
||||
className: "z01-master__panel",
|
||||
children: [
|
||||
el("div", { children: [title, titleKey] }),
|
||||
scope,
|
||||
banner,
|
||||
notice,
|
||||
banner,
|
||||
toolbar,
|
||||
detail,
|
||||
grid,
|
||||
@@ -141,7 +141,6 @@ 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);
|
||||
@@ -191,15 +190,22 @@ export function buildRowsView(): RowsView {
|
||||
function draw(): void {
|
||||
if (!last) return;
|
||||
const meta = last;
|
||||
// 표 머리 세 줄 — 모두 서버가 주는 글자 그대로(화면이 사전을 가지면 두 벌이 됨).
|
||||
// ① 고친 값이 닿는 자리 ② 뒤처진 원본(서버 outdated 만 · 날짜 비교 안 함) ③ 그 밖 알림
|
||||
scope.textContent = meta.scope_notice ?? "";
|
||||
scope.hidden = !meta.scope_notice;
|
||||
// 표 머리 — 모두 서버 글자 그대로(화면이 사전을 가지면 두 벌이 됨).
|
||||
// ① 알림(첫 줄 「새로 만드는 프로젝트부터」 · 요율은 법정값 경고까지) ② 뒤처진 원본(서버 outdated 만)
|
||||
const notices = noticeLines(meta.notice);
|
||||
notice.replaceChildren(
|
||||
...notices.map((text) =>
|
||||
el("p", {
|
||||
children: boldSegments(text).map((part) =>
|
||||
part.bold ? el("strong", { text: part.text }) : el("span", { text: part.text }),
|
||||
),
|
||||
}),
|
||||
),
|
||||
);
|
||||
notice.hidden = notices.length === 0;
|
||||
const outdated = outdatedBanner(meta.source);
|
||||
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");
|
||||
@@ -366,7 +372,6 @@ export function buildRowsView(): RowsView {
|
||||
titleKey.textContent = picked.key;
|
||||
notice.hidden = true;
|
||||
banner.hidden = true;
|
||||
scope.hidden = true;
|
||||
search.root.hidden = picked.searchable === false;
|
||||
toolbar.hidden = false;
|
||||
pager.hidden = false;
|
||||
|
||||
Reference in New Issue
Block a user