| | |
| | | return !!condition.value |
| | | } |
| | | }, []) |
| | | const conditionNotSet = (<div className='flex h-6 items-center space-x-1 rounded-md bg-workflow-block-parma-bg px-1 text-xs font-normal text-text-secondary'> |
| | | const conditionNotSet = (<div className='flex items-center h-6 px-1 space-x-1 text-xs font-normal text-text-secondary bg-workflow-block-parma-bg rounded-md'> |
| | | {t(`${i18nPrefix}.conditionNotSetup`)} |
| | | </div>) |
| | | |
| | |
| | | { |
| | | cases.map((caseItem, index) => ( |
| | | <div key={caseItem.case_id}> |
| | | <div className='relative flex h-6 items-center px-1'> |
| | | <div className='flex w-full items-center justify-between'> |
| | | <div className='relative flex items-center h-6 px-1'> |
| | | <div className='flex items-center justify-between w-full'> |
| | | <div className='text-[10px] font-semibold text-text-tertiary'> |
| | | {casesLength > 1 && `CASE ${index + 1}`} |
| | | </div> |
| | |
| | | ) |
| | | : conditionNotSet} |
| | | {i !== caseItem.conditions.length - 1 && ( |
| | | <div className='absolute bottom-[-10px] right-1 z-10 text-[10px] font-medium uppercase leading-4 text-text-accent'>{t(`${i18nPrefix}.${caseItem.logical_operator}`)}</div> |
| | | <div className='absolute z-10 right-1 bottom-[-10px] leading-4 text-[10px] font-medium text-text-accent uppercase'>{t(`${i18nPrefix}.${caseItem.logical_operator}`)}</div> |
| | | )} |
| | | </div> |
| | | ))} |
| | |
| | | </div> |
| | | )) |
| | | } |
| | | <div className='relative flex h-6 items-center px-1'> |
| | | <div className='w-full text-right text-xs font-semibold text-text-secondary'>ELSE</div> |
| | | <div className='relative flex items-center h-6 px-1'> |
| | | <div className='w-full text-xs font-semibold text-right text-text-secondary'>ELSE</div> |
| | | <NodeSourceHandle |
| | | {...props} |
| | | handleId='false' |