chore: TableListComponent 디버그 로그 제거
- 숫자 포맷팅 확인 완료 - column_labels 테이블 조회로 정확한 input_type 가져오기 검증 완료
This commit is contained in:
parent
8a77e6d33c
commit
dcf07fdd5e
|
|
@ -287,11 +287,9 @@ export const TableListComponent: React.FC<TableListComponentProps> = ({
|
|||
|
||||
// 컬럼 입력 타입 정보 가져오기
|
||||
const inputTypes = await tableTypeApi.getColumnInputTypes(tableConfig.selectedTable);
|
||||
console.log("📋 테이블의 inputType 정보:", tableConfig.selectedTable, inputTypes);
|
||||
const inputTypeMap: Record<string, string> = {};
|
||||
inputTypes.forEach((col: any) => {
|
||||
inputTypeMap[col.columnName] = col.inputType;
|
||||
console.log(` - ${col.columnName}: ${col.inputType}`);
|
||||
});
|
||||
|
||||
tableColumnCache.set(cacheKey, {
|
||||
|
|
@ -661,7 +659,6 @@ export const TableListComponent: React.FC<TableListComponentProps> = ({
|
|||
// inputType 기반 포맷팅 (columnMeta에서 가져온 inputType 우선)
|
||||
const inputType = meta?.inputType || column.inputType;
|
||||
if (inputType === "number" || inputType === "decimal") {
|
||||
console.log(`✅ 숫자 포맷팅 적용: ${column.columnName} = ${value} (inputType: ${inputType})`);
|
||||
if (value !== null && value !== undefined && value !== "") {
|
||||
const numValue = typeof value === "string" ? parseFloat(value) : value;
|
||||
if (!isNaN(numValue)) {
|
||||
|
|
@ -669,12 +666,6 @@ export const TableListComponent: React.FC<TableListComponentProps> = ({
|
|||
}
|
||||
}
|
||||
return String(value);
|
||||
} else if (value !== null && value !== undefined && value !== "") {
|
||||
// 숫자처럼 보이지만 inputType이 설정 안된 경우
|
||||
const numValue = typeof value === "string" ? parseFloat(value) : value;
|
||||
if (!isNaN(numValue) && typeof value === "string" && /^\d+$/.test(value)) {
|
||||
console.log(`⚠️ ${column.columnName}은 숫자 값이지만 inputType이 '${inputType}'로 설정되어 있어 포맷팅 안 됨`);
|
||||
}
|
||||
}
|
||||
|
||||
switch (column.format) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue