Merge pull request '코드로 보이던 문제 최소한의 코드만 고침' (#360) from lhj into main

Reviewed-on: http://39.117.244.52:3000/kjs/ERP-node/pulls/360
This commit is contained in:
hjlee 2026-01-15 16:53:40 +09:00
commit 98c489ee22
1 changed files with 8 additions and 1 deletions

View File

@ -84,7 +84,14 @@ export const SplitPanelLayoutComponent: React.FC<SplitPanelLayoutComponentProps>
// "테이블명.컬럼명" 형식을 "원본컬럼_조인컬럼명" 형식으로 변환하여 데이터 접근 // "테이블명.컬럼명" 형식을 "원본컬럼_조인컬럼명" 형식으로 변환하여 데이터 접근
const getEntityJoinValue = useCallback( const getEntityJoinValue = useCallback(
(item: any, columnName: string, entityColumnMap?: Record<string, string>): any => { (item: any, columnName: string, entityColumnMap?: Record<string, string>): any => {
// 직접 매칭 시도 // 🆕 백엔드가 제공하는 _label 필드 우선 사용
// 백엔드는 "표시 컬럼"이 설정된 경우 columnName_label을 자동 생성
const labelKey = `${columnName}_label`;
if (item[labelKey] !== undefined && item[labelKey] !== "" && item[labelKey] !== null) {
return item[labelKey];
}
// 직접 매칭 시도 (JOIN된 값이 없으면 원본 값 반환)
if (item[columnName] !== undefined) { if (item[columnName] !== undefined) {
return item[columnName]; return item[columnName];
} }