fix(M02): 사전조합 구분 빈 값 = 「—」 선택지 · 연결 = {로직, 출처}(51-12 서버 이음)

- 옛 사전조합(구분 빈 글)이 첫 구분으로 보이던 어긋남 없앰
- 화면 시나리오 51-12 [만들기] 단추 이름

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PSXsvyDxjNmufteN5bqmt
This commit is contained in:
2026-10-05 20:52:53 +09:00
co-authored by Claude Opus 5.5
parent ce9238755e
commit ce211f779b
2 changed files with 7 additions and 9 deletions
@@ -478,15 +478,11 @@ export function mountLaborDetail(
};
const libMeta = (): HTMLElement[] => {
if (promote) {
const link = (meta.연결 ?? {}) as { 로직?: string; 키?: string; 출처?: string };
const link = (meta.연결 ?? {}) as { 로직?: string; 출처?: string };
return [
readField(tc("Sub"), "구분", meta.구분 ?? ""),
readField(tc("Detail"), "상세구분", meta.상세구분 ?? ""),
readField(
tc("Lib_Link"),
"연결",
[link.로직 ?? link.키, link.출처].filter(Boolean).join(" · "),
),
readField(tc("Lib_Link"), "연결", [link.로직, link.출처].filter(Boolean).join(" · ")),
];
}
const sub = createSelectField({ options: [], label: tc("Sub"), disabled: !edit });
@@ -494,9 +490,11 @@ export function mountLaborDetail(
sub.root.dataset.laborField = "구분";
detail.root.dataset.laborField = "상세구분";
let subs: SubBrief[] = [];
// 목록에 없는 지금 값도 선택지로 둠
// 목록에 없는 지금 값(빈 것 = 「—」 · 옛 문서)도 선택지로 둠
const opts = (names: string[], now: string | null | undefined) =>
[...new Set([...(now ? [now] : []), ...names])].map((v) => ({ value: v, text: v }));
[...new Set([now ?? "", ...names])]
.filter((v, i) => v || i === 0)
.map((v) => ({ value: v, text: v || "—" }));
const fill = (): void => {
sub.setOptions(
opts(
@@ -126,7 +126,7 @@
btn(document.querySelector(".m02-main__slot"), "생성").click();
const box = await until(() => document.querySelector(".m02-modal"));
box.querySelector("input").value = "시험 51-12";
btn(box, "생성").click();
btn(box, "만들기").click();
await until(() => posted);
btn(document.querySelector(".m02-modal"), "닫기")?.click();
document.querySelector(".m02-modal")?.closest(".ui-modal__backdrop, .ui-modal")?.remove();