@@ -56,12 +56,15 @@ export function FiDataGrid({ rows, columns, sx, autoHeight, | |||||
if(applySearch!=undefined){ | if(applySearch!=undefined){ | ||||
if (Object.keys(getSearchCriteria(window.location.pathname)).length>0){ | if (Object.keys(getSearchCriteria(window.location.pathname)).length>0){ | ||||
const localStorageSearchCriteria = getSearchCriteria(window.location.pathname) | const localStorageSearchCriteria = getSearchCriteria(window.location.pathname) | ||||
console.log(localStorageSearchCriteria) | |||||
if(localStorageSearchCriteria.start!=undefined){ | if(localStorageSearchCriteria.start!=undefined){ | ||||
console.log(localStorageSearchCriteria) | |||||
setPage(localStorageSearchCriteria.start/pageSize); | setPage(localStorageSearchCriteria.start/pageSize); | ||||
} | } | ||||
} | } | ||||
}else{ | }else{ | ||||
setPage(0); | setPage(0); | ||||
setPageSize(parseInt(event.target.value, 10)); | |||||
} | } | ||||
set_doLoad(doLoad); | set_doLoad(doLoad); | ||||
setLoading(true) | setLoading(true) | ||||
@@ -51,6 +51,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady}) => | |||||
key: data.key, | key: data.key, | ||||
dateFrom: sentDateFrom, | dateFrom: sentDateFrom, | ||||
dateTo: sentDateTo, | dateTo: sentDateTo, | ||||
start:0, | |||||
limit:10 | |||||
}; | }; | ||||
applySearch(temp); | applySearch(temp); | ||||
}; | }; | ||||
@@ -68,6 +68,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady }) => | |||||
key: data.key, | key: data.key, | ||||
dateFrom: sentDateFrom, | dateFrom: sentDateFrom, | ||||
dateTo: sentDateTo, | dateTo: sentDateTo, | ||||
start:0, | |||||
limit:10 | |||||
}; | }; | ||||
applySearch(temp); | applySearch(temp); | ||||
}; | }; | ||||
@@ -66,6 +66,8 @@ const AuditLogSearchForm = ({ applySearch, searchCriteria, onGridReady}) => { | |||||
username: data.userName, | username: data.userName, | ||||
modifiedTo: sentDateTo, | modifiedTo: sentDateTo, | ||||
modifiedFrom: sentDateFrom, | modifiedFrom: sentDateFrom, | ||||
start:0, | |||||
limit:10 | |||||
}; | }; | ||||
applySearch(temp); | applySearch(temp); | ||||
}; | }; | ||||
@@ -136,6 +136,8 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p | |||||
} | } | ||||
const temp = { | const temp = { | ||||
issueId: issueSelected.id, | issueId: issueSelected.id, | ||||
start:0, | |||||
limit:10 | |||||
}; | }; | ||||
applySearch(temp); | applySearch(temp); | ||||
}; | }; | ||||
@@ -137,6 +137,8 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData }) => { | |||||
} | } | ||||
const temp = { | const temp = { | ||||
issueId: issueSelected.id, | issueId: issueSelected.id, | ||||
start:0, | |||||
limit:10 | |||||
}; | }; | ||||
applySearch(temp); | applySearch(temp); | ||||
}; | }; | ||||
@@ -115,6 +115,8 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue | |||||
dueDateFrom: sentDueDateFrom, | dueDateFrom: sentDueDateFrom, | ||||
dueDateTo: sentDueDateTo, | dueDateTo: sentDueDateTo, | ||||
status: (data?.status === '' || data?.status?.includes("all")) ? "" : data.status, | status: (data?.status === '' || data?.status?.includes("all")) ? "" : data.status, | ||||
start:0, | |||||
limit:10 | |||||
}; | }; | ||||
applySearch(temp); | applySearch(temp); | ||||
}; | }; | ||||
@@ -67,6 +67,8 @@ const SearchForm = ({ applySearch, searchCriteria, onGridReady }) => { | |||||
keyword: data.keyword, | keyword: data.keyword, | ||||
dateFrom: sentDateFrom, | dateFrom: sentDateFrom, | ||||
dateTo: sentDateTo, | dateTo: sentDateTo, | ||||
start:0, | |||||
limit:10 | |||||
}; | }; | ||||
applySearch(temp); | applySearch(temp); | ||||
}; | }; | ||||
@@ -66,6 +66,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady }) => | |||||
dateFrom: sentDateFrom, | dateFrom: sentDateFrom, | ||||
dateTo: sentDateTo, | dateTo: sentDateTo, | ||||
status : (status?.type && status?.type != 'all') ? status?.type : "", | status : (status?.type && status?.type != 'all') ? status?.type : "", | ||||
start:0, | |||||
limit:10 | |||||
}; | }; | ||||
applySearch(temp); | applySearch(temp); | ||||
}; | }; | ||||
@@ -78,6 +80,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady }) => | |||||
code:"", | code:"", | ||||
transNo:"" | transNo:"" | ||||
}); | }); | ||||
localStorage.setItem('searchCriteria',"") | |||||
} | } | ||||
@@ -70,6 +70,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady }) => | |||||
dateFrom: sentDateFrom, | dateFrom: sentDateFrom, | ||||
dateTo: sentDateTo, | dateTo: sentDateTo, | ||||
status : (status?.type && status?.type != 'all') ? status?.type : "", | status : (status?.type && status?.type != 'all') ? status?.type : "", | ||||
start:0, | |||||
limit:10 | |||||
}; | }; | ||||
applySearch(temp); | applySearch(temp); | ||||
}; | }; | ||||
@@ -92,6 +92,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady }) => | |||||
contact: data.contact, | contact: data.contact, | ||||
careOf: data.careOf?data.careOf:"", | careOf: data.careOf?data.careOf:"", | ||||
status: (data.status === "" || data.status.includes('all')) ? "" : data.status, | status: (data.status === "" || data.status.includes('all')) ? "" : data.status, | ||||
start:0, | |||||
limit:10 | |||||
}; | }; | ||||
applySearch(temp); | applySearch(temp); | ||||
}; | }; | ||||
@@ -64,6 +64,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
const marginBottom = 2.5; | const marginBottom = 2.5; | ||||
const { reset, register, handleSubmit } = useForm() | const { reset, register, handleSubmit } = useForm() | ||||
const onSubmit = (data) => { | const onSubmit = (data) => { | ||||
// localStorage.setItem('searchCriteria',"") | |||||
data.status = selectedStatus?.type | data.status = selectedStatus?.type | ||||
let typeArray = []; | let typeArray = []; | ||||
let sentDateFrom = ""; | let sentDateFrom = ""; | ||||
@@ -88,6 +89,8 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
issueId: issueSelected?.id, | issueId: issueSelected?.id, | ||||
groupNo: data.groupNo, | groupNo: data.groupNo, | ||||
gazettGroup: groupSelected?.code, | gazettGroup: groupSelected?.code, | ||||
start:0, | |||||
limit:10 | |||||
}; | }; | ||||
applySearch(temp); | applySearch(temp); | ||||
// setSearchReady(true) | // setSearchReady(true) | ||||
@@ -86,6 +86,8 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
orgId: (orgSelected?.key && orgSelected?.key > 0) ? orgSelected?.key : "", | orgId: (orgSelected?.key && orgSelected?.key > 0) ? orgSelected?.key : "", | ||||
issueId: issueSelected?.id, | issueId: issueSelected?.id, | ||||
groupNo: data.groupNo, | groupNo: data.groupNo, | ||||
start:0, | |||||
limit:10 | |||||
}; | }; | ||||
applySearch(temp); | applySearch(temp); | ||||
}; | }; | ||||
@@ -42,6 +42,8 @@ const UserSearchForm = ({ applySearch, onGridReady, searchCriteria }) => { | |||||
post: data.post, | post: data.post, | ||||
email: data.email, | email: data.email, | ||||
locked: locked, | locked: locked, | ||||
start:0, | |||||
limit:10 | |||||
}; | }; | ||||
applySearch(temp); | applySearch(temp); | ||||
}; | }; | ||||
@@ -52,6 +52,8 @@ const UserSearchForm_Organization = ({applySearch, orgComboData, onGridReady, se | |||||
brNoStr: data.brNoStr, | brNoStr: data.brNoStr, | ||||
orgName: orgSelected?.name ? orgSelected?.name : "", | orgName: orgSelected?.name ? orgSelected?.name : "", | ||||
accountFilter: accountFilter=="All"?null:accountFilter, | accountFilter: accountFilter=="All"?null:accountFilter, | ||||
start:0, | |||||
limit:10 | |||||
}; | }; | ||||
applySearch(temp); | applySearch(temp); | ||||
}; | }; | ||||