컴포넌트 리뉴얼 1.0
This commit is contained in:
@@ -1658,10 +1658,16 @@ export class ScreenManagementService {
|
||||
? inputTypeMap.get(`${tableName}.${columnName}`)
|
||||
: null;
|
||||
|
||||
// 🆕 Unified 컴포넌트는 덮어쓰지 않음 (새로운 컴포넌트 시스템 보호)
|
||||
const savedComponentType = properties?.componentType;
|
||||
const isUnifiedComponent = savedComponentType?.startsWith("unified-");
|
||||
|
||||
const component = {
|
||||
id: layout.component_id,
|
||||
// 🔥 최신 componentType이 있으면 type 덮어쓰기
|
||||
type: latestTypeInfo?.componentType || layout.component_type as any,
|
||||
// 🔥 최신 componentType이 있으면 type 덮어쓰기 (단, Unified 컴포넌트는 제외)
|
||||
type: isUnifiedComponent
|
||||
? layout.component_type as any // Unified는 저장된 값 유지
|
||||
: (latestTypeInfo?.componentType || layout.component_type as any),
|
||||
position: {
|
||||
x: layout.position_x,
|
||||
y: layout.position_y,
|
||||
@@ -1670,8 +1676,8 @@ export class ScreenManagementService {
|
||||
size: { width: layout.width, height: layout.height },
|
||||
parentId: layout.parent_id,
|
||||
...properties,
|
||||
// 🔥 최신 inputType이 있으면 widgetType, componentType 덮어쓰기
|
||||
...(latestTypeInfo && {
|
||||
// 🔥 최신 inputType이 있으면 widgetType, componentType 덮어쓰기 (단, Unified 컴포넌트는 제외)
|
||||
...(!isUnifiedComponent && latestTypeInfo && {
|
||||
widgetType: latestTypeInfo.inputType,
|
||||
inputType: latestTypeInfo.inputType,
|
||||
componentType: latestTypeInfo.componentType,
|
||||
|
||||
Reference in New Issue
Block a user