Обновлено API WellOperationService

This commit is contained in:
goodmice 2022-12-23 14:45:13 +05:00
parent d0c2774774
commit 5d64102a7c
No known key found for this signature in database
GPG Key ID: 63EA771203189CF1

View File

@ -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,