feat: Implement entity join functionality in V2Repeater and configuration panel

- Added support for entity joins in the V2Repeater component, allowing for automatic resolution of foreign key references to display data from related tables.
- Introduced a new `resolveEntityJoins` function to handle the fetching and mapping of reference data based on configured entity joins.
- Enhanced the V2RepeaterConfigPanel to manage entity join configurations, including loading available columns and toggling join settings.
- Updated the data handling logic to incorporate mapping rules for incoming data, ensuring that only necessary fields are retained during processing.
- Improved user experience by providing clear logging and feedback during entity join resolution and data mapping operations.
This commit is contained in:
kjs
2026-03-04 21:08:45 +09:00
parent f97edad1ea
commit ac2da7a1d7
10 changed files with 813 additions and 31 deletions

View File

@@ -468,6 +468,11 @@ export function UniversalFormModalComponent({
console.log(`[UniversalFormModal] 원본 그룹 데이터 병합: ${originalGroupedData.length}`);
}
// 분할패널에서 전달한 메인 레코드 ID 전달
if (latestFormData._mainRecordId) {
event.detail.formData._mainRecordId = latestFormData._mainRecordId;
}
// 🆕 부모 formData의 중첩 객체(modalKey)도 최신 데이터로 업데이트
// onChange(setTimeout)가 아직 부모에 전파되지 않았을 수 있으므로 직접 업데이트
for (const parentKey of Object.keys(event.detail.formData)) {
@@ -993,6 +998,11 @@ export function UniversalFormModalComponent({
}
}
// 분할패널에서 전달한 메인 레코드 ID 보존
if (effectiveInitialData?._mainRecordId) {
newFormData._mainRecordId = effectiveInitialData._mainRecordId;
}
setFormData(newFormData);
formDataRef.current = newFormData;
setRepeatSections(newRepeatSections);