forked from ddrilling/asb_cloud_front
На странице "Операции" изменен метод получения категорий операций. (Upd)
This commit is contained in:
parent
bef281feb8
commit
8d6f5ac1a5
@ -4,7 +4,7 @@ import { Button, Modal } from 'antd'
|
|||||||
import { useWell } from '@asb/context'
|
import { useWell } from '@asb/context'
|
||||||
import { invokeWebApiWrapperAsync } from '@components/factory'
|
import { invokeWebApiWrapperAsync } from '@components/factory'
|
||||||
import { EditableTable, makeGroupColumn, makeNumericColumn, makeNumericRender, makeSelectColumn } from '@components/Table'
|
import { EditableTable, makeGroupColumn, makeNumericColumn, makeNumericRender, makeSelectColumn } from '@components/Table'
|
||||||
import { WellOperationService, OperationValueService } from '@api'
|
import { DetectedOperationService, OperationValueService } from '@api'
|
||||||
import { arrayOrDefault } from '@utils'
|
import { arrayOrDefault } from '@utils'
|
||||||
|
|
||||||
const columnOptions = {
|
const columnOptions = {
|
||||||
@ -62,7 +62,7 @@ export const TargetEditor = memo(({ loading, onChange }) => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
invokeWebApiWrapperAsync(
|
invokeWebApiWrapperAsync(
|
||||||
async () => {
|
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 }))
|
const options = categories.map(({ id, name }) => ({ value: id, label: name }))
|
||||||
|
|
||||||
setTargetColumns([
|
setTargetColumns([
|
||||||
|
Loading…
Reference in New Issue
Block a user