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