feat: add calendar scheduling feature for agent teams
- Implemented FindCalendarSchedules method in agentTeamScheduleService to retrieve schedules within a specified time range. - Added new API endpoint fetchAgentTeamScheduleCalendar to fetch schedules for the calendar view. - Created ScheduleCalendar component to display agent team schedules in a calendar format with drag-and-drop functionality for moving and resizing schedules. - Updated EditDialog component to support deleting schedules and handling default values for new entries. - Enhanced DashboardAgentTeamSchedulesPage to toggle between calendar and list views, and to load calendar data based on selected week. - Added tests for FindCalendarSchedules to ensure correct schedule retrieval and validation of time ranges.
This commit is contained in:
@@ -1092,6 +1092,14 @@ export function fetchAgentTeamSchedules(
|
||||
)
|
||||
}
|
||||
|
||||
export function fetchAgentTeamScheduleCalendar(
|
||||
query: Record<string, string | number | undefined>
|
||||
) {
|
||||
return request<AdminAgentTeamSchedule[]>(
|
||||
`/api/dashboard/agent-team-schedule/calendar${toQueryString(query)}`
|
||||
)
|
||||
}
|
||||
|
||||
export function fetchAgentTeamSchedule(id: number) {
|
||||
return request<AdminAgentTeamSchedule>(`/api/dashboard/agent-team-schedule/${id}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user