forked from ddrilling/asb_cloud_front
Fixed WellOperations table cell renderer
This commit is contained in:
parent
dd9c49c626
commit
a437972fc5
@ -135,7 +135,7 @@ export const makeTextColumn = (
|
|||||||
...other
|
...other
|
||||||
})
|
})
|
||||||
|
|
||||||
const defaultNumericRender = (value: any, row: object) => {
|
export const defaultNumericRender = (value: any, row: object) => {
|
||||||
const placeholder = '-'
|
const placeholder = '-'
|
||||||
if((value === null) ||
|
if((value === null) ||
|
||||||
(value === undefined) ||
|
(value === undefined) ||
|
||||||
|
@ -8,7 +8,8 @@ import {
|
|||||||
makeColumn,
|
makeColumn,
|
||||||
numericColumnOptions,
|
numericColumnOptions,
|
||||||
makeNumericSorter,
|
makeNumericSorter,
|
||||||
makeDateSorter } from "../../components/Table"
|
makeDateSorter,
|
||||||
|
defaultNumericRender } from "../../components/Table"
|
||||||
import LoaderPortal from '../../components/LoaderPortal'
|
import LoaderPortal from '../../components/LoaderPortal'
|
||||||
import { invokeWebApiWrapperAsync } from '../../components/factory'
|
import { invokeWebApiWrapperAsync } from '../../components/factory'
|
||||||
import { WellOperationService} from '../../services/api'
|
import { WellOperationService} from '../../services/api'
|
||||||
@ -30,10 +31,7 @@ const numericSortColumnOptions = {
|
|||||||
|
|
||||||
const durationFormattedColumnOptions = {
|
const durationFormattedColumnOptions = {
|
||||||
...numericColumnOptions,
|
...numericColumnOptions,
|
||||||
render:(value) =>
|
render: defaultNumericRender
|
||||||
<div className='text-align-r-container'>
|
|
||||||
<span>{Number.isNaN(+value) ? "-" : value.toFixed(2)}</span>
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const WellOperationsEditor = ({idWell, idType}) => {
|
export const WellOperationsEditor = ({idWell, idType}) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user