From a79cac9d51d96cffd5b4f16090ebbed088a6c060 Mon Sep 17 00:00:00 2001 From: "av.maiorov" Date: Tue, 20 Dec 2022 10:49:12 +0500 Subject: [PATCH 1/6] =?UTF-8?q?=D0=9D=D0=B0=20=D1=81=D1=82=D1=80=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=86=D0=B5=20"=D0=9E=D0=BF=D0=B5=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D0=B8"=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BA=D0=B0=D1=82=D0=B5?= =?UTF-8?q?=D0=B3=D0=BE=D1=80=D0=B8=D0=B9=20=D0=BE=D0=BF=D0=B5=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Well/Telemetry/Operations/TargetEditor.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Well/Telemetry/Operations/TargetEditor.jsx b/src/pages/Well/Telemetry/Operations/TargetEditor.jsx index dc1dfd1..d16059d 100644 --- a/src/pages/Well/Telemetry/Operations/TargetEditor.jsx +++ b/src/pages/Well/Telemetry/Operations/TargetEditor.jsx @@ -4,7 +4,7 @@ import { Button, Modal } from 'antd' import { useWell } from '@asb/context' import { invokeWebApiWrapperAsync } from '@components/factory' import { EditableTable, makeGroupColumn, makeNumericColumn, makeNumericRender, makeSelectColumn } from '@components/Table' -import { DetectedOperationService, OperationValueService } from '@api' +import { WellOperationService, OperationValueService } from '@api' import { arrayOrDefault } from '@utils' const columnOptions = { @@ -62,7 +62,7 @@ export const TargetEditor = memo(({ loading, onChange }) => { useEffect(() => { invokeWebApiWrapperAsync( async () => { - const categories = arrayOrDefault(await DetectedOperationService.getCategories()) + const categories = arrayOrDefault(await WellOperationService.getCategories(well.id)) const options = categories.map(({ id, name }) => ({ value: id, label: name })) setTargetColumns([ From bef281feb89c41ef571686e1d0d30906145d4132 Mon Sep 17 00:00:00 2001 From: "av.maiorov" Date: Tue, 20 Dec 2022 11:23:56 +0500 Subject: [PATCH 2/6] =?UTF-8?q?=D0=9D=D0=B0=20=D1=81=D1=82=D1=80=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=86=D0=B5=20"=D0=9E=D0=BF=D0=B5=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D0=B8"=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BA=D0=B0=D1=82=D0=B5?= =?UTF-8?q?=D0=B3=D0=BE=D1=80=D0=B8=D0=B9=20=D0=BE=D0=BF=D0=B5=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D0=B9.=20(Upd)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Well/Telemetry/Operations/index.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/Well/Telemetry/Operations/index.jsx b/src/pages/Well/Telemetry/Operations/index.jsx index fca16f6..3d3748e 100644 --- a/src/pages/Well/Telemetry/Operations/index.jsx +++ b/src/pages/Well/Telemetry/Operations/index.jsx @@ -8,7 +8,7 @@ import { DateRangeWrapper } from '@components/Table' import { invokeWebApiWrapperAsync } from '@components/factory' import { unique } from '@utils/filters' import { getPermissions, arrayOrDefault, range, withPermissions, prettify } from '@utils' -import { DetectedOperationService, DrillerService, TelemetryDataSaubService } from '@api' +import { DetectedOperationService, DrillerService, TelemetryDataSaubService, WellOperationService } from '@api' import DrillerList from './DrillerList' import TargetEditor from './TargetEditor' @@ -26,7 +26,7 @@ const Operations = memo(() => { const [data, setData] = useState({}) const [drillers, setDrillers] = useState([]) const [drillersLoader, setDrillersLoader] = useState(false) - const [selectedCategory, setSelectedCategory] = useState(14) + const [selectedCategory, setSelectedCategory] = useState(5011) const [categories, setCategories] = useState() const [well] = useWell() @@ -78,7 +78,7 @@ const Operations = memo(() => { useEffect(() => { invokeWebApiWrapperAsync( async () => { - const categories = arrayOrDefault(await DetectedOperationService.getCategories()) + const categories = arrayOrDefault(await WellOperationService.getCategories(well.id)) setCategories(categories.map((category) => ({ ...category, value: category.id, From 8d6f5ac1a5e6f16dee435d3937e67384e1dd036c Mon Sep 17 00:00:00 2001 From: "av.maiorov" Date: Tue, 20 Dec 2022 11:27:37 +0500 Subject: [PATCH 3/6] =?UTF-8?q?=D0=9D=D0=B0=20=D1=81=D1=82=D1=80=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=86=D0=B5=20"=D0=9E=D0=BF=D0=B5=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D0=B8"=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BA=D0=B0=D1=82=D0=B5?= =?UTF-8?q?=D0=B3=D0=BE=D1=80=D0=B8=D0=B9=20=D0=BE=D0=BF=D0=B5=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D0=B9.=20(Upd)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Well/Telemetry/Operations/TargetEditor.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Well/Telemetry/Operations/TargetEditor.jsx b/src/pages/Well/Telemetry/Operations/TargetEditor.jsx index d16059d..dc1dfd1 100644 --- a/src/pages/Well/Telemetry/Operations/TargetEditor.jsx +++ b/src/pages/Well/Telemetry/Operations/TargetEditor.jsx @@ -4,7 +4,7 @@ import { Button, Modal } from 'antd' import { useWell } from '@asb/context' import { invokeWebApiWrapperAsync } from '@components/factory' import { EditableTable, makeGroupColumn, makeNumericColumn, makeNumericRender, makeSelectColumn } from '@components/Table' -import { WellOperationService, OperationValueService } from '@api' +import { DetectedOperationService, OperationValueService } from '@api' import { arrayOrDefault } from '@utils' const columnOptions = { @@ -62,7 +62,7 @@ export const TargetEditor = memo(({ loading, onChange }) => { useEffect(() => { invokeWebApiWrapperAsync( async () => { - const categories = arrayOrDefault(await WellOperationService.getCategories(well.id)) + const categories = arrayOrDefault(await DetectedOperationService.getCategories()) const options = categories.map(({ id, name }) => ({ value: id, label: name })) setTargetColumns([ From c0b5f82ad269f9b1d47c8578709d3d9badc9b1b3 Mon Sep 17 00:00:00 2001 From: "av.maiorov" Date: Tue, 20 Dec 2022 12:04:58 +0500 Subject: [PATCH 4/6] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BD=20=D0=B2?= =?UTF-8?q?=D1=8B=D0=B7=D0=BE=D0=B2=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=D0=B0?= =?UTF-8?q?=20=D0=BF=D0=BE=D0=BB=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20?= =?UTF-8?q?=D1=81=D0=BF=D0=B8=D1=81=D0=BA=D0=B0=20=D0=BA=D0=B0=D1=82=D0=B5?= =?UTF-8?q?=D0=B3=D0=BE=D1=80=D0=B8=D0=B9=20=D0=B8=D0=B7=20=D0=B4=D0=BE?= =?UTF-8?q?=D1=87=D0=B5=D1=80=D0=BD=D0=B5=D0=B3=D0=BE=20=D0=BA=D0=BE=D0=BC?= =?UTF-8?q?=D0=BF=D0=BE=D0=BD=D0=B5=D0=BD=D1=82=D0=B0=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D0=B5=20"=D0=9E?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B0=D1=86=D0=B8=D0=B8".?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Well/Telemetry/Operations/TargetEditor.jsx | 7 ++----- src/pages/Well/Telemetry/Operations/index.jsx | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/pages/Well/Telemetry/Operations/TargetEditor.jsx b/src/pages/Well/Telemetry/Operations/TargetEditor.jsx index dc1dfd1..4e83c91 100644 --- a/src/pages/Well/Telemetry/Operations/TargetEditor.jsx +++ b/src/pages/Well/Telemetry/Operations/TargetEditor.jsx @@ -4,7 +4,7 @@ import { Button, Modal } from 'antd' import { useWell } from '@asb/context' import { invokeWebApiWrapperAsync } from '@components/factory' import { EditableTable, makeGroupColumn, makeNumericColumn, makeNumericRender, makeSelectColumn } from '@components/Table' -import { DetectedOperationService, OperationValueService } from '@api' +import { OperationValueService } from '@api' import { arrayOrDefault } from '@utils' const columnOptions = { @@ -14,7 +14,7 @@ const columnOptions = { const scroll = { y: '75vh', scrollToFirstRowOnChange: true } const numericRender = makeNumericRender(2) -export const TargetEditor = memo(({ loading, onChange }) => { +export const TargetEditor = memo(({ loading, onChange, options }) => { const [targets, setTargets] = useState([]) const [showModal, setShowModal] = useState(false) const [showLoader, setShowLoader] = useState(false) @@ -62,9 +62,6 @@ export const TargetEditor = memo(({ loading, onChange }) => { useEffect(() => { invokeWebApiWrapperAsync( async () => { - const categories = arrayOrDefault(await DetectedOperationService.getCategories()) - const options = categories.map(({ id, name }) => ({ value: id, label: name })) - setTargetColumns([ makeSelectColumn('Название', 'idOperationCategory', options, undefined, { ...columnOptions, width: 200 }, { showSearch: true, diff --git a/src/pages/Well/Telemetry/Operations/index.jsx b/src/pages/Well/Telemetry/Operations/index.jsx index 3d3748e..14f4674 100644 --- a/src/pages/Well/Telemetry/Operations/index.jsx +++ b/src/pages/Well/Telemetry/Operations/index.jsx @@ -142,8 +142,8 @@ const Operations = memo(() => { )} - {permissions.detectedOperation.get && permissions.operationValue.get && ( - + {permissions.detectedOperation.get && permissions.operationValue.get && categories && ( + )} From fce6c1909e116196b72ab37d8c97b1e334bb922c Mon Sep 17 00:00:00 2001 From: "av.maiorov" Date: Tue, 20 Dec 2022 12:36:31 +0500 Subject: [PATCH 5/6] =?UTF-8?q?1.=20=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BB=D0=BE=D0=B3=D0=B8=D0=BA=D0=B0=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B2=D0=B8=D1=81=D0=B8=D0=BC=D0=BE=D1=81=D1=82=D0=B5?= =?UTF-8?q?=D0=B9=20=D0=B2=20=D0=B4=D0=BE=D1=87=D0=B5=D1=80=D0=BD=D0=B5?= =?UTF-8?q?=D0=BC=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=BD=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D0=B5=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=9E=D0=BF=D0=B5=D1=80=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D0=B8".=202.=20=D0=A3=D0=BC=D0=B5=D0=BD=D1=8C=D1=88=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B4=D0=BB=D0=B8=D0=BD=D0=B0=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BB=D1=8F=20"=D0=92=D0=B5=D1=80=D1=85=D0=BD=D1=8F=D1=8F=20?= =?UTF-8?q?=D0=B3=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D0=B0",=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D0=B5=20"=D0=9E?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B0=D1=86=D0=B8=D0=B8".?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 3 ++- src/pages/Well/Telemetry/Operations/TargetEditor.jsx | 2 +- src/pages/Well/Telemetry/Operations/index.jsx | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 52097f0..01228b7 100755 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,5 +12,6 @@ "Setpoints", "usehooks" ], - "liveServer.settings.port": 5501 + "liveServer.settings.port": 5501, + "cSpell.language": "en,ru" } \ No newline at end of file diff --git a/src/pages/Well/Telemetry/Operations/TargetEditor.jsx b/src/pages/Well/Telemetry/Operations/TargetEditor.jsx index 4e83c91..e4daf5f 100644 --- a/src/pages/Well/Telemetry/Operations/TargetEditor.jsx +++ b/src/pages/Well/Telemetry/Operations/TargetEditor.jsx @@ -80,7 +80,7 @@ export const TargetEditor = memo(({ loading, onChange, options }) => { `Не удалось получить список категорий целей`, { actionName: 'Получение списка категорий целей', well } ) - }, [well]) + }, [options]) useEffect(() => { updateTable() diff --git a/src/pages/Well/Telemetry/Operations/index.jsx b/src/pages/Well/Telemetry/Operations/index.jsx index 14f4674..79773d7 100644 --- a/src/pages/Well/Telemetry/Operations/index.jsx +++ b/src/pages/Well/Telemetry/Operations/index.jsx @@ -89,7 +89,7 @@ const Operations = memo(() => { 'Не удалось загрзуить категории операций', { actionName: 'Получение категорий операций' } ) - }, []) + }, [well]) useEffect(() => { invokeWebApiWrapperAsync( @@ -135,6 +135,7 @@ const Operations = memo(() => { onChange={setYDomain} addonAfter={'мин'} addonBefore={'Верхняя граница'} + style={{width: '20em'}} /> {permissions.driller.get && ( <> From 44104f672b3b33e4c887be2521e909d724eb8711 Mon Sep 17 00:00:00 2001 From: "av.maiorov" Date: Tue, 20 Dec 2022 12:53:39 +0500 Subject: [PATCH 6/6] =?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=D0=BF=D0=B5=D1=87=D0=B0=D1=82=D0=BA?= =?UTF-8?q?=D0=B0=20"=D0=B7=D0=B0=D0=B3=D1=80=D0=B7=D1=83=D0=B8=D1=82?= =?UTF-8?q?=D1=8C"=20->=20"=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Well/Telemetry/Operations/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Well/Telemetry/Operations/index.jsx b/src/pages/Well/Telemetry/Operations/index.jsx index 79773d7..7aa6329 100644 --- a/src/pages/Well/Telemetry/Operations/index.jsx +++ b/src/pages/Well/Telemetry/Operations/index.jsx @@ -86,7 +86,7 @@ const Operations = memo(() => { }))) }, setIsLoading, - 'Не удалось загрзуить категории операций', + 'Не удалось загрузить категории операций', { actionName: 'Получение категорий операций' } ) }, [well])