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.
This commit is contained in:
Nikhil-Doye
2025-10-23 14:48:09 -04:00
parent b092917e68
commit 521fcb19a9
+8 -38
View File
@@ -124,45 +124,15 @@ const WIZARD_STEPS: Record<NodeType, WizardStep[]> = {
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",
},
],
};