feat: add dual-date filter
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user