forked from ddrilling/asb_cloud_front
На странице "Операции" изменен метод получения категорий операций. (Upd)
This commit is contained in:
parent
a79cac9d51
commit
bef281feb8
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user