fix: always show activate button for non-current versions and in page header
- Header: 'Сделать активной' appears when current version is not the sole active one - Versions table: button shown for all non-current versions regardless of is_active status Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -117,6 +117,14 @@ export default function TestEdit() {
|
|||||||
К списку тестов
|
К списку тестов
|
||||||
</Button>
|
</Button>
|
||||||
<Space>
|
<Space>
|
||||||
|
{versions.length > 1 && (!test.is_active || versions.some(v => v.id !== test.id && v.is_active)) && (
|
||||||
|
<Button
|
||||||
|
loading={isActivating}
|
||||||
|
onClick={() => activateVersion(test.id)}
|
||||||
|
>
|
||||||
|
Сделать активной
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
<Button
|
<Button
|
||||||
icon={<EditOutlined />}
|
icon={<EditOutlined />}
|
||||||
onClick={() => setEditMode(true)}
|
onClick={() => setEditMode(true)}
|
||||||
@@ -227,10 +235,10 @@ export default function TestEdit() {
|
|||||||
Открыть
|
Открыть
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{!record.is_active && (
|
{record.id !== test.id && (
|
||||||
<Button
|
<Button
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type={record.is_active ? 'default' : 'primary'}
|
||||||
loading={isActivating}
|
loading={isActivating}
|
||||||
onClick={() => activateVersion(record.id)}
|
onClick={() => activateVersion(record.id)}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user