import moment from 'moment' import { Input } from 'antd' import { useState, useEffect, memo } from 'react' import { EditableTable, DatePickerWrapper, makeColumn, makeDateSorter, makeNumericColumnOptions, makeSelectColumn, makeActionHandler, } 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' const { TextArea } = Input const basePageSize = 160 const defaultColumns = [ makeSelectColumn('Конструкция секции', 'idWellSectionType', [], undefined, { editable: true, width: 160, formItemRules: [({ getFieldValue }) => ({ validator(_, value) { if (value?.length > 0) return Promise.resolve() return Promise.reject('Это обязательное поле!') } })], }), makeSelectColumn('Операция', 'idCategory', [], undefined, { editable: true, width: 200 }), makeColumn('Доп. инфо', 'categoryInfo', { editable: true, width: 300, input: