feat(holiday-system): add holiday population functionality and API integration
- Implemented a new API endpoint to populate country holidays in the database. - Enhanced the HolidayController to handle holiday population logic for multiple countries. - Updated the holiday API router to include the new populate endpoint. - Added a service method in the frontend to trigger holiday population. - Integrated a button in the admin center overview for easy access to populate holidays. - Improved error handling and user feedback during the holiday population process.
This commit is contained in:
@@ -65,4 +65,10 @@ export const holidayApiService = {
|
||||
const response = await apiClient.get<IServerResponse<IHolidayCalendarEvent[]>>(`${rootUrl}/calendar?year=${year}&month=${month}`);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// Populate holidays
|
||||
populateCountryHolidays: async (): Promise<IServerResponse<any>> => {
|
||||
const response = await apiClient.post<IServerResponse<any>>(`${rootUrl}/populate`);
|
||||
return response.data;
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user