prohibit enable and disable function when segment is not completed (#1954)

Co-authored-by: jyong <jyong@dify.ai>
Co-authored-by: Joel <iamjoel007@gmail.com>
This commit is contained in:
Jyong
2024-01-05 18:18:38 +08:00
committed by GitHub
parent 28b26f67e2
commit 4d99c689f0
4 changed files with 6 additions and 3 deletions

View File

@@ -128,7 +128,7 @@ const SegmentCard: FC<ISegmentCardProps> = ({
>
<Switch
size='md'
disabled={archived}
disabled={archived || detail.status !== 'completed'}
defaultValue={enabled}
onChange={async (val) => {
await onChangeSwitch?.(id, val)