console.log 주석 처리 - 개발환경 정리
- menu, company, screenMng, i18n, tableMng 모듈 console 주석 처리 - 총 55개 파일 수정 - 빌드 에러 수정 완료 - 백엔드 서버 정상 작동 확인 관련 파일: - frontend/components/admin/MenuManagement.tsx - frontend/components/admin/MenuFormModal.tsx - frontend/components/admin/ScreenAssignmentTab.tsx - frontend/components/admin/CompanyTable.tsx - frontend/components/admin/MultiLang.tsx - frontend/app/(main)/admin/tableMng/page.tsx - 기타 screen 관련 컴포넌트 49개 파일
This commit is contained in:
@@ -112,7 +112,7 @@ const WidgetRenderer: React.FC<{ component: ComponentData }> = ({ component }) =
|
||||
const { widgetType, label, placeholder, required, readonly, columnName, style } = widget;
|
||||
|
||||
// 디버깅: 실제 widgetType 값 확인
|
||||
console.log("RealtimePreviewDynamic - widgetType:", widgetType, "columnName:", columnName);
|
||||
// console.log("RealtimePreviewDynamic - widgetType:", widgetType, "columnName:", columnName);
|
||||
|
||||
// 사용자가 테두리를 설정했는지 확인
|
||||
const hasCustomBorder = style && (style.borderWidth || style.borderStyle || style.borderColor || style.border);
|
||||
@@ -129,11 +129,11 @@ const WidgetRenderer: React.FC<{ component: ComponentData }> = ({ component }) =
|
||||
|
||||
// 파일 컴포넌트는 별도 로직에서 처리하므로 여기서는 제외
|
||||
if (isFileComponent(widget)) {
|
||||
console.log("🎯 RealtimePreview - 파일 컴포넌트 감지 (별도 처리):", {
|
||||
componentId: widget.id,
|
||||
widgetType: widgetType,
|
||||
isFileComponent: true
|
||||
});
|
||||
// console.log("🎯 RealtimePreview - 파일 컴포넌트 감지 (별도 처리):", {
|
||||
// componentId: widget.id,
|
||||
// widgetType: widgetType,
|
||||
// isFileComponent: true
|
||||
// });
|
||||
|
||||
return <div className="text-xs text-gray-500 p-2">파일 컴포넌트 (별도 렌더링)</div>;
|
||||
}
|
||||
@@ -154,7 +154,7 @@ const WidgetRenderer: React.FC<{ component: ComponentData }> = ({ component }) =
|
||||
/>
|
||||
);
|
||||
} catch (error) {
|
||||
console.error(`웹타입 "${widgetType}" 렌더링 실패:`, error);
|
||||
// console.error(`웹타입 "${widgetType}" 렌더링 실패:`, error);
|
||||
// 오류 발생 시 폴백으로 기본 input 렌더링
|
||||
return <Input type="text" {...commonProps} placeholder={`${widgetType} (렌더링 오류)`} />;
|
||||
}
|
||||
@@ -226,66 +226,66 @@ export const RealtimePreviewDynamic: React.FC<RealtimePreviewProps> = ({
|
||||
// 전역 파일 상태 변경 감지 (해당 컴포넌트만)
|
||||
useEffect(() => {
|
||||
const handleGlobalFileStateChange = (event: CustomEvent) => {
|
||||
console.log("🎯🎯🎯 RealtimePreview 이벤트 수신:", {
|
||||
eventComponentId: event.detail.componentId,
|
||||
currentComponentId: component.id,
|
||||
isMatch: event.detail.componentId === component.id,
|
||||
filesCount: event.detail.files?.length || 0,
|
||||
action: event.detail.action,
|
||||
delayed: event.detail.delayed || false,
|
||||
attempt: event.detail.attempt || 1,
|
||||
eventDetail: event.detail
|
||||
});
|
||||
// console.log("🎯🎯🎯 RealtimePreview 이벤트 수신:", {
|
||||
// eventComponentId: event.detail.componentId,
|
||||
// currentComponentId: component.id,
|
||||
// isMatch: event.detail.componentId === component.id,
|
||||
// filesCount: event.detail.files?.length || 0,
|
||||
// action: event.detail.action,
|
||||
// delayed: event.detail.delayed || false,
|
||||
// attempt: event.detail.attempt || 1,
|
||||
// eventDetail: event.detail
|
||||
// });
|
||||
|
||||
if (event.detail.componentId === component.id) {
|
||||
console.log("✅✅✅ RealtimePreview 파일 상태 변경 감지 - 리렌더링 시작:", {
|
||||
componentId: component.id,
|
||||
filesCount: event.detail.files?.length || 0,
|
||||
action: event.detail.action,
|
||||
oldTrigger: fileUpdateTrigger,
|
||||
delayed: event.detail.delayed || false,
|
||||
attempt: event.detail.attempt || 1
|
||||
});
|
||||
// console.log("✅✅✅ RealtimePreview 파일 상태 변경 감지 - 리렌더링 시작:", {
|
||||
// componentId: component.id,
|
||||
// filesCount: event.detail.files?.length || 0,
|
||||
// action: event.detail.action,
|
||||
// oldTrigger: fileUpdateTrigger,
|
||||
// delayed: event.detail.delayed || false,
|
||||
// attempt: event.detail.attempt || 1
|
||||
// });
|
||||
setFileUpdateTrigger(prev => {
|
||||
const newTrigger = prev + 1;
|
||||
console.log("🔄🔄🔄 fileUpdateTrigger 업데이트:", {
|
||||
old: prev,
|
||||
new: newTrigger,
|
||||
componentId: component.id,
|
||||
attempt: event.detail.attempt || 1
|
||||
});
|
||||
// console.log("🔄🔄🔄 fileUpdateTrigger 업데이트:", {
|
||||
// old: prev,
|
||||
// new: newTrigger,
|
||||
// componentId: component.id,
|
||||
// attempt: event.detail.attempt || 1
|
||||
// });
|
||||
return newTrigger;
|
||||
});
|
||||
} else {
|
||||
console.log("❌ 컴포넌트 ID 불일치:", {
|
||||
eventComponentId: event.detail.componentId,
|
||||
currentComponentId: component.id
|
||||
});
|
||||
// console.log("❌ 컴포넌트 ID 불일치:", {
|
||||
// eventComponentId: event.detail.componentId,
|
||||
// currentComponentId: component.id
|
||||
// });
|
||||
}
|
||||
};
|
||||
|
||||
// 강제 업데이트 함수 등록
|
||||
const forceUpdate = (componentId: string, files: any[]) => {
|
||||
console.log("🔥🔥🔥 RealtimePreview 강제 업데이트 호출:", {
|
||||
targetComponentId: componentId,
|
||||
currentComponentId: component.id,
|
||||
isMatch: componentId === component.id,
|
||||
filesCount: files.length
|
||||
});
|
||||
// console.log("🔥🔥🔥 RealtimePreview 강제 업데이트 호출:", {
|
||||
// targetComponentId: componentId,
|
||||
// currentComponentId: component.id,
|
||||
// isMatch: componentId === component.id,
|
||||
// filesCount: files.length
|
||||
// });
|
||||
|
||||
if (componentId === component.id) {
|
||||
console.log("✅✅✅ RealtimePreview 강제 업데이트 적용:", {
|
||||
componentId: component.id,
|
||||
filesCount: files.length,
|
||||
oldTrigger: fileUpdateTrigger
|
||||
});
|
||||
// console.log("✅✅✅ RealtimePreview 강제 업데이트 적용:", {
|
||||
// componentId: component.id,
|
||||
// filesCount: files.length,
|
||||
// oldTrigger: fileUpdateTrigger
|
||||
// });
|
||||
setFileUpdateTrigger(prev => {
|
||||
const newTrigger = prev + 1;
|
||||
console.log("🔄🔄🔄 강제 fileUpdateTrigger 업데이트:", {
|
||||
old: prev,
|
||||
new: newTrigger,
|
||||
componentId: component.id
|
||||
});
|
||||
// console.log("🔄🔄🔄 강제 fileUpdateTrigger 업데이트:", {
|
||||
// old: prev,
|
||||
// new: newTrigger,
|
||||
// componentId: component.id
|
||||
// });
|
||||
return newTrigger;
|
||||
});
|
||||
}
|
||||
@@ -300,14 +300,14 @@ export const RealtimePreviewDynamic: React.FC<RealtimePreviewProps> = ({
|
||||
(window as any).forceRealtimePreviewUpdate = forceUpdate;
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn("RealtimePreview 이벤트 리스너 등록 실패:", error);
|
||||
// console.warn("RealtimePreview 이벤트 리스너 등록 실패:", error);
|
||||
}
|
||||
|
||||
return () => {
|
||||
try {
|
||||
window.removeEventListener('globalFileStateChanged', handleGlobalFileStateChange as EventListener);
|
||||
} catch (error) {
|
||||
console.warn("RealtimePreview 이벤트 리스너 제거 실패:", error);
|
||||
// console.warn("RealtimePreview 이벤트 리스너 제거 실패:", error);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -423,16 +423,16 @@ export const RealtimePreviewDynamic: React.FC<RealtimePreviewProps> = ({
|
||||
// 최신 파일 정보 사용 (전역 상태 > 컴포넌트 속성)
|
||||
const currentFiles = globalFiles.length > 0 ? globalFiles : uploadedFiles;
|
||||
|
||||
console.log("🔍 RealtimePreview 파일 컴포넌트 렌더링:", {
|
||||
componentId: component.id,
|
||||
uploadedFilesCount: uploadedFiles.length,
|
||||
globalFilesCount: globalFiles.length,
|
||||
currentFilesCount: currentFiles.length,
|
||||
currentFiles: currentFiles.map((f: any) => ({ objid: f.objid, name: f.realFileName || f.name })),
|
||||
componentType: component.type,
|
||||
fileUpdateTrigger: fileUpdateTrigger,
|
||||
timestamp: new Date().toISOString()
|
||||
});
|
||||
// console.log("🔍 RealtimePreview 파일 컴포넌트 렌더링:", {
|
||||
// componentId: component.id,
|
||||
// uploadedFilesCount: uploadedFiles.length,
|
||||
// globalFilesCount: globalFiles.length,
|
||||
// currentFilesCount: currentFiles.length,
|
||||
// currentFiles: currentFiles.map((f: any) => ({ objid: f.objid, name: f.realFileName || f.name })),
|
||||
// componentType: component.type,
|
||||
// fileUpdateTrigger: fileUpdateTrigger,
|
||||
// timestamp: new Date().toISOString()
|
||||
// });
|
||||
|
||||
return (
|
||||
<div key={`file-component-${component.id}-${fileUpdateTrigger}`} className="flex h-full flex-col">
|
||||
|
||||
Reference in New Issue
Block a user