forked from ddrilling/asb_cloud_front
Обновлено API WellOperationService
This commit is contained in:
parent
d0c2774774
commit
5d64102a7c
@ -6,8 +6,6 @@ import { useState, useEffect, memo, useMemo, useCallback } from 'react'
|
|||||||
import { useTopRightBlock, useWell } from '@asb/context'
|
import { useTopRightBlock, useWell } from '@asb/context'
|
||||||
import {
|
import {
|
||||||
EditableTable,
|
EditableTable,
|
||||||
makeColumn,
|
|
||||||
makeNumericColumnOptions,
|
|
||||||
makeSelectColumn,
|
makeSelectColumn,
|
||||||
makeDateColumn,
|
makeDateColumn,
|
||||||
makeNumericColumn,
|
makeNumericColumn,
|
||||||
@ -72,11 +70,10 @@ export const WellOperationsEditor = memo(({ idType, showNpt, ...other }) => {
|
|||||||
const skip = ((pageNumAndPageSize.current - 1) * pageNumAndPageSize.pageSize) || 0
|
const skip = ((pageNumAndPageSize.current - 1) * pageNumAndPageSize.pageSize) || 0
|
||||||
const take = pageNumAndPageSize.pageSize
|
const take = pageNumAndPageSize.pageSize
|
||||||
const paginatedOperations = await WellOperationService.getOperations(well.id,
|
const paginatedOperations = await WellOperationService.getOperations(well.id,
|
||||||
idType, undefined, undefined, undefined, undefined,
|
undefined, undefined, undefined, undefined, undefined, idType, undefined, skip, take)
|
||||||
undefined, undefined, skip, take)
|
|
||||||
const operations = paginatedOperations?.items ?? []
|
const operations = paginatedOperations?.items ?? []
|
||||||
setOperations(operations)
|
setOperations(operations)
|
||||||
const total = paginatedOperations.count?? paginatedOperations.items?.length ?? 0
|
const total = paginatedOperations.count ?? paginatedOperations.items?.length ?? 0
|
||||||
setPaginationTotal(total)
|
setPaginationTotal(total)
|
||||||
},
|
},
|
||||||
setShowLoader,
|
setShowLoader,
|
||||||
|
Loading…
Reference in New Issue
Block a user