diff --git a/src/pages/Deposit.jsx b/src/pages/Deposit.jsx index 506c68f..96e1ca0 100755 --- a/src/pages/Deposit.jsx +++ b/src/pages/Deposit.jsx @@ -1,13 +1,14 @@ import { Map, Overlay } from 'pigeon-maps' import { useState, useEffect, memo } from 'react' import { Link, useLocation } from 'react-router-dom' +import { Popover, Badge } from 'antd' import { PointerIcon } from '@components/icons' import { LayoutPortal } from '@components/Layout' import LoaderPortal from '@components/LoaderPortal' import { invokeWebApiWrapperAsync } from '@components/factory' import { arrayOrDefault, limitValue, wrapPrivateComponent } from '@utils' -import { ClusterService } from '@api' +import { DepositService } from '@api' import '@styles/index.css' @@ -42,7 +43,7 @@ const calcViewParams = (clusters) => { } const Deposit = memo(() => { - const [clustersData, setClustersData] = useState([]) + const [depositsData, setDepositsData] = useState([]) const [showLoader, setShowLoader] = useState(false) const [viewParams, setViewParams] = useState(defaultViewParams) @@ -51,9 +52,9 @@ const Deposit = memo(() => { useEffect(() => { invokeWebApiWrapperAsync( async () => { - const data = await ClusterService.getClusters() - setClustersData(arrayOrDefault(data)) - setViewParams(calcViewParams(data)) + const deposits = await DepositService.getDeposits() + setDepositsData(arrayOrDefault(deposits)) + setViewParams(calcViewParams(deposits)) }, setShowLoader, `Не удалось загрузить список кустов`, @@ -66,16 +67,27 @@ const Deposit = memo(() => {
- {clustersData.map(cluster => ( + {depositsData.map(deposit => ( - - - {cluster.caption} - + + {deposit.clusters.map(cluster => ( + +
{cluster.caption}
+ + ))} +
+ } trigger={['click']} title={deposit.caption}> +
+ + + +
+ ))}