diff --git a/src/components/FiDataGrid.js b/src/components/FiDataGrid.js index c7e6a16..b2265a7 100644 --- a/src/components/FiDataGrid.js +++ b/src/components/FiDataGrid.js @@ -56,12 +56,15 @@ export function FiDataGrid({ rows, columns, sx, autoHeight, if(applySearch!=undefined){ if (Object.keys(getSearchCriteria(window.location.pathname)).length>0){ const localStorageSearchCriteria = getSearchCriteria(window.location.pathname) + console.log(localStorageSearchCriteria) if(localStorageSearchCriteria.start!=undefined){ + console.log(localStorageSearchCriteria) setPage(localStorageSearchCriteria.start/pageSize); } } }else{ setPage(0); + setPageSize(parseInt(event.target.value, 10)); } set_doLoad(doLoad); setLoading(true) diff --git a/src/pages/Announcement/Search/SearchForm.js b/src/pages/Announcement/Search/SearchForm.js index 77495cd..77eb69b 100644 --- a/src/pages/Announcement/Search/SearchForm.js +++ b/src/pages/Announcement/Search/SearchForm.js @@ -51,6 +51,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady}) => key: data.key, dateFrom: sentDateFrom, dateTo: sentDateTo, + start:0, + limit:10 }; applySearch(temp); }; diff --git a/src/pages/Announcement/Search_Public/SearchForm.js b/src/pages/Announcement/Search_Public/SearchForm.js index df8ad0e..7d8f618 100644 --- a/src/pages/Announcement/Search_Public/SearchForm.js +++ b/src/pages/Announcement/Search_Public/SearchForm.js @@ -68,6 +68,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady }) => key: data.key, dateFrom: sentDateFrom, dateTo: sentDateTo, + start:0, + limit:10 }; applySearch(temp); }; diff --git a/src/pages/AuditLog/AuditLogSearchForm.js b/src/pages/AuditLog/AuditLogSearchForm.js index 034e861..27fa580 100644 --- a/src/pages/AuditLog/AuditLogSearchForm.js +++ b/src/pages/AuditLog/AuditLogSearchForm.js @@ -66,6 +66,8 @@ const AuditLogSearchForm = ({ applySearch, searchCriteria, onGridReady}) => { username: data.userName, modifiedTo: sentDateTo, modifiedFrom: sentDateFrom, + start:0, + limit:10 }; applySearch(temp); }; diff --git a/src/pages/DemandNote/Create/SearchForm.js b/src/pages/DemandNote/Create/SearchForm.js index b6cc3d2..014eee0 100644 --- a/src/pages/DemandNote/Create/SearchForm.js +++ b/src/pages/DemandNote/Create/SearchForm.js @@ -136,6 +136,8 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p } const temp = { issueId: issueSelected.id, + start:0, + limit:10 }; applySearch(temp); }; diff --git a/src/pages/DemandNote/Export/SearchForm.js b/src/pages/DemandNote/Export/SearchForm.js index 841c4b6..c0a374d 100644 --- a/src/pages/DemandNote/Export/SearchForm.js +++ b/src/pages/DemandNote/Export/SearchForm.js @@ -137,6 +137,8 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData }) => { } const temp = { issueId: issueSelected.id, + start:0, + limit:10 }; applySearch(temp); }; diff --git a/src/pages/DemandNote/Search/SearchForm.js b/src/pages/DemandNote/Search/SearchForm.js index cdc7c33..bce5359 100644 --- a/src/pages/DemandNote/Search/SearchForm.js +++ b/src/pages/DemandNote/Search/SearchForm.js @@ -115,6 +115,8 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue dueDateFrom: sentDueDateFrom, dueDateTo: sentDueDateTo, status: (data?.status === '' || data?.status?.includes("all")) ? "" : data.status, + start:0, + limit:10 }; applySearch(temp); }; diff --git a/src/pages/Message/Search/SearchForm.js b/src/pages/Message/Search/SearchForm.js index 06123b9..78bdc4d 100644 --- a/src/pages/Message/Search/SearchForm.js +++ b/src/pages/Message/Search/SearchForm.js @@ -67,6 +67,8 @@ const SearchForm = ({ applySearch, searchCriteria, onGridReady }) => { keyword: data.keyword, dateFrom: sentDateFrom, dateTo: sentDateTo, + start:0, + limit:10 }; applySearch(temp); }; diff --git a/src/pages/Payment/Search_GLD/SearchForm.js b/src/pages/Payment/Search_GLD/SearchForm.js index 92377be..10184f3 100644 --- a/src/pages/Payment/Search_GLD/SearchForm.js +++ b/src/pages/Payment/Search_GLD/SearchForm.js @@ -66,6 +66,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady }) => dateFrom: sentDateFrom, dateTo: sentDateTo, status : (status?.type && status?.type != 'all') ? status?.type : "", + start:0, + limit:10 }; applySearch(temp); }; @@ -78,6 +80,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady }) => code:"", transNo:"" }); + localStorage.setItem('searchCriteria',"") } diff --git a/src/pages/Payment/Search_Public/SearchForm.js b/src/pages/Payment/Search_Public/SearchForm.js index 2dc5623..17324ca 100644 --- a/src/pages/Payment/Search_Public/SearchForm.js +++ b/src/pages/Payment/Search_Public/SearchForm.js @@ -70,6 +70,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady }) => dateFrom: sentDateFrom, dateTo: sentDateTo, status : (status?.type && status?.type != 'all') ? status?.type : "", + start:0, + limit:10 }; applySearch(temp); }; diff --git a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js index ecdab0d..a568f4c 100644 --- a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js +++ b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js @@ -92,6 +92,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady }) => contact: data.contact, careOf: data.careOf?data.careOf:"", status: (data.status === "" || data.status.includes('all')) ? "" : data.status, + start:0, + limit:10 }; applySearch(temp); }; diff --git a/src/pages/PublicNotice/Search_GLD/SearchForm.js b/src/pages/PublicNotice/Search_GLD/SearchForm.js index b999852..1c1bc0f 100644 --- a/src/pages/PublicNotice/Search_GLD/SearchForm.js +++ b/src/pages/PublicNotice/Search_GLD/SearchForm.js @@ -64,6 +64,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss const marginBottom = 2.5; const { reset, register, handleSubmit } = useForm() const onSubmit = (data) => { + // localStorage.setItem('searchCriteria',"") data.status = selectedStatus?.type let typeArray = []; let sentDateFrom = ""; @@ -88,6 +89,8 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss issueId: issueSelected?.id, groupNo: data.groupNo, gazettGroup: groupSelected?.code, + start:0, + limit:10 }; applySearch(temp); // setSearchReady(true) diff --git a/src/pages/PublicNotice/Search_Mark_As_Paid_GLD/SearchForm.js b/src/pages/PublicNotice/Search_Mark_As_Paid_GLD/SearchForm.js index 2d1d1b2..4c1c35b 100644 --- a/src/pages/PublicNotice/Search_Mark_As_Paid_GLD/SearchForm.js +++ b/src/pages/PublicNotice/Search_Mark_As_Paid_GLD/SearchForm.js @@ -86,6 +86,8 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss orgId: (orgSelected?.key && orgSelected?.key > 0) ? orgSelected?.key : "", issueId: issueSelected?.id, groupNo: data.groupNo, + start:0, + limit:10 }; applySearch(temp); }; diff --git a/src/pages/User/SearchPage/UserSearchForm.js b/src/pages/User/SearchPage/UserSearchForm.js index a266bff..73019d0 100644 --- a/src/pages/User/SearchPage/UserSearchForm.js +++ b/src/pages/User/SearchPage/UserSearchForm.js @@ -42,6 +42,8 @@ const UserSearchForm = ({ applySearch, onGridReady, searchCriteria }) => { post: data.post, email: data.email, locked: locked, + start:0, + limit:10 }; applySearch(temp); }; diff --git a/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js b/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js index 3cb8be0..ece3286 100644 --- a/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js +++ b/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js @@ -52,6 +52,8 @@ const UserSearchForm_Organization = ({applySearch, orgComboData, onGridReady, se brNoStr: data.brNoStr, orgName: orgSelected?.name ? orgSelected?.name : "", accountFilter: accountFilter=="All"?null:accountFilter, + start:0, + limit:10 }; applySearch(temp); }; @@ -77,6 +79,7 @@ const UserSearchForm_Organization = ({applySearch, orgComboData, onGridReady, se contactPerson:"", brNoStr:"", }); + localStorage.setItem('searchCriteria',"") } return (