[agent-pipeline] pipe-20260311182531-f443 round-3
This commit is contained in:
parent
a99a59951e
commit
eb354f1918
|
|
@ -134,6 +134,11 @@ export const V2CardDisplayConfigPanel: React.FC<V2CardDisplayConfigPanelProps> =
|
|||
}
|
||||
current[keys[keys.length - 1]] = value;
|
||||
onChange(newConfig);
|
||||
if (typeof window !== "undefined") {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent("componentConfigChanged", { detail: { config: newConfig } })
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
// 테이블 목록 로드
|
||||
|
|
@ -214,25 +219,17 @@ export const V2CardDisplayConfigPanel: React.FC<V2CardDisplayConfigPanelProps> =
|
|||
fetchEntityJoinColumns();
|
||||
}, [targetTableName]);
|
||||
|
||||
const handleTableSelect = (tableName: string, isScreenTable: boolean) => {
|
||||
if (isScreenTable) {
|
||||
onChange({
|
||||
...config,
|
||||
useCustomTable: false,
|
||||
customTableName: undefined,
|
||||
tableName: tableName,
|
||||
columnMapping: { displayColumns: [] },
|
||||
});
|
||||
} else {
|
||||
onChange({
|
||||
...config,
|
||||
useCustomTable: true,
|
||||
customTableName: tableName,
|
||||
tableName: tableName,
|
||||
columnMapping: { displayColumns: [] },
|
||||
});
|
||||
}
|
||||
const handleTableSelect = (selectedTable: string, isScreenTable: boolean) => {
|
||||
const newConfig = isScreenTable
|
||||
? { ...config, useCustomTable: false, customTableName: undefined, tableName: selectedTable, columnMapping: { displayColumns: [] } }
|
||||
: { ...config, useCustomTable: true, customTableName: selectedTable, tableName: selectedTable, columnMapping: { displayColumns: [] } };
|
||||
onChange(newConfig);
|
||||
setTableComboboxOpen(false);
|
||||
if (typeof window !== "undefined") {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent("componentConfigChanged", { detail: { config: newConfig } })
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const getSelectedTableDisplay = () => {
|
||||
|
|
@ -241,7 +238,6 @@ export const V2CardDisplayConfigPanel: React.FC<V2CardDisplayConfigPanelProps> =
|
|||
return found?.displayName || targetTableName;
|
||||
};
|
||||
|
||||
// 컬럼 선택 시 조인 컬럼이면 joinColumns도 업데이트
|
||||
const handleColumnSelect = (path: string, columnName: string) => {
|
||||
const joinColumn = entityJoinColumns.availableColumns.find(
|
||||
(col) => col.joinAlias === columnName
|
||||
|
|
@ -261,11 +257,17 @@ export const V2CardDisplayConfigPanel: React.FC<V2CardDisplayConfigPanelProps> =
|
|||
referenceColumn: joinColumn.columnName,
|
||||
isJoinColumn: true,
|
||||
};
|
||||
onChange({
|
||||
const newConfig = {
|
||||
...config,
|
||||
columnMapping: { ...config.columnMapping, [path.split(".")[1]]: columnName },
|
||||
joinColumns: [...joinColumnsConfig, newJoinColumnConfig],
|
||||
});
|
||||
};
|
||||
onChange(newConfig);
|
||||
if (typeof window !== "undefined") {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent("componentConfigChanged", { detail: { config: newConfig } })
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -298,7 +300,7 @@ export const V2CardDisplayConfigPanel: React.FC<V2CardDisplayConfigPanelProps> =
|
|||
const joinTableInfo = entityJoinColumns.joinTables?.find(
|
||||
(jt) => jt.tableName === joinColumn.tableName
|
||||
);
|
||||
onChange({
|
||||
const newConfig = {
|
||||
...config,
|
||||
columnMapping: { ...config.columnMapping, displayColumns: current },
|
||||
joinColumns: [
|
||||
|
|
@ -312,7 +314,13 @@ export const V2CardDisplayConfigPanel: React.FC<V2CardDisplayConfigPanelProps> =
|
|||
isJoinColumn: true,
|
||||
},
|
||||
],
|
||||
});
|
||||
};
|
||||
onChange(newConfig);
|
||||
if (typeof window !== "undefined") {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent("componentConfigChanged", { detail: { config: newConfig } })
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,13 @@ export const V2CategoryManagerConfigPanel: React.FC<V2CategoryManagerConfigPanel
|
|||
};
|
||||
|
||||
const handleChange = <K extends keyof V2CategoryManagerConfig>(key: K, value: V2CategoryManagerConfig[K]) => {
|
||||
onChange({ ...config, [key]: value });
|
||||
const newConfig = { ...config, [key]: value };
|
||||
onChange(newConfig);
|
||||
if (typeof window !== "undefined") {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent("componentConfigChanged", { detail: { config: newConfig } })
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Reference in New Issue