From c2f7694e1de32f20bd55cbf345f9ce768b15a2f6 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Thu, 1 Oct 2026 21:01:27 +0900 Subject: [PATCH] =?UTF-8?q?fix(M02-=ED=9D=90=EB=A6=84=EB=8F=84):=20?= =?UTF-8?q?=EC=84=A0=20=EA=B7=9C=EC=B9=99=20=ED=91=9C=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=B0=BE=EA=B8=B0=20-=20=EB=B2=94=EC=9C=84=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=EC=9D=80=20=EC=9D=B4=EB=A6=84=20(=EB=B2=94=EC=9C=84)?= =?UTF-8?q?=20=ED=95=9C=20=EC=A4=84=EB=A7=8C=20=C2=B7=20=EA=BA=BC=EB=82=BC?= =?UTF-8?q?=20=EC=B9=B8=EC=9D=80=20=ED=91=9C=20=EB=A8=B8=EB=A6=AC=20?= =?UTF-8?q?=EC=B9=B8=EB=A7=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01D2nUMUMTsqm93PbQtipo6c --- M02_MasterTemplete/DataFlow/M02_DF_LinkPanel.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/M02_MasterTemplete/DataFlow/M02_DF_LinkPanel.ts b/M02_MasterTemplete/DataFlow/M02_DF_LinkPanel.ts index fcf156dc5..5f08dcf38 100644 --- a/M02_MasterTemplete/DataFlow/M02_DF_LinkPanel.ts +++ b/M02_MasterTemplete/DataFlow/M02_DF_LinkPanel.ts @@ -171,21 +171,18 @@ const row = (...children: (HTMLElement | string)[]): HTMLElement => /* ── 규칙마다 ─────────────────────────────────────────────────────────── */ function lookupEditor(ctx: Ctx, rule: Extract): HTMLElement[] { - const cols = [ - ...new Set([...ctx.headers, ...rule.conds.map((c) => c.col), rule.col].filter(Boolean)), - ]; + // 꺼낼 칸 = 표 머리 칸만 + const cols = [...new Set([...ctx.headers, rule.col].filter(Boolean))]; const colOpts = cols.map((c) => ({ value: c, text: c })); - // 조건 칸 — 「이름·아래」 「이름·위」 짝은 「이름 (범위)」 한 줄(고르면 칸 이름 = 이름 · Rule 이 아래 < 값 ≤ 위 로 찾음) + // 조건 칸 — 「이름·아래」 「이름·위」 짝은 「이름 (범위)」 한 줄만(고르면 칸 이름 = 이름 · Rule 이 아래 < 값 ≤ 위 로 찾음) const range = (c: string): string | null => { const m = /^(.+)·(아래|위)$/.exec(c); return m && cols.includes(`${m[1]}·아래`) && cols.includes(`${m[1]}·위`) ? m[1] : null; }; + const bases = [...new Set(cols.map(range).filter((x): x is string => !!x))]; const condOpts = [ - ...cols.filter((c) => !range(c)).map((c) => ({ value: c, text: c })), - ...[...new Set(cols.map(range).filter((x): x is string => !!x))].map((x) => ({ - value: x, - text: tk("Range", x), - })), + ...cols.filter((c) => !range(c) && !bases.includes(c)).map((c) => ({ value: c, text: c })), + ...bases.map((x) => ({ value: x, text: tk("Range", x) })), ]; const pills = pillOptions(ctx); const put = (next: Partial): void => setRule(ctx, { ...rule, ...next });