diff --git a/frontend/components/screen/ScreenDesigner.tsx b/frontend/components/screen/ScreenDesigner.tsx index 410ed46e..c10e9bff 100644 --- a/frontend/components/screen/ScreenDesigner.tsx +++ b/frontend/components/screen/ScreenDesigner.tsx @@ -3329,14 +3329,6 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD }); } - if (newComponent.type === "group") { - console.log("๐Ÿ”“ ๊ทธ๋ฃน ์ปดํฌ๋„ŒํŠธ๋Š” ๊ฒฉ์ž ์Šค๋ƒ… ์ œ์™ธ:", { - type: newComponent.type, - position: newComponent.position, - size: newComponent.size, - }); - } - const newLayout = { ...layout, components: [...layout.components, newComponent], @@ -3508,27 +3500,6 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD componentsToMove = [...componentsToMove, ...additionalComponents]; } - // console.log("๋“œ๋ž˜๊ทธ ์‹œ์ž‘:", component.id, "์ด๋™ํ•  ์ปดํฌ๋„ŒํŠธ ์ˆ˜:", componentsToMove.length); - console.log("๋งˆ์šฐ์Šค ์œ„์น˜ (์คŒ ๋ณด์ •):", { - zoomLevel, - clientX: event.clientX, - clientY: event.clientY, - rectLeft: rect.left, - rectTop: rect.top, - mouseRaw: { x: event.clientX - rect.left, y: event.clientY - rect.top }, - mouseZoomCorrected: { x: relativeMouseX, y: relativeMouseY }, - componentX: component.position.x, - componentY: component.position.y, - grabOffsetX: relativeMouseX - component.position.x, - grabOffsetY: relativeMouseY - component.position.y, - }); - - console.log("๐Ÿš€ ๋“œ๋ž˜๊ทธ ์‹œ์ž‘:", { - componentId: component.id, - componentType: component.type, - initialPosition: { x: component.position.x, y: component.position.y }, - }); - setDragState({ isDragging: true, draggedComponent: component, // ์ฃผ ๋“œ๋ž˜๊ทธ ์ปดํฌ๋„ŒํŠธ (๋งˆ์šฐ์Šค ์œ„์น˜ ๊ธฐ์ค€) @@ -3581,27 +3552,11 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD }; // ๋“œ๋ž˜๊ทธ ์ƒํƒœ ์—…๋ฐ์ดํŠธ - console.log("๐Ÿ”ฅ ScreenDesigner updateDragPosition (์คŒ ๋ณด์ •):", { - zoomLevel, - draggedComponentId: dragState.draggedComponent.id, - mouseRaw: { x: event.clientX - rect.left, y: event.clientY - rect.top }, - mouseZoomCorrected: { x: relativeMouseX, y: relativeMouseY }, - oldPosition: dragState.currentPosition, - newPosition: newPosition, - }); - setDragState((prev) => { const newState = { ...prev, currentPosition: { ...newPosition }, // ์ƒˆ๋กœ์šด ๊ฐ์ฒด ์ƒ์„ฑ }; - console.log("๐Ÿ”„ ScreenDesigner dragState ์—…๋ฐ์ดํŠธ:", { - prevPosition: prev.currentPosition, - newPosition: newState.currentPosition, - stateChanged: - prev.currentPosition.x !== newState.currentPosition.x || - prev.currentPosition.y !== newState.currentPosition.y, - }); return newState; }); @@ -3646,13 +3601,6 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD }, ); - console.log("๐ŸŽฏ ๊ฒฉ์ž ์Šค๋ƒ… ์ ์šฉ๋จ:", { - componentType: draggedComponent?.type, - resolution: `${screenResolution.width}x${screenResolution.height}`, - originalPosition: dragState.currentPosition, - snappedPosition: finalPosition, - columnWidth: currentGridInfo.columnWidth, - }); } // ์Šค๋ƒ…์œผ๋กœ ์ธํ•œ ์ถ”๊ฐ€ ์ด๋™ ๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ @@ -3717,28 +3665,6 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD height: snappedHeight, }; - console.log("๐ŸŽฏ ๋“œ๋ž˜๊ทธ ์ข…๋ฃŒ ์‹œ ๊ทธ๋ฃน ๋‚ด๋ถ€ ์ปดํฌ๋„ŒํŠธ ๊ฒฉ์ž ์Šค๋ƒ… (ํŒจ๋”ฉ ๊ณ ๋ ค):", { - componentId: comp.id, - parentId: comp.parentId, - beforeSnap: { - x: originalComponent.position.x + totalDeltaX, - y: originalComponent.position.y + totalDeltaY, - }, - calculation: { - effectiveX, - effectiveY, - columnIndex, - rowIndex, - columnWidth, - fullColumnWidth, - widthInColumns, - gap: gap || 16, - padding, - }, - afterSnap: newPosition, - afterSizeSnap: newSize, - }); - return { ...comp, position: newPosition as Position, diff --git a/frontend/components/screen/config-panels/ButtonConfigPanel.tsx b/frontend/components/screen/config-panels/ButtonConfigPanel.tsx index fd35428a..85d59391 100644 --- a/frontend/components/screen/config-panels/ButtonConfigPanel.tsx +++ b/frontend/components/screen/config-panels/ButtonConfigPanel.tsx @@ -65,6 +65,7 @@ export const ButtonConfigPanel: React.FC = ({ // ๋กœ์ปฌ ์ƒํƒœ ๊ด€๋ฆฌ (์‹ค์‹œ๊ฐ„ ์ž…๋ ฅ ๋ฐ˜์˜) const [localInputs, setLocalInputs] = useState({ text: config.text !== undefined ? config.text : "๋ฒ„ํŠผ", + actionType: String(config.action?.type || "save"), modalTitle: String(config.action?.modalTitle || ""), modalDescription: String(config.action?.modalDescription || ""), editModalTitle: String(config.action?.editModalTitle || ""), @@ -135,13 +136,8 @@ export const ButtonConfigPanel: React.FC = ({ // "flow-widget" ์ฒดํฌ const isFlow = compType === "flow-widget" || compType?.toLowerCase().includes("flow"); - - if (isFlow) { - console.log("โœ… ํ”Œ๋กœ์šฐ ์œ„์ ฏ ๋ฐœ๊ฒฌ!", { id: comp.id, componentType: comp.componentType }); - } return isFlow; }); - console.log("๐ŸŽฏ ํ”Œ๋กœ์šฐ ์œ„์ ฏ ์กด์žฌ ์—ฌ๋ถ€:", found); return found; }, [allComponents]); @@ -152,6 +148,7 @@ export const ButtonConfigPanel: React.FC = ({ setLocalInputs({ text: latestConfig.text !== undefined ? latestConfig.text : "๋ฒ„ํŠผ", + actionType: String(latestAction.type || "save"), modalTitle: String(latestAction.modalTitle || ""), modalDescription: String(latestAction.modalDescription || ""), editModalTitle: String(latestAction.editModalTitle || ""), @@ -168,7 +165,7 @@ export const ButtonConfigPanel: React.FC = ({ setTitleBlocks([]); } // eslint-disable-next-line react-hooks/exhaustive-deps - }, [component.id]); + }, [component.id, component.componentConfig?.action?.type]); // ๐Ÿ†• ์ œ๋ชฉ ๋ธ”๋ก ํ•ธ๋“ค๋Ÿฌ const addTextBlock = () => { @@ -251,7 +248,6 @@ export const ButtonConfigPanel: React.FC = ({ label: table.displayName || table.tableName, })); setAvailableTables(tables); - console.log("โœ… ์ „์ฒด ํ…Œ์ด๋ธ” ๋ชฉ๋ก ๋กœ๋“œ ์„ฑ๊ณต:", tables.length); } } catch (error) { console.error("ํ…Œ์ด๋ธ” ๋ชฉ๋ก ๋กœ๋“œ ์‹คํŒจ:", error); @@ -777,14 +773,6 @@ export const ButtonConfigPanel: React.FC = ({ ); }; - // console.log("๐Ÿ”ง config-panels/ButtonConfigPanel ๋ Œ๋”๋ง:", { - // component, - // config, - // action: config.action, - // actionType: config.action?.type, - // screensCount: screens.length, - // }); - return (
@@ -804,9 +792,11 @@ export const ButtonConfigPanel: React.FC = ({