переходный вариант
This commit is contained in:
parent
e876b9e05f
commit
581a03e29d
2 changed files with 45 additions and 12 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import {
|
||||
ApiOutlined,
|
||||
ControlOutlined,
|
||||
DatabaseOutlined,
|
||||
DeleteOutlined,
|
||||
EditOutlined,
|
||||
EyeOutlined,
|
||||
|
|
@ -22,6 +24,7 @@ import {
|
|||
Modal,
|
||||
Popconfirm,
|
||||
Row,
|
||||
Segmented,
|
||||
Select,
|
||||
Space,
|
||||
Spin,
|
||||
|
|
@ -553,7 +556,20 @@ export function InventoryObjectDetailPage() {
|
|||
|
||||
return (
|
||||
<div>
|
||||
<Breadcrumb style={{ marginBottom: 16 }} items={breadcrumbItems} />
|
||||
<Row justify="space-between" align="middle" style={{ marginBottom: 16 }}>
|
||||
<Col><Breadcrumb items={breadcrumbItems} /></Col>
|
||||
<Col>
|
||||
{/* TODO (Вариант В): заменить Segmented на <Tabs> с вкладками Устройства / Задачи / Снапшоты */}
|
||||
<Segmented
|
||||
value="inventory"
|
||||
options={[
|
||||
{ label: 'Инвентарь', value: 'inventory', icon: <DatabaseOutlined /> },
|
||||
{ label: 'Работа', value: 'work', icon: <ControlOutlined /> },
|
||||
]}
|
||||
onChange={(val) => { if (val === 'work') navigate(`/work/objects/${objId}`) }}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Row gutter={16} style={{ marginBottom: 16 }}>
|
||||
<Col flex="auto">
|
||||
|
|
@ -569,7 +585,7 @@ export function InventoryObjectDetailPage() {
|
|||
<Button icon={<ApiOutlined />} loading={discoverMutation.isPending} onClick={handleDiscover}>
|
||||
SSH Discovery
|
||||
</Button>
|
||||
/*
|
||||
{/*
|
||||
<Button icon={<SyncOutlined />} loading={syncMutation.isPending} onClick={handleSync}>
|
||||
Синхронизировать из БД
|
||||
</Button>
|
||||
|
|
@ -579,7 +595,7 @@ export function InventoryObjectDetailPage() {
|
|||
<Button icon={<GoogleOutlined />} onClick={() => setSheetsModal(true)}>
|
||||
Google Sheets
|
||||
</Button>
|
||||
*/
|
||||
*/}
|
||||
<Button icon={<PlusOutlined />} type="primary" onClick={openAddDevice}>
|
||||
Добавить устройство
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import {
|
||||
ControlOutlined,
|
||||
DatabaseOutlined,
|
||||
DeleteOutlined,
|
||||
EditOutlined,
|
||||
FileTextOutlined,
|
||||
|
|
@ -23,6 +25,7 @@ import {
|
|||
Modal,
|
||||
Popconfirm,
|
||||
Row,
|
||||
Segmented,
|
||||
Select,
|
||||
Space,
|
||||
Spin,
|
||||
|
|
@ -471,13 +474,27 @@ export function ObjectDetailPage() {
|
|||
|
||||
return (
|
||||
<div>
|
||||
<Breadcrumb
|
||||
style={{ marginBottom: 16 }}
|
||||
items={[
|
||||
{ title: <a onClick={() => navigate('/objects')}>Объекты</a> },
|
||||
{ title: obj?.name },
|
||||
]}
|
||||
/>
|
||||
<Row justify="space-between" align="middle" style={{ marginBottom: 16 }}>
|
||||
<Col>
|
||||
<Breadcrumb
|
||||
items={[
|
||||
{ title: <a onClick={() => navigate('/work/objects')}>Объекты</a> },
|
||||
{ title: obj?.name },
|
||||
]}
|
||||
/>
|
||||
</Col>
|
||||
<Col>
|
||||
{/* TODO (Вариант В): заменить Segmented на <Tabs> с вкладками Устройства / Задачи / Снапшоты */}
|
||||
<Segmented
|
||||
value="work"
|
||||
options={[
|
||||
{ label: 'Инвентарь', value: 'inventory', icon: <DatabaseOutlined /> },
|
||||
{ label: 'Работа', value: 'work', icon: <ControlOutlined /> },
|
||||
]}
|
||||
onChange={(val) => { if (val === 'inventory') navigate(`/inventory/objects/${objId}`) }}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Row gutter={16} style={{ marginBottom: 16 }}>
|
||||
<Col flex="auto">
|
||||
|
|
@ -489,7 +506,7 @@ export function ObjectDetailPage() {
|
|||
</Col>
|
||||
<Col>
|
||||
<Space>
|
||||
/*
|
||||
{/*
|
||||
<Button icon={<SyncOutlined />} loading={syncMutation.isPending} onClick={handleSync}>
|
||||
Синхронизировать из БД
|
||||
</Button>
|
||||
|
|
@ -499,7 +516,7 @@ export function ObjectDetailPage() {
|
|||
<Button icon={<GoogleOutlined />} onClick={() => setSheetsModal(true)}>
|
||||
Google Sheets
|
||||
</Button>
|
||||
*/
|
||||
*/}
|
||||
<Button icon={<PlusOutlined />} onClick={openAddDevice}>
|
||||
Добавить устройство
|
||||
</Button>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue