MSP-3325 move Button from Configurations to ActiveConfigurationsTable
This commit is contained in:
1 parent
a3d6db05f3
commit
a22bbc6267
3 files changed
+20
-15
No files matched your search
@@ -41,4 +41,9 @@
|
||||
background: $blue-color-2 !important;
|
||||
}
|
||||
}
|
||||
|
||||
&__buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
@@ -191,9 +191,21 @@ const ActiveConfigurationsTable: FC<ActiveConfigurationsTablePropsType> =
|
||||
const className = `active-configurations-table__table ${isActiveTable ? 'active-config' : ''}`
|
||||
return (
|
||||
<div className="active-configurations-table">
|
||||
<h2 className="active-configurations-table__title">
|
||||
{isActiveTable ? 'Активная конфигурация' : 'Другие конфигурации'}
|
||||
</h2>
|
||||
<div className="active-configurations-table__buttons">
|
||||
<h2 className="active-configurations-table__title">
|
||||
{isActiveTable ? 'Активная' : 'Остальные'}
|
||||
</h2>
|
||||
{!isActiveTable && <CanEdit>
|
||||
<Button
|
||||
className="configurations__buttons__new-config-brn"
|
||||
onClick={() => {
|
||||
// TODO создание новой конфигурации
|
||||
}}
|
||||
>
|
||||
Создать
|
||||
</Button>
|
||||
</CanEdit>}
|
||||
</div>
|
||||
<Table
|
||||
className={className}
|
||||
rowKey={(record) => record.id}
|
||||
|
||||
@@ -3,7 +3,6 @@ import { useEffect, useMemo, useState } from 'react'
|
||||
import { Outlet, useNavigate, useParams } from 'react-router-dom'
|
||||
|
||||
import ActiveConfigurationsTable from '@components/ActiveConfigurationsTable'
|
||||
import CanEdit from '@components/CanEdit'
|
||||
import CompareVersionModal from '@components/CompareVersionModal'
|
||||
import ConfigSchemaModal from '@components/ConfigSchemaModal'
|
||||
import ConfigurationPreviewModal from '@components/ConfigurationPreviewModal'
|
||||
@@ -100,17 +99,6 @@ const Configurations = () => {
|
||||
>
|
||||
Текущая схема
|
||||
</Button>
|
||||
<CanEdit>
|
||||
<Button
|
||||
type="primary"
|
||||
className="configurations__buttons__new-config-brn"
|
||||
onClick={() => {
|
||||
// TODO создание новой конфигурации
|
||||
}}
|
||||
>
|
||||
Создать конфигурацию
|
||||
</Button>
|
||||
</CanEdit>
|
||||
</div>
|
||||
<ActiveConfigurationsTable
|
||||
isActiveTable
|
||||
|
||||
Reference in new issue
Block a user