From d03eda54c8b5f46d75a5286301edc12bd121287e Mon Sep 17 00:00:00 2001 From: Md Afiq Iskandar Date: Mon, 7 Jul 2025 17:11:09 +0800 Subject: [PATCH] Refactor Variable Management and Enhance UI in Process Builder - Updated BusinessRuleNodeConfiguration.vue to utilize props for available variables, improving data handling and consistency. - Enhanced VariableManager.vue to group variables by type, providing a clearer organization and improved user experience. - Introduced dynamic UI elements for variable usage indication and current value previews, enhancing interactivity. - Implemented functionality to check variable usage across nodes, ensuring better management and awareness of variable dependencies. - Added computed properties to force reactivity on variable updates, ensuring configuration modals reflect the latest data. - Improved overall code clarity and maintainability through refactoring and enhanced comments. --- .../BusinessRuleNodeConfiguration.vue | 66 ++- components/process-flow/VariableManager.vue | 448 +++++++++++++++--- pages/process-builder/index.vue | 22 +- stores/processBuilder.js | 190 ++++++++ 4 files changed, 614 insertions(+), 112 deletions(-) diff --git a/components/process-flow/BusinessRuleNodeConfiguration.vue b/components/process-flow/BusinessRuleNodeConfiguration.vue index f921d4b..f79a21f 100644 --- a/components/process-flow/BusinessRuleNodeConfiguration.vue +++ b/components/process-flow/BusinessRuleNodeConfiguration.vue @@ -176,26 +176,26 @@ >
- {{ availableVariables.find(v => v.name === condition.variable)?.type }} type + {{ props.availableVariables.find(v => v.name === condition.variable)?.type }} type
@@ -208,7 +208,7 @@