feat: enhance data mapping and entity join handling in components
- Updated ButtonPrimaryComponent to utilize entity join metadata for improved data mapping. - Introduced getEntityJoinColumns method in TableListComponent to retrieve entity join column metadata. - Enhanced applyMappingRules function to support optional entity join columns, allowing for more flexible data resolution. - Added utility functions to build join alias maps and resolve values from entity joins, improving data handling capabilities. These enhancements aim to provide a more robust and dynamic data mapping experience, facilitating better integration of entity relationships in the application.
This commit is contained in:
@@ -938,8 +938,14 @@ export const ButtonPrimaryComponent: React.FC<ButtonPrimaryComponentProps> = ({
|
||||
effectiveMappingRules = multiTableMappings[0]?.mappingRules || [];
|
||||
}
|
||||
|
||||
// 소스 DataProvider에서 엔티티 조인 메타데이터 가져오기
|
||||
const entityJoinColumns = sourceProvider?.getEntityJoinColumns?.() || [];
|
||||
if (entityJoinColumns.length > 0) {
|
||||
console.log(`🔗 [ButtonPrimary] 엔티티 조인 메타데이터 ${entityJoinColumns.length}개 감지`, entityJoinColumns);
|
||||
}
|
||||
|
||||
const mappedData = sourceData.map((row) => {
|
||||
const mappedRow = applyMappingRules(row, effectiveMappingRules);
|
||||
const mappedRow = applyMappingRules(row, effectiveMappingRules, entityJoinColumns);
|
||||
|
||||
return {
|
||||
...mappedRow,
|
||||
|
||||
Reference in New Issue
Block a user