From 0abb905477937742677d85bf9f9d0911ef8993e1 Mon Sep 17 00:00:00 2001 From: Afiq Date: Tue, 20 May 2025 12:37:57 +0800 Subject: [PATCH] Add Business Rule Node Configuration and Modals - Introduced BusinessRuleNodeConfiguration and BusinessRuleNodeConfigurationModal components for configuring business rules within the process builder. - Enhanced ProcessBuilderComponents to include the new Business Rule node type with default properties. - Implemented BusinessRuleNode in ProcessFlowNodes for rendering business rule nodes with relevant details. - Updated the process builder to support business rule configurations, allowing users to define conditions and actions visually. - Improved overall user experience by refining the UI for business rule management and enhancing variable handling in the process builder. --- .../process-flow/ApiNodeConfiguration.vue | 2 +- .../ApiNodeConfigurationModal.vue | 72 ++ .../BusinessRuleNodeConfiguration.vue | 726 ++++++++++++++++++ .../BusinessRuleNodeConfigurationModal.vue | 78 ++ .../process-flow/FormNodeConfiguration.vue | 2 +- .../FormNodeConfigurationModal.vue | 72 ++ .../GatewayConditionManagerModal.vue | 77 ++ .../process-flow/ProcessBuilderComponents.vue | 16 + components/process-flow/ProcessFlowNodes.js | 79 ++ pages/process-builder/index.vue | 97 ++- 10 files changed, 1204 insertions(+), 17 deletions(-) create mode 100644 components/process-flow/ApiNodeConfigurationModal.vue create mode 100644 components/process-flow/BusinessRuleNodeConfiguration.vue create mode 100644 components/process-flow/BusinessRuleNodeConfigurationModal.vue create mode 100644 components/process-flow/FormNodeConfigurationModal.vue create mode 100644 components/process-flow/GatewayConditionManagerModal.vue diff --git a/components/process-flow/ApiNodeConfiguration.vue b/components/process-flow/ApiNodeConfiguration.vue index 01f8d1c..c805a99 100644 --- a/components/process-flow/ApiNodeConfiguration.vue +++ b/components/process-flow/ApiNodeConfiguration.vue @@ -1,6 +1,6 @@ + + + + \ No newline at end of file diff --git a/components/process-flow/BusinessRuleNodeConfigurationModal.vue b/components/process-flow/BusinessRuleNodeConfigurationModal.vue new file mode 100644 index 0000000..8005f56 --- /dev/null +++ b/components/process-flow/BusinessRuleNodeConfigurationModal.vue @@ -0,0 +1,78 @@ + + + \ No newline at end of file diff --git a/components/process-flow/FormNodeConfiguration.vue b/components/process-flow/FormNodeConfiguration.vue index 8c51f4f..a30d4e2 100644 --- a/components/process-flow/FormNodeConfiguration.vue +++ b/components/process-flow/FormNodeConfiguration.vue @@ -1,6 +1,6 @@ + + + + + + + + + + + + @@ -942,6 +1002,13 @@ const handleTaskNodeUpdate = (updatedData) => { border: 1px solid #ddd; } +:deep(.node-business-rule) { + min-width: 160px; + background: white; + border: 1px solid #ddd; + border-left: 4px solid #9333ea; /* Purple border to match our icon color */ +} + :deep(.node-details) { margin-top: 8px; font-size: 0.75rem;