debug: 제어관리 실행 디버깅 로그 추가

- 제어관리가 실행되지 않는 원인을 파악하기 위한 상세 로그 추가
- 각 컴포넌트의 타입, 액션, 제어관리 설정 여부 출력
- 제어관리 설정이 없는 경우 명시적인 로그 출력
- 조건 불만족 시 어떤 조건이 맞지 않는지 확인 가능
This commit is contained in:
kjs 2025-10-31 17:12:29 +09:00
parent 3d6ce26f9d
commit 27d278ca8c
1 changed files with 16 additions and 0 deletions

View File

@ -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);
// 에러를 다시 던지지 않음 - 메인 저장 프로세스에 영향 주지 않기 위해