diff --git a/backend-node/src/services/dynamicFormService.ts b/backend-node/src/services/dynamicFormService.ts index 8a943b96..e7a9a10f 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 = @@ -1377,9 +1389,37 @@ export class DynamicFormService { triggerType, }); - // ์ œ์–ด๊ด€๋ฆฌ ์‹คํ–‰ - const controlResult = - await this.dataflowControlService.executeDataflowControl( + // ๋…ธ๋“œ ํ”Œ๋กœ์šฐ ์‹คํ–‰ (relationshipId๊ฐ€ ์—†๋Š” ๊ฒฝ์šฐ ๋…ธ๋“œ ํ”Œ๋กœ์šฐ๋กœ ๊ฐ„์ฃผ) + let controlResult: any; + + if (!relationshipId) { + // ๋…ธ๋“œ ํ”Œ๋กœ์šฐ ์‹คํ–‰ + console.log(`๐Ÿš€ ๋…ธ๋“œ ํ”Œ๋กœ์šฐ ์‹คํ–‰ (flowId: ${diagramId})`); + const { NodeFlowExecutionService } = await import("./nodeFlowExecutionService"); + + const executionResult = await NodeFlowExecutionService.executeFlow(diagramId, { + sourceData: [savedData], + dataSourceType: "formData", + buttonId: "save-button", + screenId: screenId, + userId: userId, + formData: savedData, + }); + + controlResult = { + success: executionResult.success, + message: executionResult.message, + executedActions: executionResult.executedNodes?.map((node: any) => ({ + nodeId: node.nodeId, + status: node.status, + duration: node.duration, + })), + errors: executionResult.errors, + }; + } else { + // ๊ด€๊ณ„ ๊ธฐ๋ฐ˜ ์ œ์–ด๊ด€๋ฆฌ ์‹คํ–‰ + console.log(`๐ŸŽฏ ๊ด€๊ณ„ ๊ธฐ๋ฐ˜ ์ œ์–ด๊ด€๋ฆฌ ์‹คํ–‰ (relationshipId: ${relationshipId})`); + controlResult = await this.dataflowControlService.executeDataflowControl( diagramId, relationshipId, triggerType, @@ -1387,6 +1427,7 @@ export class DynamicFormService { tableName, userId ); + } console.log(`๐ŸŽฏ ์ œ์–ด๊ด€๋ฆฌ ์‹คํ–‰ ๊ฒฐ๊ณผ:`, controlResult); @@ -1417,6 +1458,10 @@ export class DynamicFormService { break; } } + + if (!controlConfigFound) { + console.log(`โ„น๏ธ ์ œ์–ด๊ด€๋ฆฌ ์„ค์ •์ด ์—†์Šต๋‹ˆ๋‹ค. (ํ™”๋ฉด ID: ${screenId})`); + } } catch (error) { console.error("โŒ ์ œ์–ด๊ด€๋ฆฌ ์„ค์ • ํ™•์ธ ๋ฐ ์‹คํ–‰ ์˜ค๋ฅ˜:", error); // ์—๋Ÿฌ๋ฅผ ๋‹ค์‹œ ๋˜์ง€์ง€ ์•Š์Œ - ๋ฉ”์ธ ์ €์žฅ ํ”„๋กœ์„ธ์Šค์— ์˜ํ–ฅ ์ฃผ์ง€ ์•Š๊ธฐ ์œ„ํ•ด diff --git a/backend-node/src/services/screenManagementService.ts b/backend-node/src/services/screenManagementService.ts index 198c850b..f3c3d133 100644 --- a/backend-node/src/services/screenManagementService.ts +++ b/backend-node/src/services/screenManagementService.ts @@ -1278,6 +1278,11 @@ export class ScreenManagementService { }, }; + // ๐Ÿ” ๋””๋ฒ„๊น…: webTypeConfig.dataflowConfig ํ™•์ธ + if ((component as any).webTypeConfig?.dataflowConfig) { + console.log(`๐Ÿ” ์ปดํฌ๋„ŒํŠธ ${component.id}์˜ dataflowConfig:`, JSON.stringify((component as any).webTypeConfig.dataflowConfig, null, 2)); + } + await query( `INSERT INTO screen_layouts ( screen_id, component_type, component_id, parent_id, diff --git a/frontend/components/screen/ScreenDesigner_new.tsx b/frontend/components/screen/ScreenDesigner_new.tsx index 16a50f3f..46c3ffdf 100644 --- a/frontend/components/screen/ScreenDesigner_new.tsx +++ b/frontend/components/screen/ScreenDesigner_new.tsx @@ -263,6 +263,18 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD try { setIsSaving(true); + + // ๐Ÿ” ๋””๋ฒ„๊น…: ์ €์žฅํ•  ๋ ˆ์ด์•„์›ƒ ๋ฐ์ดํ„ฐ ํ™•์ธ + console.log("๐Ÿ” ๋ ˆ์ด์•„์›ƒ ์ €์žฅ ์š”์ฒญ:", { + screenId: selectedScreen.screenId, + componentsCount: layout.components.length, + components: layout.components.map(c => ({ + id: c.id, + type: c.type, + webTypeConfig: (c as any).webTypeConfig, + })), + }); + const response = await screenApi.saveScreenLayout(selectedScreen.screenId, layout); if (response.success) { toast.success("ํ™”๋ฉด์ด ์ €์žฅ๋˜์—ˆ์Šต๋‹ˆ๋‹ค."); diff --git a/frontend/components/screen/config-panels/ImprovedButtonControlConfigPanel.tsx b/frontend/components/screen/config-panels/ImprovedButtonControlConfigPanel.tsx index 35e1befe..18a51bba 100644 --- a/frontend/components/screen/config-panels/ImprovedButtonControlConfigPanel.tsx +++ b/frontend/components/screen/config-panels/ImprovedButtonControlConfigPanel.tsx @@ -63,11 +63,17 @@ export const ImprovedButtonControlConfigPanel: React.FC { const selectedFlow = flows.find((f) => f.flowId.toString() === flowId); if (selectedFlow) { - onUpdateProperty("webTypeConfig.dataflowConfig.flowConfig", { - flowId: selectedFlow.flowId, - flowName: selectedFlow.flowName, - executionTiming: "before", // ๊ธฐ๋ณธ๊ฐ’ - contextData: {}, + // ์ „์ฒด dataflowConfig ์—…๋ฐ์ดํŠธ (selectedDiagramId ํฌํ•จ) + onUpdateProperty("webTypeConfig.dataflowConfig", { + ...dataflowConfig, + selectedDiagramId: selectedFlow.flowId, // ๋ฐฑ์—”๋“œ์—์„œ ์‚ฌ์šฉ + selectedRelationshipId: null, // ๋…ธ๋“œ ํ”Œ๋กœ์šฐ๋Š” ๊ด€๊ณ„ ID ๋ถˆํ•„์š” + flowConfig: { + flowId: selectedFlow.flowId, + flowName: selectedFlow.flowName, + executionTiming: "before", // ๊ธฐ๋ณธ๊ฐ’ + contextData: {}, + }, }); } }; diff --git a/frontend/lib/api/screen.ts b/frontend/lib/api/screen.ts index b8b77f85..695e5a51 100644 --- a/frontend/lib/api/screen.ts +++ b/frontend/lib/api/screen.ts @@ -151,6 +151,12 @@ export const screenApi = { await apiClient.post(`/screen-management/screens/${screenId}/layout`, layoutData); }, + // ํ™”๋ฉด ๋ ˆ์ด์•„์›ƒ ์ €์žฅ (ScreenDesigner_new.tsx์šฉ) + saveScreenLayout: async (screenId: number, layoutData: LayoutData): Promise> => { + const response = await apiClient.post(`/screen-management/screens/${screenId}/layout`, layoutData); + return response.data; + }, + // ํ™”๋ฉด ๋ ˆ์ด์•„์›ƒ ์กฐํšŒ getLayout: async (screenId: number): Promise => { const response = await apiClient.get(`/screen-management/screens/${screenId}/layout`); diff --git a/frontend/lib/registry/components/table-list/TableListComponent.tsx b/frontend/lib/registry/components/table-list/TableListComponent.tsx index 497b42b7..9ee27c36 100644 --- a/frontend/lib/registry/components/table-list/TableListComponent.tsx +++ b/frontend/lib/registry/components/table-list/TableListComponent.tsx @@ -874,7 +874,9 @@ export const TableListComponent: React.FC = ({
{tableConfig.showHeader && (
-

{tableConfig.title || tableLabel}

+

+ {tableConfig.title || tableLabel || finalSelectedTable} +

)} @@ -936,7 +938,9 @@ export const TableListComponent: React.FC = ({ {/* ํ—ค๋” */} {tableConfig.showHeader && (
-

{tableConfig.title || tableLabel}

+

+ {tableConfig.title || tableLabel || finalSelectedTable} +

)} diff --git a/frontend/lib/registry/components/table-list/TableListConfigPanel.tsx b/frontend/lib/registry/components/table-list/TableListConfigPanel.tsx index 6b977155..f268e625 100644 --- a/frontend/lib/registry/components/table-list/TableListConfigPanel.tsx +++ b/frontend/lib/registry/components/table-list/TableListConfigPanel.tsx @@ -727,6 +727,30 @@ export const TableListConfigPanel: React.FC = ({
ํ…Œ์ด๋ธ” ๋ฆฌ์ŠคํŠธ ์„ค์ •
+ {/* ํ…Œ์ด๋ธ” ์ œ๋ชฉ ์„ค์ • */} +
+
+

ํ…Œ์ด๋ธ” ์ œ๋ชฉ

+
+
+
+ + handleChange("title", e.target.value)} + placeholder="ํ…Œ์ด๋ธ” ์ œ๋ชฉ ์ž…๋ ฅ..." + className="h-8 text-xs" + /> +

+ ์šฐ์„ ์ˆœ์œ„: ์‚ฌ์šฉ์ž ์ž…๋ ฅ ์ œ๋ชฉ โ†’ ํ…Œ์ด๋ธ” ๋ผ๋ฒจ๋ช… โ†’ ํ…Œ์ด๋ธ”๋ช… +

+
+
+ {/* ๊ฐ€๋กœ ์Šคํฌ๋กค ๋ฐ ์ปฌ๋Ÿผ ๊ณ ์ • */}