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:
mlogclub
2026-04-29 09:23:54 +08:00
parent ce8a8d5bcc
commit 8646b002c1
10 changed files with 895 additions and 139 deletions
+8
View File
@@ -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}`)
}