forked from ddrilling/asb_cloud_front
Рефакторинг
This commit is contained in:
parent
f6046770e7
commit
983155e0fa
@ -20,7 +20,7 @@ import {
|
||||
import Tvd from '@pages/WellOperations/Tvd'
|
||||
import WellOperationsTable from '@pages/Cluster/WellOperationsTable'
|
||||
import NewParamsTable from './NewParamsTable'
|
||||
import CompaniesTable from "@pages/Cluster/CompaniesTable";
|
||||
import CompaniesTable from '@pages/Cluster/CompaniesTable'
|
||||
|
||||
const filtersMinMax = [
|
||||
{ text: 'min', value: 'min' },
|
||||
|
@ -27,7 +27,7 @@ import {
|
||||
|
||||
import Tvd from '@pages/WellOperations/Tvd'
|
||||
import WellOperationsTable from './WellOperationsTable'
|
||||
import CompaniesTable from "@pages/Cluster/CompaniesTable";
|
||||
import CompaniesTable from '@pages/Cluster/CompaniesTable'
|
||||
|
||||
const filtersMinMax = [
|
||||
{ text: 'min', value: 'min' },
|
||||
|
@ -1,8 +1,7 @@
|
||||
import React, { memo, useMemo } from 'react'
|
||||
import { Table } from 'antd'
|
||||
import { BankOutlined } from '@ant-design/icons'
|
||||
|
||||
import { makeTextColumn } from '@components/Table'
|
||||
import { makeTextColumn, Table } from '@components/Table'
|
||||
|
||||
const columns = [
|
||||
makeTextColumn('', 'logo'),
|
||||
@ -13,10 +12,10 @@ const columns = [
|
||||
const CompaniesTable = memo(({companies}) => {
|
||||
const dataCompanies = useMemo(() => companies?.map((company) => ({
|
||||
key: company.id,
|
||||
logo: <BankOutlined/>,
|
||||
logo: companies?.logo ? <img src={companies.logo}/> : <BankOutlined/>,
|
||||
caption: company.caption,
|
||||
companyTypeCaption: company.companyTypeCaption,
|
||||
})), [companies]);
|
||||
})), [companies])
|
||||
|
||||
return (
|
||||
<Table
|
||||
@ -28,7 +27,7 @@ const CompaniesTable = memo(({companies}) => {
|
||||
pagination={{ defaultPageSize: 10 }}
|
||||
tableName={'well_operations'}
|
||||
/>
|
||||
);
|
||||
});
|
||||
)
|
||||
})
|
||||
|
||||
export default CompaniesTable;
|
||||
export default CompaniesTable
|
Loading…
Reference in New Issue
Block a user