diff --git a/src/pages/WellOperations/WellOperationsEditor.jsx b/src/pages/WellOperations/WellOperationsEditor.jsx index 1266d49..4f0a6a9 100644 --- a/src/pages/WellOperations/WellOperationsEditor.jsx +++ b/src/pages/WellOperations/WellOperationsEditor.jsx @@ -1,21 +1,21 @@ import moment from 'moment' import { Input } from 'antd' -import { useState, useEffect, memo } from 'react' +import { useLocation } from 'react-router-dom' +import { useState, useEffect, memo, useMemo, useCallback } from 'react' import { EditableTable, - DatePickerWrapper, makeColumn, - makeDateSorter, makeNumericColumnOptions, makeSelectColumn, makeActionHandler, + makeDateColumn, } from '@components/Table' -import { WellOperationService} from '@api' import LoaderPortal from '@components/LoaderPortal' import { invokeWebApiWrapperAsync } from '@components/factory' import { hasPermission } from '@utils/permissions' -import { formatDate } from '@utils' +import { arrayOrDefault } from '@utils' +import { WellOperationService } from '@api' const { TextArea } = Input @@ -25,7 +25,7 @@ const defaultColumns = [ makeSelectColumn('Конструкция секции', 'idWellSectionType', [], undefined, { editable: true, width: 160, - formItemRules: [({ getFieldValue }) => ({ + formItemRules: [() => ({ validator(_, value) { if (value?.length > 0) return Promise.resolve() @@ -37,43 +37,41 @@ const defaultColumns = [ makeColumn('Доп. инфо', 'categoryInfo', { editable: true, width: 300, input: