From 96698aca5566da3c384dcfef52a398350e34ff67 Mon Sep 17 00:00:00 2001 From: 1AhmedYasser <26207361+1AhmedYasser@users.noreply.github.com> Date: Wed, 17 Jun 2026 12:40:15 +0300 Subject: [PATCH] chore(1063): Added conditional node output handling --- .../components/Flow/McqBranchSelectModal.tsx | 5 +- .../components/Flow/NodeTypes/CustomNode.tsx | 33 +++++- .../components/FlowBuilder/FlowBuilder.tsx | 9 +- GUI/src/hooks/flow/useMcqConnect.ts | 111 ++++++++++++++---- GUI/src/i18n/en/common.json | 3 + GUI/src/i18n/et/common.json | 3 + GUI/src/utils/conditional-flow-utils.ts | 77 ++++++++++++ 7 files changed, 213 insertions(+), 28 deletions(-) create mode 100644 GUI/src/utils/conditional-flow-utils.ts diff --git a/GUI/src/components/Flow/McqBranchSelectModal.tsx b/GUI/src/components/Flow/McqBranchSelectModal.tsx index 58f17b33a..2b191b4f4 100644 --- a/GUI/src/components/Flow/McqBranchSelectModal.tsx +++ b/GUI/src/components/Flow/McqBranchSelectModal.tsx @@ -10,14 +10,15 @@ type McqBranchSelectModalProps = { readonly emptyBranches: McqEmptyBranch[]; readonly onSelect: (branch: McqEmptyBranch) => void; readonly onClose: () => void; + readonly description?: string; }; -const McqBranchSelectModal: FC = ({ emptyBranches, onSelect, onClose }) => { +const McqBranchSelectModal: FC = ({ emptyBranches, onSelect, onClose, description }) => { const { t } = useTranslation(); return ( -

{t('serviceFlow.mcq.emptyBranchesMessage', { count: emptyBranches.length })}

+

{description ?? t('serviceFlow.mcq.emptyBranchesMessage', { count: emptyBranches.length })}

{emptyBranches.map((branch) => (