remove items in draft status
This commit is contained in:
@@ -45,10 +45,11 @@ const AllBandiPreInstructorTableAsync = () => {
|
||||
}
|
||||
});
|
||||
const statuses = ['DRAFT', 'PUBLISH', 'EXPIRED'];
|
||||
const initialFetchStatuses = ['PUBLISH', 'EXPIRED'];
|
||||
|
||||
const role = storeGet('getRole')
|
||||
|
||||
const getPaginationQuery = useCallback(() => getQueryParamsForPaginatedEndpoint(lazyState, statuses, 'id'), [lazyState]);
|
||||
const getPaginationQuery = useCallback(() => getQueryParamsForPaginatedEndpoint(lazyState, initialFetchStatuses, 'id'), [lazyState]);
|
||||
|
||||
const onPage = (event) => {
|
||||
setLazyState(event);
|
||||
@@ -174,7 +175,7 @@ const AllBandiPreInstructorTableAsync = () => {
|
||||
const paginationQuery = getPaginationQuery();
|
||||
|
||||
BandoService.getBandiPaginated(paginationQuery, getCallback, errGetCallbacks);
|
||||
}, [lazyState]);
|
||||
}, [lazyState, getPaginationQuery]);
|
||||
|
||||
return (
|
||||
<div className="appPageSection__table">
|
||||
|
||||
@@ -40,10 +40,10 @@ const LatestBandiTableAsync = () => {
|
||||
name: { value: null, matchMode: 'contains' },
|
||||
startDate: { value: null, matchMode: 'dateIs' },
|
||||
endDate: { value: null, matchMode: 'dateIs' },
|
||||
status: { value: null, matchMode: 'equals' }
|
||||
status: { value: 'PUBLISH', matchMode: 'equals' }
|
||||
}
|
||||
});
|
||||
const statuses = ['PUBLISH', 'EXPIRED'];
|
||||
const statuses = ['PUBLISH'];
|
||||
|
||||
const getPaginationQuery = useCallback(() => getQueryParamsForPaginatedEndpoint(lazyState, statuses, 'id'), [lazyState]);
|
||||
|
||||
@@ -197,7 +197,7 @@ const LatestBandiTableAsync = () => {
|
||||
const paginationQuery = getPaginationQuery();
|
||||
|
||||
BandoService.getBandiPaginated(paginationQuery, getCallback, errGetCallbacks);
|
||||
}, [lazyState]);
|
||||
}, [lazyState, getPaginationQuery]);
|
||||
|
||||
return (
|
||||
<div className="appPageSection__table">
|
||||
|
||||
@@ -44,11 +44,6 @@ const LatestBandiTableInstructorManagerAsync = () => {
|
||||
});
|
||||
const statuses = ['PUBLISH'];
|
||||
|
||||
// const displayedItems = useMemo(()=>{
|
||||
// if(!items) return null;
|
||||
// return items.filter(item => item.status === 'PUBLISH');
|
||||
// },[items])
|
||||
|
||||
const getPaginationQuery = useCallback(() => getQueryParamsForPaginatedEndpoint(lazyState, statuses, 'id'), [lazyState]);
|
||||
|
||||
const onPage = (event) => {
|
||||
|
||||
Reference in New Issue
Block a user