forked from ddrilling/asb_cloud_front
Рефакторинг
This commit is contained in:
parent
cf34baa0a3
commit
f6046770e7
@ -180,14 +180,14 @@ const WellCompositeSections = memo(({ statsWells, selectedSections }) => {
|
||||
{
|
||||
title: 'Участники',
|
||||
dataIndex: 'companies',
|
||||
render: (value) => {
|
||||
return <Button onClick={() => {
|
||||
render: (value) => (
|
||||
<Button onClick={() => {
|
||||
setCompanies(value)
|
||||
setIsCompaniesModalVisible(true)
|
||||
}}>
|
||||
<TeamOutlined/>
|
||||
</Button>
|
||||
},
|
||||
),
|
||||
},
|
||||
], [location.pathname])
|
||||
|
||||
|
@ -138,16 +138,28 @@ const ClusterWells = memo(({ statsWells }) => {
|
||||
makeNumericColumnPlanFact('Рейсовая скорость, м/ч', 'routeSpeed', filtersMinMax, makeFilterMinMaxFunction, numericRender),
|
||||
makeNumericColumn('НПВ, ч', 'notProductiveTimeFact', filtersMinMax, makeFilterMinMaxFunction, numericRender),
|
||||
makeColumn('TVD', 'tvd', { align: 'center', render: (_, value) => (
|
||||
<Button onClick={() => { setSelectedWellId(value?.id); setIsTVDModalVisible(true) }} children={<LineChartOutlined />} />
|
||||
<Button onClick={() => {
|
||||
setSelectedWellId(value?.id)
|
||||
setIsTVDModalVisible(true)
|
||||
}}>
|
||||
<LineChartOutlined />
|
||||
</Button>
|
||||
) }),
|
||||
makeColumn('Операции', 'operations', { align: 'center', render: (_, value) => (
|
||||
<Button onClick={() => { setSelectedWellId(value?.id); setIsOpsModalVisible(true) }} children={<ProfileOutlined />} />
|
||||
<Button onClick={() => {
|
||||
setSelectedWellId(value?.id)
|
||||
setIsOpsModalVisible(true)
|
||||
}}>
|
||||
<ProfileOutlined />
|
||||
</Button>
|
||||
) }),
|
||||
makeColumn('Участники', 'companies', { align: 'center', render: (value) => (
|
||||
<Button onClick={() => {
|
||||
setCompanies(value);
|
||||
setIsCompaniesModalVisible(true);
|
||||
}} children={<TeamOutlined />} />
|
||||
<Button onClick={() => {
|
||||
setCompanies(value)
|
||||
setIsCompaniesModalVisible(true)
|
||||
}}>
|
||||
<TeamOutlined />
|
||||
</Button>
|
||||
) }),
|
||||
], [location.pathname])
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import React, {memo, useMemo} from 'react';
|
||||
import {makeTextColumn} from "@components/Table";
|
||||
import {Table} from "antd";
|
||||
import {BankOutlined} from "@ant-design/icons";
|
||||
import React, { memo, useMemo } from 'react'
|
||||
import { Table } from 'antd'
|
||||
import { BankOutlined } from '@ant-design/icons'
|
||||
|
||||
import { makeTextColumn } from '@components/Table'
|
||||
|
||||
const columns = [
|
||||
makeTextColumn('', 'logo'),
|
||||
|
Loading…
Reference in New Issue
Block a user