[agent-pipeline] rollback to 2b4500a9
This commit is contained in:
parent
87a7431e53
commit
cc51ad71da
|
|
@ -77,17 +77,9 @@ interface CategoryValueOption {
|
|||
valueLabel: string;
|
||||
}
|
||||
|
||||
// ─── 하위 호환: 기존 config에서 fieldType 추론 (우선순위: 컴포넌트구조 > DB값 > 사용자 fieldType > saved config > 기본값) ───
|
||||
// ─── 하위 호환: 기존 config에서 fieldType 추론 (우선순위: DB값 > 사용자 fieldType > 컴포넌트구조 > saved config > 기본값) ───
|
||||
function resolveFieldType(config: Record<string, any>, componentType?: string, metaInputType?: string): FieldType {
|
||||
// (a) v2-select 계열: componentType 또는 config.source 우선 (metaInputType보다 먼저 체크)
|
||||
if (componentType === "v2-select" || config.source) {
|
||||
const source = config.source === "code" ? "category" : config.source;
|
||||
if (source === "entity") return "entity";
|
||||
if (source === "category") return "category";
|
||||
return "select";
|
||||
}
|
||||
|
||||
// (b) metaInputType: DB 전용 (undefined면 스킵, V2PropertiesPanel에서 dbInputType만 전달)
|
||||
// (a) metaInputType: DB 전용 (undefined면 스킵, V2PropertiesPanel에서 dbInputType만 전달)
|
||||
if (metaInputType && metaInputType !== "direct" && metaInputType !== "auto") {
|
||||
const dbType = metaInputType as FieldType;
|
||||
if (["text", "number", "textarea", "numbering", "select", "category", "entity"].includes(dbType)) {
|
||||
|
|
@ -95,9 +87,17 @@ function resolveFieldType(config: Record<string, any>, componentType?: string, m
|
|||
}
|
||||
}
|
||||
|
||||
// (c) 사용자가 설정 패널에서 직접 선택한 fieldType
|
||||
// (b) 사용자가 설정 패널에서 직접 선택한 fieldType
|
||||
if (config.fieldType) return config.fieldType as FieldType;
|
||||
|
||||
// (c) v2-select 계열: componentType 또는 config.source 기반
|
||||
if (componentType === "v2-select" || config.source) {
|
||||
const source = config.source === "code" ? "category" : config.source;
|
||||
if (source === "entity") return "entity";
|
||||
if (source === "category") return "category";
|
||||
return "select";
|
||||
}
|
||||
|
||||
// (d) saved config fallback (config.inputType / config.type)
|
||||
const it = config.inputType || config.type;
|
||||
if (it === "number") return "number";
|
||||
|
|
|
|||
Loading…
Reference in New Issue