From ba843f0fde3aefbc1242295114614c4324c1e7c5 Mon Sep 17 00:00:00 2001 From: goodmice Date: Fri, 5 Aug 2022 12:03:25 +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=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=BF=D1=80=D0=B8=20=D0=BE=D1=82=D1=81=D1=83=D1=82?= =?UTF-8?q?=D1=81=D1=82=D0=B2=D0=B8=D0=B8=20=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B?= =?UTF-8?q?=D1=85=20=D0=BD=D0=B0=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=86=D0=B5=20=D0=BE=D0=BF=D0=B5=D1=80=D0=B0=D1=86=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Telemetry/Operations/index.jsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/pages/Telemetry/Operations/index.jsx b/src/pages/Telemetry/Operations/index.jsx index 2688873..8306be8 100644 --- a/src/pages/Telemetry/Operations/index.jsx +++ b/src/pages/Telemetry/Operations/index.jsx @@ -69,9 +69,17 @@ const Operations = memo(() => { useEffect(() => { invokeWebApiWrapperAsync( async () => { - const categories = arrayOrDefault(await DetectedOperationService.getCategories(idWell)) + const categories = arrayOrDefault(await DetectedOperationService.getCategories()) setCategories(categories.map(({ id, name }) => ({ value: id, label: name }))) + }, + setIsLoading, + 'Не удалось загрзуить категории операций' + ) + }, []) + useEffect(() => { + invokeWebApiWrapperAsync( + async () => { const dates = await TelemetryDataSaubService.getDataDatesRange(idWell) if (dates) { const dt = [moment(dates.from), moment(dates.to)] @@ -131,11 +139,11 @@ const Operations = memo(() => {
- +