From 521fcb19a95576a1b33c07a3c75455abfaa3ab97 Mon Sep 17 00:00:00 2001 From: Nikhil-Doye Date: Thu, 23 Oct 2025 14:48:09 -0400 Subject: [PATCH] Refactor database node configuration to unify operations under a single entry - Consolidated individual database operation configurations (query, insert, update, delete) into a single unified database configuration. - Updated the component structure to enhance clarity and maintainability, with a focus on setting up database operations. - Adjusted validation logic to ensure proper handling of operation parameters and connection IDs. --- src/components/ConfigurationWizard.tsx | 46 +++++--------------------- 1 file changed, 8 insertions(+), 38 deletions(-) diff --git a/src/components/ConfigurationWizard.tsx b/src/components/ConfigurationWizard.tsx index 400bc4b..961dbe0 100644 --- a/src/components/ConfigurationWizard.tsx +++ b/src/components/ConfigurationWizard.tsx @@ -124,45 +124,15 @@ const WIZARD_STEPS: Record = { helpText: "Define how your data should be structured and formatted", }, ], - // Database nodes - using simple wizards for now - databaseQuery: [ + // Unified database node + database: [ { - id: "query-config", - title: "Database Query", - description: "Configure your database query", - component: DataInputWizard, // Placeholder - validation: (data) => !!data.query, - helpText: "Set up your database query parameters", - }, - ], - databaseInsert: [ - { - id: "insert-config", - title: "Database Insert", - description: "Configure data insertion", - component: DataInputWizard, // Placeholder - validation: (data) => !!data.table, - helpText: "Configure how data will be inserted into the database", - }, - ], - databaseUpdate: [ - { - id: "update-config", - title: "Database Update", - description: "Configure data updates", - component: DataInputWizard, // Placeholder - validation: (data) => !!data.table, - helpText: "Configure how data will be updated in the database", - }, - ], - databaseDelete: [ - { - id: "delete-config", - title: "Database Delete", - description: "Configure data deletion", - component: DataInputWizard, // Placeholder - validation: (data) => !!data.table, - helpText: "Configure how data will be deleted from the database", + id: "database-config", + title: "Database Operation", + description: "Configure your database operation", + component: DataInputWizard, // Placeholder - will be replaced with DatabaseWizard + validation: (data: any) => !!data.operation && !!data.connectionId, + helpText: "Set up your database operation parameters", }, ], };