From 27d278ca8ce2ed8aa0896dead59b21c23ea5a13a Mon Sep 17 00:00:00 2001 From: kjs Date: Fri, 31 Oct 2025 17:12:29 +0900 Subject: [PATCH] =?UTF-8?q?debug:=20=EC=A0=9C=EC=96=B4=EA=B4=80=EB=A6=AC?= =?UTF-8?q?=20=EC=8B=A4=ED=96=89=20=EB=94=94=EB=B2=84=EA=B9=85=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 제어관리가 실행되지 않는 원인을 파악하기 위한 상세 로그 추가 - 각 컴포넌트의 타입, 액션, 제어관리 설정 여부 출력 - 제어관리 설정이 없는 경우 명시적인 로그 출력 - 조건 불만족 시 어떤 조건이 맞지 않는지 확인 가능 --- backend-node/src/services/dynamicFormService.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/backend-node/src/services/dynamicFormService.ts b/backend-node/src/services/dynamicFormService.ts index 8a943b96..2955633f 100644 --- a/backend-node/src/services/dynamicFormService.ts +++ b/backend-node/src/services/dynamicFormService.ts @@ -1355,9 +1355,20 @@ export class DynamicFormService { console.log(`📋 화면 컴포넌트 조회 결과:`, screenLayouts.length); // 저장 버튼 중에서 제어관리가 활성화된 것 찾기 + let controlConfigFound = false; for (const layout of screenLayouts) { const properties = layout.properties as any; + // 디버깅: 모든 컴포넌트 정보 출력 + console.log(`🔍 컴포넌트 검사:`, { + componentId: layout.component_id, + componentType: properties?.componentType, + actionType: properties?.componentConfig?.action?.type, + enableDataflowControl: properties?.webTypeConfig?.enableDataflowControl, + hasDataflowConfig: !!properties?.webTypeConfig?.dataflowConfig, + hasDiagramId: !!properties?.webTypeConfig?.dataflowConfig?.selectedDiagramId, + }); + // 버튼 컴포넌트이고 저장 액션이며 제어관리가 활성화된 경우 if ( properties?.componentType === "button-primary" && @@ -1365,6 +1376,7 @@ export class DynamicFormService { properties?.webTypeConfig?.enableDataflowControl === true && properties?.webTypeConfig?.dataflowConfig?.selectedDiagramId ) { + controlConfigFound = true; const diagramId = properties.webTypeConfig.dataflowConfig.selectedDiagramId; const relationshipId = @@ -1417,6 +1429,10 @@ export class DynamicFormService { break; } } + + if (!controlConfigFound) { + console.log(`ℹ️ 제어관리 설정이 없습니다. (화면 ID: ${screenId})`); + } } catch (error) { console.error("❌ 제어관리 설정 확인 및 실행 오류:", error); // 에러를 다시 던지지 않음 - 메인 저장 프로세스에 영향 주지 않기 위해