엑셀 업로드,다운로드 기능 개선
This commit is contained in:
@@ -135,6 +135,13 @@ export const SplitPanelLayoutComponent: React.FC<SplitPanelLayoutComponentProps>
|
||||
if (item[underscoreKey] !== undefined) {
|
||||
return item[underscoreKey];
|
||||
}
|
||||
|
||||
// 6️⃣ 🆕 모든 키에서 _fieldName으로 끝나는 키 찾기
|
||||
// 예: partner_id_customer_name (프론트엔드가 customer_id로 추론했지만 실제는 partner_id인 경우)
|
||||
const matchingKey = Object.keys(item).find((key) => key.endsWith(`_${fieldName}`));
|
||||
if (matchingKey && item[matchingKey] !== undefined) {
|
||||
return item[matchingKey];
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user