Merge branch 'dev' of bitbucket.org:autodrilling/asb_cloud_front into dev

This commit is contained in:
goodmice 2021-10-18 11:50:17 +05:00
commit 0f5a00041e
2 changed files with 9 additions and 9 deletions

View File

@ -13,10 +13,10 @@ export const formatDate='YYYY.MM.DD HH:mm'
export const makeNumericRender = (fixed?:number) => (value: any, row: object): ReactNode => {
const placeholder = '-'
let val = placeholder
if((value !== null) ||
(value !== undefined) ||
Number.isNaN(value) ||
!Number.isFinite(value)){
if((value !== null) &&
(value !== undefined) &&
!Number.isNaN(value) &&
Number.isFinite(value)){
val = !!fixed
? (+value).toFixed(fixed)
: (+value).toPrecision(5)

View File

@ -9,7 +9,7 @@ import {
makeColumn,
makeDateSorter,
makeNumericColumnPlanFact} from '../../components/Table'
import { calcAndUpdateStatsBySections, makeFilterMinMaxFunction, getPrecision } from './functions'
import { calcAndUpdateStatsBySections, makeFilterMinMaxFunction } from './functions'
import { invokeWebApiWrapperAsync } from '../../components/factory'
import { Tvd } from '../WellOperations/Tvd'
import WellOperationsTable from './WellOperationsTable'
@ -98,10 +98,10 @@ export default function ClusterWells({statsWells}) {
makeColumn('начало', 'factStart', { sorter: makeDateSorter('factStart'), render: getDate }),
makeColumn('окончание', 'factEnd', { sorter: makeDateSorter('factEnd'), render: getDate })
]),
makeNumericColumnPlanFact('Продолжительность', 'period', filtersMinMax, makeFilterMinMaxFunction, getPrecision),
makeNumericColumnPlanFact('МСП', 'rateOfPenetration', filtersMinMax, makeFilterMinMaxFunction, getPrecision),
makeNumericColumnPlanFact('Рейсовая скорость', 'routeSpeed', filtersMinMax, makeFilterMinMaxFunction, getPrecision),
makeNumericColumnPlanFact('НПВ, сут', 'notProductiveTime', filtersMinMax, makeFilterMinMaxFunction, getPrecision),
makeNumericColumnPlanFact('Продолжительность', 'period', filtersMinMax, makeFilterMinMaxFunction),
makeNumericColumnPlanFact('МСП', 'rateOfPenetration', filtersMinMax, makeFilterMinMaxFunction),
makeNumericColumnPlanFact('Рейсовая скорость', 'routeSpeed', filtersMinMax, makeFilterMinMaxFunction),
makeNumericColumnPlanFact('НПВ, сут', 'notProductiveTime', filtersMinMax, makeFilterMinMaxFunction),
{
title: 'TVD',
key: 'tvd',