feat(dashboard): refactor home page to utilize TenderDashboard component
- Replaced the previous home page structure with a simplified TenderDashboard component for improved clarity and maintainability. - Updated the .gitignore file to include IDE-specific files, ensuring a cleaner repository. - Enhanced the useTenderListPresenter to support new parsing logic for cpv_codes in search parameters. - Introduced a new utility function, buildQueryString, for better handling of query parameters in API requests.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { serializeAxiosParams } from "@/utils/shared";
|
||||
import api from "../axios";
|
||||
import { API_ENDPOINTS } from "../endpoints";
|
||||
import { ApiResponse } from "../types";
|
||||
@@ -13,7 +14,12 @@ export const tendersService = {
|
||||
params?: Record<string, any>,
|
||||
): Promise<ApiResponse<TTenderResponse>> => {
|
||||
try {
|
||||
return (await api.get(API_ENDPOINTS.TENDERS.READ_ALL, { params })).data;
|
||||
return (
|
||||
await api.get(API_ENDPOINTS.TENDERS.READ_ALL, {
|
||||
params,
|
||||
paramsSerializer: serializeAxiosParams,
|
||||
})
|
||||
).data;
|
||||
} catch (error) {
|
||||
console.error("ERROR caught in Tenders Services Read all:", error);
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user