From 8825c4c26cec3f31f356743eb813c11602fcdcb9 Mon Sep 17 00:00:00 2001 From: "av.maiorov" Date: Mon, 19 Dec 2022 17:56:14 +0500 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BF=D0=BE=20=D1=81=D1=82=D0=B8?= =?UTF-8?q?=D0=BB=D1=8E=20=D0=BA=D0=BE=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Well/WellOperations/DrillProcessFlow.jsx | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/src/pages/Well/WellOperations/DrillProcessFlow.jsx b/src/pages/Well/WellOperations/DrillProcessFlow.jsx index 420cef1..5396ebd 100644 --- a/src/pages/Well/WellOperations/DrillProcessFlow.jsx +++ b/src/pages/Well/WellOperations/DrillProcessFlow.jsx @@ -17,10 +17,9 @@ import { invokeWebApiWrapperAsync, download } from '@components/factory' import { ProcessMapService, WellOperationService } from '@api' import { arrayOrDefault } from '@utils' +const style = { margin: 4 } -const ImportExportBar = memo(({ well: givenWell, disabled }) => { - const style = { margin: 4 } - +const ImportExportBar = memo(({ well: givenWell, disabled }) => { const [wellContext] = useWell() const well = useMemo(() => givenWell ?? wellContext, [givenWell, wellContext]) @@ -73,19 +72,15 @@ export const DrillProcessFlow = memo(() => { const [well] = useWell() const setTopRightBlock = useTopRightBlock() - const updateFlows = useCallback( - () => - invokeWebApiWrapperAsync( - async () => { - const flows = await ProcessMapService.getByIdWell(well.id) - setFlows(arrayOrDefault(flows)) - }, - setShowLoader, - `Не удалось загрузить режимно-технологическую карту`, - { actionName: 'Получение режимно-технологической карты', well } - ), - [well] - ) + const updateFlows = useCallback(() => invokeWebApiWrapperAsync( + async () => { + const flows = await ProcessMapService.getByIdWell(well.id) + setFlows(arrayOrDefault(flows)) + }, + setShowLoader, + `Не удалось загрузить режимно-технологическую карту`, + { actionName: 'Получение режимно-технологической карты', well }, + ), [well]) useEffect(() => { invokeWebApiWrapperAsync( @@ -95,7 +90,7 @@ export const DrillProcessFlow = memo(() => { }, setShowLoader, `Не удалось загрузить список конструкций секций`, - { actionName: 'Получение списка конструкций секций', well } + { actionName: 'Получение списка конструкций секций', well }, ) }, [well]) @@ -103,7 +98,9 @@ export const DrillProcessFlow = memo(() => { updateFlows() }, [well]) - useEffect(() => setTopRightBlock((well) => ), [setTopRightBlock]) + useEffect(() => setTopRightBlock((well) => ( + + )), [setTopRightBlock]) const tableHandlers = useMemo(() => { const handlerProps = {