Fix: create - can not upgrade tool bug

This commit is contained in:
2024-03-21 16:04:59 +08:00
parent 61d3bb21ad
commit 84d2e6c3f8

View File

@@ -278,7 +278,9 @@ const ToolCard = ({ tools, onDelete, onUpgrade, onSubmit, onCancel }: ToolCardPr
onChange={handleOnVersionChange}
options={toolsGroupByPlatform(tools)}
/>
{tools.every((value) => value.review === 'PASS') && (
{tools
.filter((value) => value.platform === selectedTool.platform)
.every((value) => value.review === 'PASS') && (
<AntdTooltip title={'更新'}>
<Icon
component={IconOxygenUpgrade}
@@ -349,6 +351,7 @@ const Tools = () => {
ref?.getFieldInstance('toolId').focus()
}, 50)
}}
labelCol={{ span: 4 }}
>
<AntdForm.Item
initialValue={tool.toolId}
@@ -358,6 +361,17 @@ const Tools = () => {
>
<AntdInput disabled />
</AntdForm.Item>
<AntdForm.Item
initialValue={tool.platform}
label={'平台'}
name={'platform'}
>
<AntdSelect disabled>
<AntdSelect.Option key={'WEB'}>Web</AntdSelect.Option>
<AntdSelect.Option key={'DESKTOP'}>Desktop</AntdSelect.Option>
<AntdSelect.Option key={'ANDROID'}>Android</AntdSelect.Option>
</AntdSelect>
</AntdForm.Item>
<AntdForm.Item
name={'ver'}
label={'版本'}