diff --git a/src/pages/WellOperations/WellOperationsEditor.jsx b/src/pages/WellOperations/WellOperationsEditor.jsx index a49b653..8d9a48e 100644 --- a/src/pages/WellOperations/WellOperationsEditor.jsx +++ b/src/pages/WellOperations/WellOperationsEditor.jsx @@ -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: