diff --git a/src/pages/Well/Telemetry/TelemetryView/TelemetrySummary.jsx b/src/pages/Well/Telemetry/TelemetryView/TelemetrySummary.jsx index 7cc6cad..fec6b1a 100644 --- a/src/pages/Well/Telemetry/TelemetryView/TelemetrySummary.jsx +++ b/src/pages/Well/Telemetry/TelemetryView/TelemetrySummary.jsx @@ -74,8 +74,8 @@ const params = [ { label: 'Рот.', unit: 'об/мин', accessorName: 'rotorSpeed', iconRenderer }, { label: 'Долото', unit: 'м', accessorName: 'bitDepth', iconRenderer, format: 2 }, { label: 'Забой', unit: 'м', accessorName: 'wellDepth', iconRenderer, format: 2 }, - { label: 'Расход', unit: 'м³/ч', accessorName: 'flow', iconRenderer }, - { label: 'Расход х.х.', unit: 'м³/ч', accessorName: 'flowIdle', iconRenderer }, + { label: 'Расход', unit: 'л/ч', accessorName: 'flow', iconRenderer }, + { label: 'Расход х.х.', unit: 'л/ч', accessorName: 'flowIdle', iconRenderer }, { label: 'MSE', unit: '%', accessorName: 'mse', format: 2 }, ] diff --git a/src/pages/Well/WellOperations/OperationEditor/WellOperationsEditor.jsx b/src/pages/Well/WellOperations/OperationEditor/WellOperationsEditor.jsx index 0da5b75..60b624c 100644 --- a/src/pages/Well/WellOperations/OperationEditor/WellOperationsEditor.jsx +++ b/src/pages/Well/WellOperations/OperationEditor/WellOperationsEditor.jsx @@ -138,11 +138,9 @@ export const WellOperationsEditor = memo(({ idType, showNpt, ...other }) => { ) }, [well]) - useEffect(() => { - setTopRightBlock( - - ) - }, [well, setTopRightBlock, updateOperations]) + useEffect(() => setTopRightBlock((well) => ( + + )), [setTopRightBlock, updateOperations]) return ( diff --git a/src/pages/Well/WellOperations/Tvd/index.jsx b/src/pages/Well/WellOperations/Tvd/index.jsx index 1082b00..ba4f036 100644 --- a/src/pages/Well/WellOperations/Tvd/index.jsx +++ b/src/pages/Well/WellOperations/Tvd/index.jsx @@ -229,14 +229,12 @@ const Tvd = memo(({ well: givenWell, title, ...other }) => { ) }, [well]) - useEffect(() => { - setTopRightBlock( -
- - -
- ) - }, [well, setTopRightBlock]) + useEffect(() => setTopRightBlock((well) => ( +
+ + +
+ )), [setTopRightBlock]) return (
diff --git a/src/pages/Well/index.jsx b/src/pages/Well/index.jsx index c54347c..a8145c5 100644 --- a/src/pages/Well/index.jsx +++ b/src/pages/Well/index.jsx @@ -78,11 +78,9 @@ const Well = memo(() => { useEffect(() => setLayoutProps({ sider: , breadcrumb: makeMenuBreadcrumbItems(menuItems, location.pathname, /^\/well\/[0-9]+\//), - topRightBlock: topRightBlock, + topRightBlock: topRightBlock?.(well), }), [well, location.pathname, setLayoutProps, topRightBlock]) - useEffect(() => setTopRightBlock(undefined), [location]) - return (