diff --git a/src/pages/WellOperations/WellOperationsEditor.jsx b/src/pages/WellOperations/WellOperationsEditor.jsx index 25daed9..6517219 100644 --- a/src/pages/WellOperations/WellOperationsEditor.jsx +++ b/src/pages/WellOperations/WellOperationsEditor.jsx @@ -19,21 +19,22 @@ const { TextArea } = Input; const basePageSize = 160; const format='YYYY.MM.DD HH:mm' -const numericSortColumnOptions = Object.assign({ +const numericSortColumnOptions = { + ...numericColumnOptions, sorter: makeNumericSorter('wellDepth'), render:(value) =>
{value}
-}, numericColumnOptions) +} -const durationFormattedColumnOptions = Object.assign({ +const durationFormattedColumnOptions = { + ...numericColumnOptions, render:(value) =>
- {Number.isNaN(value.toFixed(2)) ? "-" : value.toFixed(2)} + {Number.isNaN(+value) ? "-" : value.toFixed(2)}
-}, numericColumnOptions) - +} export const WellOperationsEditor = ({idWell, idType}) => { const [pageNumAndPageSize, setPageNumAndPageSize] = useState({current:1, pageSize:basePageSize}) @@ -72,7 +73,7 @@ export const WellOperationsEditor = ({idWell, idType}) => { makeColumn('Конструкция секции','idWellSectionType', { editable:true, input:, - width:110, + width:160, render:(_, record)=>getByKeyOrReturnKey(dictionarySectionType, record.idWellSectionType) }), makeColumn('Операция','idCategory', { @@ -87,7 +88,8 @@ export const WellOperationsEditor = ({idWell, idType}) => { editable:true, width:200, input:, - sorter: makeDateSorter('startDate'), + initialValue:moment().format(), + sorter: makeDateSorter('startDate'), render:(_, record) =>
{moment.utc(record.startDate).local().format(format)}