[agent-pipeline] pipe-20260311182531-f443 round-4
This commit is contained in:
parent
eb354f1918
commit
465395c162
|
|
@ -292,16 +292,34 @@ export const V2ItemRoutingConfigPanel: React.FC<V2ItemRoutingConfigPanelProps> =
|
|||
loadTables();
|
||||
}, []);
|
||||
|
||||
const dispatchConfigEvent = (newConfig: Partial<ItemRoutingConfig>) => {
|
||||
if (typeof window !== "undefined") {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent("componentConfigChanged", {
|
||||
detail: { config: { ...config, ...newConfig } },
|
||||
})
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const update = (partial: Partial<ItemRoutingConfig>) => {
|
||||
onChange({ ...configProp, ...partial });
|
||||
const merged = { ...configProp, ...partial };
|
||||
onChange(merged);
|
||||
dispatchConfigEvent(partial);
|
||||
};
|
||||
|
||||
const updateDataSource = (field: string, value: string) => {
|
||||
update({ dataSource: { ...config.dataSource, [field]: value } });
|
||||
const newDataSource = { ...config.dataSource, [field]: value };
|
||||
const partial = { dataSource: newDataSource };
|
||||
onChange({ ...configProp, ...partial });
|
||||
dispatchConfigEvent(partial);
|
||||
};
|
||||
|
||||
const updateModals = (field: string, value?: number) => {
|
||||
update({ modals: { ...config.modals, [field]: value } });
|
||||
const newModals = { ...config.modals, [field]: value };
|
||||
const partial = { modals: newModals };
|
||||
onChange({ ...configProp, ...partial });
|
||||
dispatchConfigEvent(partial);
|
||||
};
|
||||
|
||||
// 공정 컬럼 관리
|
||||
|
|
|
|||
Loading…
Reference in New Issue