forked from ddrilling/asb_cloud_front
CompanyView используется в местах упоминания компаний
This commit is contained in:
parent
f228b64a6f
commit
613b5b232a
@ -1,21 +1,28 @@
|
||||
import { Link } from 'react-router-dom'
|
||||
import { useState, useEffect } from 'react'
|
||||
import { Tag, Button, Modal } from 'antd'
|
||||
import { Table } from '../../components/Table'
|
||||
import { LineChartOutlined, ProfileOutlined } from '@ant-design/icons'
|
||||
|
||||
import {
|
||||
makeTextColumn,
|
||||
makeGroupColumn,
|
||||
makeColumn,
|
||||
makeDateSorter,
|
||||
makeNumericColumnPlanFact} from '../../components/Table'
|
||||
import { calcAndUpdateStatsBySections, makeFilterMinMaxFunction } from './functions'
|
||||
makeNumericColumnPlanFact,
|
||||
Table,
|
||||
} from '../../components/Table'
|
||||
import { invokeWebApiWrapperAsync } from '../../components/factory'
|
||||
import { Tvd } from '../WellOperations/Tvd'
|
||||
import WellOperationsTable from './WellOperationsTable'
|
||||
import { getOperations } from './functions'
|
||||
import LoaderPortal from '../../components/LoaderPortal'
|
||||
import PointerIcon from '../../components/icons/PointerIcon'
|
||||
import { CompanyView } from '../../components/Views'
|
||||
|
||||
import { Tvd } from '../WellOperations/Tvd'
|
||||
import {
|
||||
getOperations,
|
||||
calcAndUpdateStatsBySections,
|
||||
makeFilterMinMaxFunction
|
||||
} from './functions'
|
||||
import WellOperationsTable from './WellOperationsTable'
|
||||
|
||||
const filtersMinMax = [
|
||||
{ text: 'min', value: 'min' },
|
||||
@ -147,7 +154,11 @@ export default function ClusterWells({statsWells}) {
|
||||
title: 'Участники',
|
||||
key: 'companies',
|
||||
dataIndex: 'companies',
|
||||
render: (item) => item?.map((company) => <Tag key={company.caption} color='blue'>{company.caption}</Tag>) ?? '-',
|
||||
render: (item) => item?.map((company) => (
|
||||
<Tag key={company.caption} color='blue'>
|
||||
<CompanyView company={company} />
|
||||
</Tag>
|
||||
)) ?? '-',
|
||||
},
|
||||
]
|
||||
|
||||
|
@ -2,17 +2,20 @@ import { LineChartOutlined, ProfileOutlined } from '@ant-design/icons'
|
||||
import { Table, Tag, Button, Badge, Divider, Modal, Row, Col, Popconfirm } from 'antd'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { useState, useEffect } from 'react'
|
||||
|
||||
import { makeTextColumn, makeNumericColumnPlanFact } from '../../../components/Table'
|
||||
import {
|
||||
calcAndUpdateStatsBySections,
|
||||
makeFilterMinMaxFunction,
|
||||
getOperations
|
||||
} from '../../Cluster/functions'
|
||||
import { Tvd } from '../Tvd'
|
||||
import { DrillParamsService, WellCompositeService } from '../../../services/api'
|
||||
import LoaderPortal from '../../../components/LoaderPortal'
|
||||
import WellOperationsTable from '../../Cluster/WellOperationsTable'
|
||||
import { invokeWebApiWrapperAsync } from '../../../components/factory'
|
||||
import { CompanyView } from '../../../components/Views'
|
||||
|
||||
import {
|
||||
calcAndUpdateStatsBySections,
|
||||
makeFilterMinMaxFunction,
|
||||
getOperations
|
||||
} from '../../Cluster/functions'
|
||||
import { Tvd } from '../Tvd'
|
||||
import WellOperationsTable from '../../Cluster/WellOperationsTable'
|
||||
import { columns as paramsColumns } from '../WellDrillParams'
|
||||
|
||||
|
||||
@ -118,7 +121,7 @@ export const WellCompositeSections = ({idWell, statsWells, selectedSections}) =>
|
||||
}, [rows, selectedSections])
|
||||
|
||||
const columns = [
|
||||
makeTextColumn('скв №', 'caption', null, null,
|
||||
makeTextColumn('скв №', 'caption', null, null,
|
||||
(text, item) => <Link to={`/well/${item?.id}`}>{text ?? '-'}</Link>
|
||||
),
|
||||
makeTextColumn('Секция', 'sectionType', filtersSectionsType, null, (text) => text ?? '-'),
|
||||
@ -149,8 +152,11 @@ export const WellCompositeSections = ({idWell, statsWells, selectedSections}) =>
|
||||
{
|
||||
title: 'Участники',
|
||||
dataIndex: 'companies',
|
||||
render: (item) =>
|
||||
item?.map((company) => <Tag key={company.caption} color={'blue'}>{company.caption}</Tag>),
|
||||
render: (item) => item?.map((company) => (
|
||||
<Tag key={company.caption} color={'blue'}>
|
||||
<CompanyView company={company} />
|
||||
</Tag>
|
||||
)) ?? '-',
|
||||
},
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user