엔티티컬럼 표시설정 수정

This commit is contained in:
kjs
2025-12-17 17:41:29 +09:00
parent e50ddd03d3
commit 3589e4a5b9
15 changed files with 90 additions and 59 deletions

View File

@@ -4104,13 +4104,14 @@ export const TableListComponent: React.FC<TableListComponentProps> = ({
// 선택된 컬럼들의 값을 구분자로 조합
const values = displayColumns
.map((colName: string) => {
// 1. 먼저 직접 컬럼명으로 시도 (기본 테이블 컬럼인 경우)
let cellValue = rowData[colName];
// 🎯 백엔드 alias 규칙: ${sourceColumn}_${displayColumn}
// 예: manager 컬럼에서 user_name 선택 시 → manager_user_name
const joinedKey = `${column.columnName}_${colName}`;
let cellValue = rowData[joinedKey];
// 2. 없으면 ${sourceColumn}_${colName} 형식으로 시도 (조인 테이블 컬럼인 경우)
// fallback: 직접 컬럼명으로 시도 (기본 테이블 컬럼인 경우)
if (cellValue === null || cellValue === undefined) {
const joinedKey = `${column.columnName}_${colName}`;
cellValue = rowData[joinedKey];
cellValue = rowData[colName];
}
if (cellValue === null || cellValue === undefined) return "";