이력테이블 기준 컬럼 설정 기능
This commit is contained in:
@@ -79,27 +79,13 @@ export function FlowWidget({
|
||||
const effectiveSteps = stepsArray || steps;
|
||||
|
||||
// 1순위: 플로우 스텝 기본 설정
|
||||
console.log(`🔍 [FlowWidget] steps 배열 상태:`, {
|
||||
stepsLength: effectiveSteps.length,
|
||||
stepsIds: effectiveSteps.map((s) => s.id),
|
||||
targetStepId: stepId,
|
||||
});
|
||||
|
||||
const currentStep = effectiveSteps.find((s) => s.id === stepId);
|
||||
console.log(`🔍 [FlowWidget] currentStep 찾기 (스텝 ${stepId}):`, {
|
||||
found: !!currentStep,
|
||||
hasDisplayConfig: !!currentStep?.displayConfig,
|
||||
displayConfig: currentStep?.displayConfig,
|
||||
displayConfigType: typeof currentStep?.displayConfig,
|
||||
});
|
||||
|
||||
if (currentStep?.displayConfig?.visibleColumns && currentStep.displayConfig.visibleColumns.length > 0) {
|
||||
console.log(`🎨 [FlowWidget] 플로우 기본 설정 적용 (스텝 ${stepId}):`, currentStep.displayConfig.visibleColumns);
|
||||
return currentStep.displayConfig.visibleColumns;
|
||||
}
|
||||
|
||||
// 2순위: 모든 컬럼 표시
|
||||
console.log(`🎨 [FlowWidget] 전체 컬럼 표시 (스텝 ${stepId}):`, allColumns);
|
||||
return allColumns;
|
||||
};
|
||||
|
||||
@@ -211,15 +197,6 @@ export function FlowWidget({
|
||||
}
|
||||
if (stepsResponse.data) {
|
||||
const sortedSteps = stepsResponse.data.sort((a: FlowStep, b: FlowStep) => a.stepOrder - b.stepOrder);
|
||||
console.log("📋 [FlowWidget] 스텝 목록 로드:", {
|
||||
stepsCount: sortedSteps.length,
|
||||
steps: sortedSteps.map((s: FlowStep) => ({
|
||||
id: s.id,
|
||||
name: s.stepName,
|
||||
hasDisplayConfig: !!s.displayConfig,
|
||||
displayConfig: s.displayConfig,
|
||||
})),
|
||||
});
|
||||
setSteps(sortedSteps);
|
||||
|
||||
// 연결 정보 조회
|
||||
@@ -246,11 +223,6 @@ export function FlowWidget({
|
||||
const firstStep = sortedSteps[0];
|
||||
setSelectedStepId(firstStep.id);
|
||||
setSelectedStep(flowComponentId, firstStep.id);
|
||||
console.log("✅ [FlowWidget] 첫 번째 단계 자동 선택:", {
|
||||
flowComponentId,
|
||||
stepId: firstStep.id,
|
||||
stepName: firstStep.stepName,
|
||||
});
|
||||
|
||||
// 첫 번째 스텝의 데이터 로드
|
||||
try {
|
||||
@@ -292,7 +264,6 @@ export function FlowWidget({
|
||||
// 🆕 언마운트 시 전역 상태 초기화
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
console.log("🧹 [FlowWidget] 언마운트 - 전역 상태 초기화:", flowComponentId);
|
||||
resetFlow(flowComponentId);
|
||||
};
|
||||
}, [flowComponentId, resetFlow]);
|
||||
@@ -314,7 +285,6 @@ export function FlowWidget({
|
||||
setStepDataPage(1); // 🆕 페이지 리셋
|
||||
onSelectedDataChange?.([], null);
|
||||
|
||||
console.log("🔄 [FlowWidget] 단계 선택 해제:", { flowComponentId, stepId });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -326,8 +296,6 @@ export function FlowWidget({
|
||||
setStepDataPage(1); // 🆕 페이지 리셋
|
||||
onSelectedDataChange?.([], stepId);
|
||||
|
||||
console.log("✅ [FlowWidget] 단계 선택:", { flowComponentId, stepId, stepName });
|
||||
|
||||
try {
|
||||
const response = await getStepDataList(flowId!, stepId, 1, 100);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user