- reverted back tables for instructor manager;
This commit is contained in:
@@ -23,40 +23,14 @@ const LatestBandiTable = () => {
|
||||
const [filters, setFilters] = useState(null);
|
||||
const [localAsyncRequest, setLocalAsyncRequest] = useState(false);
|
||||
const [, setStatuses] = useState([]);
|
||||
/*const [totalRecordsNum, setTotalRecordsNum] = useState(0);
|
||||
const [perPageNum, setPerPageNum] = useState(0);
|
||||
const getPaginationQuery = () => {
|
||||
return {
|
||||
"globalFilters": {
|
||||
"page": 1,
|
||||
"limit": 5,
|
||||
"sortBy": {
|
||||
"columnName": "ID",
|
||||
"sortDesc": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const onPageChange = (e) => {
|
||||
console.log('onPageChange', e)
|
||||
}*/
|
||||
|
||||
useEffect(() => {
|
||||
setLocalAsyncRequest(true);
|
||||
BandoService.getBandi(getCallback, errGetCallbacks);
|
||||
//const paginationQuery = getPaginationQuery();
|
||||
//BandoService.getBandiPaginated(paginationQuery, getCallback, errGetCallbacks);
|
||||
}, []);
|
||||
|
||||
const getCallback = (data) => {
|
||||
if (data.status === 'SUCCESS') {
|
||||
/*const { body, totalRecords, currentPage, totalPages, pageSize } = data.data;
|
||||
setTotalRecordsNum(totalRecords);
|
||||
setPerPageNum(pageSize);
|
||||
const newItems = body.filter(o => o.status === 'PUBLISH');
|
||||
setItems(getFormattedBandiData(newItems));
|
||||
setStatuses(uniq(body.map(o => o.status)));*/
|
||||
const newItems = data.data.filter(o => o.status === 'PUBLISH');
|
||||
setItems(getFormattedBandiData(newItems));
|
||||
setStatuses(uniq(data.data.map(o => o.status)));
|
||||
|
||||
@@ -5,8 +5,9 @@ import { __ } from '@wordpress/i18n';
|
||||
import { useStore } from '../../store';
|
||||
|
||||
// components
|
||||
import MieDomandeTableInstructorManagerAsync
|
||||
from '../DashboardInstructorManager/components/MieDomandeTableInstructorManagerAsync';
|
||||
//import MieDomandeTableInstructorManagerAsync from '../DashboardInstructorManager/components/MieDomandeTableInstructorManagerAsync';
|
||||
import InstructorManagerMieDomandeTable
|
||||
from '../DashboardInstructorManager/components/InstructorManagerMieDomandeTable';
|
||||
|
||||
const DomandeMieInstructorManager = () => {
|
||||
const userData = useStore().main.userData();
|
||||
@@ -21,14 +22,16 @@ const DomandeMieInstructorManager = () => {
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Nuove domande da valutare', 'gepafin')}</h2>
|
||||
<MieDomandeTableInstructorManagerAsync statuses={['AWAITING']} userId={userData.id}/>
|
||||
{/*<MieDomandeTableInstructorManagerAsync statuses={['AWAITING']} userId={userData.id}/>*/}
|
||||
<InstructorManagerMieDomandeTable statuses={['AWAITING']} userId={userData.id}/>
|
||||
</div>
|
||||
|
||||
<div className="appPage__spacer"></div>
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Coda di lavoro', 'gepafin')}</h2>
|
||||
<MieDomandeTableInstructorManagerAsync statuses={['OPEN', 'SOCCORSO']} userId={userData.id}/>
|
||||
{/*<MieDomandeTableInstructorManagerAsync statuses={['OPEN', 'SOCCORSO']} userId={userData.id}/>*/}
|
||||
<InstructorManagerMieDomandeTable statuses={['OPEN', 'SOCCORSO']} userId={userData.id}/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user