From 2dcaf75f57deb48fe15811af8d9608a40dbbe7b4 Mon Sep 17 00:00:00 2001 From: joe Date: Tue, 21 Jan 2025 11:24:27 +0800 Subject: [PATCH] fix add button --- web/apps/web/src/stores/app/schema-provider.tsx | 2 +- web/apps/web/src/stores/app/utils/data-transformer.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/web/apps/web/src/stores/app/schema-provider.tsx b/web/apps/web/src/stores/app/schema-provider.tsx index d6ab870d..279bf177 100644 --- a/web/apps/web/src/stores/app/schema-provider.tsx +++ b/web/apps/web/src/stores/app/schema-provider.tsx @@ -109,7 +109,7 @@ export const SchemaProvider: React.FC = ({ } if (type === 'x-intro-config') { - return stateConfigSchema; + return xStateConfigSchema; } if (type === 'state-config') { diff --git a/web/apps/web/src/stores/app/utils/data-transformer.ts b/web/apps/web/src/stores/app/utils/data-transformer.ts index b7077902..d54334a3 100644 --- a/web/apps/web/src/stores/app/utils/data-transformer.ts +++ b/web/apps/web/src/stores/app/utils/data-transformer.ts @@ -226,17 +226,20 @@ export const genAutomata: (props: { transitions[transitionKey] = []; } transitions[transitionKey].push({ + display_name: transitionData.name, target: transitionData.target, condition: transitionData.condition, target_inputs: transitionData.target_inputs, }); } else if (transitionData.type === TransitionTargetEnum.TIMER) { transitions[transitionData.key] = { + display_name: transitionData.name, target: transitionData.target, target_inputs: transitionData.target_inputs, }; } else { transitions[transitionKey] = { + display_name: transitionData.name, target: transitionData.target, target_inputs: transitionData.target_inputs, };