feat: add dual-date filter

This commit is contained in:
Kailasdevdas
2026-07-02 16:48:25 +05:30
parent d125165d3e
commit 37b86f578e
6 changed files with 446 additions and 212 deletions
+15 -1
View File
@@ -140,7 +140,17 @@ export const deleteCategoryApi = async (id: number) => {
}
};
export const getAllInquiriesApi = async (page = 1, limit = 10, filterDate = '', startDate = '', endDate = '') => {
export const getAllInquiriesApi = async (
page = 1,
limit = 10,
filterDate = '',
startDate = '',
endDate = '',
createdDate = '',
createdStartDate = '',
createdEndDate = '',
search = ''
) => {
const params = new URLSearchParams({
page: page.toString(),
limit: limit.toString(),
@@ -149,6 +159,10 @@ export const getAllInquiriesApi = async (page = 1, limit = 10, filterDate = '',
if (filterDate) params.append('filterDate', filterDate);
if (startDate) params.append('startDate', startDate);
if (endDate) params.append('endDate', endDate);
if (createdDate) params.append('createdDate', createdDate);
if (createdStartDate) params.append('createdStartDate', createdStartDate);
if (createdEndDate) params.append('createdEndDate', createdEndDate);
if (search) params.append('search', search);
const res = await apiClient.get(`/health-check/inquiries?${params.toString()}`);
return res.data;