From 2384f65999647a1a2f1023e8519dd244b513f686 Mon Sep 17 00:00:00 2001 From: goodm2ice Date: Thu, 17 Mar 2022 06:41:51 +0500 Subject: [PATCH] =?UTF-8?q?=D0=92=20WellOperationsEditor=20=D0=B4=D0=BE?= =?UTF-8?q?=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=B2=D0=BE=D0=B7?= =?UTF-8?q?=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20=D0=B2=D1=8B?= =?UTF-8?q?=D0=B4=D0=B5=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B7=D0=B0=D0=BF?= =?UTF-8?q?=D0=B8=D1=81=D0=B5=D0=B9=20=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20GET?= =?UTF-8?q?=20=D0=B0=D1=80=D0=B3=D1=83=D0=BC=D0=B5=D0=BD=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WellOperations/WellOperationsEditor.jsx | 52 ++++++++++--------- 1 file changed, 28 insertions(+), 24 deletions(-) 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: