From 3a6af2fb71c971bab9b275c39326efb8fbcb6ba5 Mon Sep 17 00:00:00 2001 From: kjs Date: Fri, 12 Dec 2025 13:50:33 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B6=84=ED=95=A0=ED=8C=A8=EB=84=90=20?= =?UTF-8?q?=EC=A1=B0=EC=9D=B8=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SplitPanelLayoutComponent.tsx | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/frontend/lib/registry/components/split-panel-layout/SplitPanelLayoutComponent.tsx b/frontend/lib/registry/components/split-panel-layout/SplitPanelLayoutComponent.tsx index 9d1d0811..ac5cc8d1 100644 --- a/frontend/lib/registry/components/split-panel-layout/SplitPanelLayoutComponent.tsx +++ b/frontend/lib/registry/components/split-panel-layout/SplitPanelLayoutComponent.tsx @@ -100,6 +100,13 @@ export const SplitPanelLayoutComponent: React.FC return item[exactKey]; } + // ๐Ÿ†• 2-1๏ธโƒฃ item_id ํŒจํ„ด ์‹œ๋„ (๋ฐฑ์—”๋“œ๊ฐ€ item_id_xxx ํ˜•์‹์œผ๋กœ ๋ฐ˜ํ™˜ํ•˜๋Š” ๊ฒฝ์šฐ) + // ์˜ˆ: item_info.item_name โ†’ item_id_item_name + const idPatternKey = `${tableName.replace("_info", "_id").replace("_mng", "_id")}_${fieldName}`; + if (item[idPatternKey] !== undefined) { + return item[idPatternKey]; + } + // 3๏ธโƒฃ ๋ณ„์นญ ํŒจํ„ด: ์†Œ์Šค์ปฌ๋Ÿผ_name (๊ธฐ๋ณธ ํ‘œ์‹œ ์ปฌ๋Ÿผ์šฉ) // ์˜ˆ: item_code_name (item_name์˜ ๋ณ„์นญ) if (fieldName === "item_name" || fieldName === "name") { @@ -107,6 +114,11 @@ export const SplitPanelLayoutComponent: React.FC if (item[aliasKey] !== undefined) { return item[aliasKey]; } + // ๐Ÿ†• item_id_name ํŒจํ„ด๋„ ์‹œ๋„ + const idAliasKey = `${tableName.replace("_info", "_id").replace("_mng", "_id")}_name`; + if (item[idAliasKey] !== undefined) { + return item[idAliasKey]; + } } // 4๏ธโƒฃ entityColumnMap์—์„œ ๋งคํ•‘ ์ฐพ๊ธฐ (ํ™”๋ฉด ์„ค์ •์—์„œ ์ง€์ •๋œ ๊ฒฝ์šฐ) @@ -1023,7 +1035,7 @@ export const SplitPanelLayoutComponent: React.FC const uniqueValues = new Set(); leftData.forEach((item) => { - // ๐Ÿ†• ์กฐ์ธ ์ปฌ๋Ÿผ ์ฒ˜๋ฆฌ (item_info.standard โ†’ item_code_standard) + // ๐Ÿ†• ์กฐ์ธ ์ปฌ๋Ÿผ ์ฒ˜๋ฆฌ (item_info.standard โ†’ item_code_standard ๋˜๋Š” item_id_standard) let value: any; if (columnName.includes(".")) { @@ -1035,10 +1047,21 @@ export const SplitPanelLayoutComponent: React.FC const exactKey = `${inferredSourceColumn}_${fieldName}`; value = item[exactKey]; - // ๊ธฐ๋ณธ ๋ณ„์นญ ํŒจํ„ด ์‹œ๋„ (item_code_name) + // ๐Ÿ†• item_id ํŒจํ„ด ์‹œ๋„ + if (value === undefined) { + const idPatternKey = `${refTable.replace("_info", "_id").replace("_mng", "_id")}_${fieldName}`; + value = item[idPatternKey]; + } + + // ๊ธฐ๋ณธ ๋ณ„์นญ ํŒจํ„ด ์‹œ๋„ (item_code_name ๋˜๋Š” item_id_name) if (value === undefined && (fieldName === "item_name" || fieldName === "name")) { const aliasKey = `${inferredSourceColumn}_name`; value = item[aliasKey]; + // item_id_name ํŒจํ„ด๋„ ์‹œ๋„ + if (value === undefined) { + const idAliasKey = `${refTable.replace("_info", "_id").replace("_mng", "_id")}_name`; + value = item[idAliasKey]; + } } } else { // ์ผ๋ฐ˜ ์ปฌ๋Ÿผ