fix(구조물표): 322-2 다듬기(브레인 화면 확인) — 화면에 영어 키 안 보임 · 검사 글 한국어(화면 · 서버 짝) · 부품 탭 읽는 칸 = 정의 이름 · 줄바꿈 · 한눈 표 폭 줄임 · 바꿨다 되돌리면 [저장] 꺼짐
- 자리꼴 점 · 구간 · 터 · 정본 관 지점 · 구조물(키는 툴팁) · 고르기 글 = 부품 짧은 이름(괄호 설명 · 키는 툴팁) · 횡단도 없음 = 「안 만듦」 · 「벽 스윕」 → 「벽」 · 종류 키는 툴팁 - 검사 글: 「형상이 「없음」이면 횡단도도 「안 만듦」」 · 부품 짧은 이름 · 칸 이름 · 종류 이름(M02_SO_Def_Check.ts = M02_SO_Check.py) - 부품 탭: 읽는 칸 = 그 부품을 쓰는 종류의 칸 이름(단위) · 표 줄바꿈(table-layout fixed) - 한눈 표 형상칸 「기본 형태」 = 그림 형태 고르기(REVET_FORMS) - [저장] 켬 = 저장할 꼴(tidy · 목록 짝 enabled)끼리 지금 판과 다를 때만(M02_SO_Def_Reflect.differs) - 시험: 322-2 검사 글 · 되돌림 견본 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ji4nuyLVHcxrXWHTdb5nRD
This commit is contained in:
@@ -7,7 +7,15 @@
|
||||
|
||||
import { el } from "@ui/ui_template_elements";
|
||||
import type { StructDef } from "./M02_SO_Def_Model";
|
||||
import { PART_BOX, partsOff, setPartOn, usersOf } from "./M02_SO_Def_Reflect";
|
||||
import {
|
||||
OWNER_KO,
|
||||
PART_BOX,
|
||||
partsOff,
|
||||
PLACE_KO,
|
||||
setPartOn,
|
||||
shortName,
|
||||
usersOf,
|
||||
} from "./M02_SO_Def_Reflect";
|
||||
import { checkBox, head } from "./M02_SO_Def_Ui";
|
||||
import { to } from "./M02_SO_Text";
|
||||
|
||||
@@ -20,17 +28,26 @@ export function buildParts(opt: {
|
||||
}): HTMLElement {
|
||||
const { def, edit, changed } = opt;
|
||||
const off = partsOff(def);
|
||||
/** 옵션 키 → 정의 이름(단위) — 그 부품을 쓰는 종류의 칸 이름 먼저 · 없으면 아무 종류 · 그래도 없으면 키. */
|
||||
const labelOf = (key: string, users: readonly string[]): string => {
|
||||
const types = [
|
||||
...def.types.filter((t) => users.includes(t.type_id)),
|
||||
...def.types.filter((t) => !users.includes(t.type_id)),
|
||||
];
|
||||
const o = types.flatMap((t) => t.options).find((x) => x.key === key);
|
||||
return o ? (o.unit ? `${o.label} (${o.unit})` : o.label) : key;
|
||||
};
|
||||
const blocks = (Object.keys(PART_BOX) as Branch[]).flatMap((branch) => [
|
||||
...head(branch),
|
||||
el("table", {
|
||||
className: "m02-sod__table",
|
||||
className: "m02-sod__table m02-sod__table--wrap",
|
||||
attrs: { "data-sod-parts": branch },
|
||||
children: [
|
||||
el("thead", {
|
||||
children: [
|
||||
el("tr", {
|
||||
children: ["", "ColName", "PartRead", "PartFits", "PartUsers", "PartOn"].map((key) =>
|
||||
el("th", { text: key ? to(key as "ColName") : "" }),
|
||||
children: (["ColName", "PartRead", "PartFits", "PartUsers", "PartOn"] as const).map(
|
||||
(key) => el("th", { text: to(key) }),
|
||||
),
|
||||
}),
|
||||
],
|
||||
@@ -44,10 +61,24 @@ export function buildParts(opt: {
|
||||
attrs: { "data-sod-part": key },
|
||||
className: off[key] === false ? "is-off" : "",
|
||||
children: [
|
||||
el("td", { children: [el("small", { className: "m02-opts__key", text: id })] }),
|
||||
el("td", { text: part.이름 }),
|
||||
el("td", { text: part["읽는 칸"].join(" · ") || "—" }),
|
||||
el("td", { text: `${part.자리꼴.join(" · ")} / ${part.정본.join(" · ")}` }),
|
||||
// 영어 키는 툴팁만(322-2 다듬기) — 이름 = 짧은 이름 · 읽는 칸 = 정의 칸 이름
|
||||
el("td", { text: shortName(part.이름), attrs: { title: `${id} · ${part.이름}` } }),
|
||||
el("td", {
|
||||
text:
|
||||
part["읽는 칸"]
|
||||
.map((k) =>
|
||||
labelOf(
|
||||
k,
|
||||
users.map((row) => row.typeId),
|
||||
),
|
||||
)
|
||||
.join(" · ") || "—",
|
||||
}),
|
||||
el("td", {
|
||||
text: `${part.자리꼴.map((p) => PLACE_KO[p] ?? p).join(" · ")} / ${part.정본
|
||||
.map((o) => OWNER_KO[o] ?? o)
|
||||
.join(" · ")}`,
|
||||
}),
|
||||
el("td", { text: users.map((row) => row.name).join(" · ") || "—" }),
|
||||
el("td", {
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user