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
+19 -6
View File
@@ -58,28 +58,41 @@ export function valueWithUnit(value: unknown, unit?: string | null): string {
/** 자료 출처표 한 줄 — 어디서 받고 최신이 무엇인지(데스크탑 서브 출처표 · 메인이 표 수준에 실음). */
export interface TableSource {
source_id?: string;
/** 원본 이름 — 한 표가 원본 여럿을 모아 어느 것이 뒤처졌는지 가려야 함 */
name?: string;
publisher: string;
where: string;
cycle?: string;
latest_published?: string;
our_edition?: string;
checked_at?: string;
/** 뒤처짐 판정 — 서버만 함 */
outdated?: boolean;
/** 뒤처짐 판정 — 서버만 함 · null 은 「모름」이라 띠를 안 세움 */
outdated?: boolean | null;
}
/**
* 뒤처진 자료 띠 글자 — 서버가 outdated 라 할 때만. 화면은 날짜를 견주지 않음(판정 두 벌 금지).
* 받는 자리를 꼭 적음 — 최신이 무엇인지·어디서 받는지가 없어 건설 노임이 반 년 뒤처졌음.
*/
export function outdatedBanner(source?: TableSource): string | null {
if (source?.outdated !== true) return null;
return `이 자료는 ${source.our_edition ?? "판 모름"} 판 · 최신은 ${source.latest_published ?? "?"} 공표 · ${source.publisher} ${source.where}`;
export function outdatedBanner(sources?: TableSource[]): string[] {
return (sources ?? [])
.filter((source) => source.outdated === true)
.map((source) => {
const head = source.name ? `${source.name} — ` : "";
const where = source.where ? ` ${source.where}` : "";
return `${head}이 자료는 ${source.our_edition ?? "판 모름"} 판 · 최신은 ${source.latest_published ?? "?"} 공표 · ${source.publisher}${where}`;
});
}
/** 기초단가 표 머리 — 열 하나에 한 문장이라 표에 한 번만 옴(2026-09-15 브레인 ④). */
export interface TableMeta {
source?: TableSource;
/** 한 표가 모은 원본마다 한 줄 */
source?: TableSource[];
/** 서버가 주는 알림 한 줄(요율 — 법이 정한 값) — 화면이 사전을 가지면 두 벌이 됨 */
notice?: string;
/** 고친 값이 어디에 닿는지 — 새로 만드는 프로젝트부터 쓰임(서버가 줌) */
scope_notice?: string;
editable?: string[];
/** 열key → 왜 못 고치나 */
locked?: Record<string, string>;