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>
|
||||
<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
|
||||
icon={<EditOutlined />}
|
||||
onClick={() => setEditMode(true)}
|
||||
@@ -227,10 +235,10 @@ export default function TestEdit() {
|
||||
Открыть
|
||||
</Button>
|
||||
)}
|
||||
{!record.is_active && (
|
||||
{record.id !== test.id && (
|
||||
<Button
|
||||
size="small"
|
||||
type="primary"
|
||||
type={record.is_active ? 'default' : 'primary'}
|
||||
loading={isActivating}
|
||||
onClick={() => activateVersion(record.id)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user