forked from ddrilling/asb_cloud_front
Added render format to 'Duration' table column
This commit is contained in:
parent
fb8d693a15
commit
81c457c350
@ -23,6 +23,10 @@ const numericSortColumnOptions = Object.assign({
|
||||
sorter: makeNumericSorter('wellDepth')
|
||||
}, numericColumnOptions)
|
||||
|
||||
const durationFormattedColumnOptions = Object.assign({
|
||||
render:(value) => Number.isNaN(value.toFixed(2)) ? "-" : value.toFixed(2)
|
||||
}, numericColumnOptions)
|
||||
|
||||
|
||||
export const WellOperationsEditor = ({idWell, idType}) => {
|
||||
const [pageNumAndPageSize, setPageNumAndPageSize] = useState({current:1, pageSize:basePageSize})
|
||||
@ -79,7 +83,7 @@ export const WellOperationsEditor = ({idWell, idType}) => {
|
||||
sorter: makeDateSorter('startDate'),
|
||||
render:(_, record) => moment.utc(record.startDate).local().format(format)
|
||||
}),
|
||||
makeColumn('Часы','durationHours', numericColumnOptions),
|
||||
makeColumn('Часы','durationHours', durationFormattedColumnOptions),
|
||||
makeColumn('Комментарий','comment', {editable:true, input:<TextArea/>}),
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user