- confidi only calls updated api implementation;
This commit is contained in:
@@ -25,6 +25,7 @@ import ProperBandoLabel from '../../../../components/ProperBandoLabel';
|
||||
import { Dropdown } from 'primereact/dropdown';
|
||||
import { Tag } from 'primereact/tag';
|
||||
import { Calendar } from 'primereact/calendar';
|
||||
import { storeGet } from '../../../../store';
|
||||
|
||||
const LatestBandiTableAsync = () => {
|
||||
const [localAsyncRequest, setLocalAsyncRequest] = useState(false);
|
||||
@@ -169,8 +170,15 @@ const LatestBandiTableAsync = () => {
|
||||
useEffect(() => {
|
||||
setLocalAsyncRequest(true);
|
||||
const paginationQuery = getPaginationQuery();
|
||||
const role = storeGet('getRole');
|
||||
|
||||
BandoService.getBandiPaginated(paginationQuery, getCallback, errGetCallbacks);
|
||||
if (role === 'ROLE_CONFIDI') {
|
||||
BandoService.getBandiPaginated(paginationQuery, getCallback, errGetCallbacks, [
|
||||
['onlyConfidiCall', true]
|
||||
]);
|
||||
} else {
|
||||
BandoService.getBandiPaginated(paginationQuery, getCallback, errGetCallbacks);
|
||||
}
|
||||
}, [lazyState]);
|
||||
|
||||
return (
|
||||
|
||||
@@ -6,6 +6,7 @@ import translationStrings from '../../../../translationStringsForComponents';
|
||||
|
||||
// api
|
||||
import BandoService from '../../../../service/bando-service';
|
||||
import PreferredBandoService from '../../../../service/preferred-bando-service';
|
||||
|
||||
// tools
|
||||
import getTimeParsedFromString from '../../../../helpers/getTimeParsedFromString';
|
||||
@@ -14,6 +15,7 @@ import getFormattedDateString from '../../../../helpers/getFormattedDateString';
|
||||
import getBandoLabel from '../../../../helpers/getBandoLabel';
|
||||
import getBandoSeverity from '../../../../helpers/getBandoSeverity';
|
||||
import getQueryParamsForPaginatedEndpoint from '../../../../helpers/getQueryParamsForPaginatedEndpoint';
|
||||
import set404FromErrorResponse from '../../../../helpers/set404FromErrorResponse';
|
||||
|
||||
// components
|
||||
import { DataTable } from 'primereact/datatable';
|
||||
@@ -25,8 +27,6 @@ import { Tag } from 'primereact/tag';
|
||||
import { Calendar } from 'primereact/calendar';
|
||||
import { isNil } from 'ramda';
|
||||
import { storeGet } from '../../../../store';
|
||||
import PreferredBandoService from '../../../../service/preferred-bando-service';
|
||||
import set404FromErrorResponse from '../../../../helpers/set404FromErrorResponse';
|
||||
|
||||
const LatestBandiBeneficiarioTableAsync = () => {
|
||||
const [localAsyncRequest, setLocalAsyncRequest] = useState(false);
|
||||
|
||||
@@ -14,7 +14,7 @@ import DashboardService from '../../service/dashboard-service';
|
||||
import { Button } from 'primereact/button';
|
||||
import ErrorBoundary from '../../components/ErrorBoundary';
|
||||
import MyLatestSubmissionsTableAsync from '../DashboardBeneficiario/components/MyLatestSubmissionsTableAsync';
|
||||
import LatestBandiTable from '../DashboardBeneficiario/components/LatestBandiTable';
|
||||
import LatestBandiTableAsync from '../Dashboard/components/LatestBandiTableAsync';
|
||||
|
||||
const DashboardBeneficiarioConfidi = () => {
|
||||
const navigate = useNavigate();
|
||||
@@ -108,7 +108,7 @@ const DashboardBeneficiarioConfidi = () => {
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Bandi disponibili', 'gepafin')}</h2>
|
||||
<ErrorBoundary><LatestBandiTable/></ErrorBoundary>
|
||||
<ErrorBoundary><LatestBandiTableAsync/></ErrorBoundary>
|
||||
</div>
|
||||
|
||||
<div className="appPage__spacer"></div>
|
||||
|
||||
Reference in New Issue
Block a user