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