feat(cms): Add filtering functionality to CMS list table
- Create CmsListFilters component with search and key filter fields - Add filter modal to CMS table with open/close functionality - Implement useForm hook integration for filter form management - Update useCmsTablePresenter to handle filter state and search logic - Modify useGetCmsList query hook to accept and pass filter parameters - Update cms-service.getCms method to support query parameters - Add URL-based query string management for filter persistence - Integrate filter button in ListHeader component - Add isMutating state tracking for loading indicator during search
This commit is contained in:
@@ -4,9 +4,11 @@ import { ApiResponse } from "../types";
|
||||
import { TCms, TCmsListResponse } from "../types/TCms";
|
||||
|
||||
export const cmsService = {
|
||||
getCms: async (): Promise<ApiResponse<TCmsListResponse>> => {
|
||||
getCms: async (
|
||||
params?: Record<string, any>,
|
||||
): Promise<ApiResponse<TCmsListResponse>> => {
|
||||
try {
|
||||
return (await api.get(API_ENDPOINTS.CMS.BASE())).data;
|
||||
return (await api.get(API_ENDPOINTS.CMS.BASE(), { params })).data;
|
||||
} catch (error) {
|
||||
console.error("Error Caught in CMS Service => Get cms", error);
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user