26 lines
1.2 KiB
TypeScript
26 lines
1.2 KiB
TypeScript
/* =============================================================================
|
|
* E01_StabRegister_UI_Missing.ts
|
|
* 빠진 횡단 띠(요구 351 · PLAN 532-5) — E02 · E03 화면 위 「횡단 없는 측점 N 개 — 해석에서 빠짐」.
|
|
* 목록 = 서버 `missing_stations`(E01 복사본에 횡단 파일이 없는 측점 누가거리) · 「자세히」로 펼침.
|
|
* 모양 = 띠 알림 부품(경고).
|
|
* ========================================================================== */
|
|
|
|
import { createBanner } from "@ui/ui_template_banner";
|
|
import { el } from "@ui/ui_template_elements";
|
|
import { t } from "@ui/ui_template_locale";
|
|
|
|
/** 빠진 측점이 없으면 빈 칸(띠 없음) */
|
|
export function buildMissingBanner(missing: number[] | undefined): HTMLElement {
|
|
const list = missing ?? [];
|
|
if (!list.length) return el("div");
|
|
const box = createBanner({
|
|
tone: "warning",
|
|
text: t("E_Missing_Head").replace("{n}", String(list.length)),
|
|
details: el("p", { text: list.map((m) => `${Math.round(m * 100) / 100} m`).join(" · ") }),
|
|
});
|
|
box.classList.add("e-missing");
|
|
box.dataset.role = "missing-stations";
|
|
box.dataset.count = String(list.length);
|
|
return box;
|
|
}
|