feat: implement Phase 2 Core features for AutoScheduler GTD System

- ConnectWise Manage Integration:
  - ConnectWiseModule with service, controller, entity
  - API endpoints for connection CRUD and sync
  - Syncs service tickets, project tickets, zero-ticket projects
  - Stores ConnectWise priority/SLA in task metadata

- Intelligent Calendar Scheduling:
  - CalendarModule with connection and event entities
  - Support for CalDAV, Microsoft Graph, Google Calendar providers
  - CalendarService with sync methods for all providers
  - SchedulingModule with automatic scheduling engine
  - Finds available slots respecting working hours
  - Groups tasks by context, respects priority and due dates

- Interactive Calendar Week View:
  - FullCalendar with timeGridWeek view
  - Drag-and-drop task rescheduling
  - Tasks auto-lock when manually moved
  - Color-coded by context
  - Regenerate Schedule button

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Debian
2026-01-11 09:58:15 +00:00
parent e7ffcce768
commit 9c6b85f28a
29 changed files with 1863 additions and 47 deletions

View File

@@ -97,3 +97,42 @@ export const userApi = {
getPreferences: () => api.get('/users/preferences'),
updatePreferences: (data: Record<string, unknown>) => api.patch('/users/preferences', data),
};
// Calendar API
export const calendarApi = {
getConnections: () => api.get('/connections/calendar'),
createConnection: (data: {
provider: string;
calendarUrl?: string;
credentials?: {
username?: string;
password?: string;
accessToken?: string;
refreshToken?: string;
};
}) => api.post('/connections/calendar', data),
deleteConnection: (id: string) => api.delete(`/connections/calendar/${id}`),
syncConnection: (id: string) => api.post(`/connections/calendar/${id}/sync`),
getEvents: (start: string, end: string) =>
api.get('/calendar/events', { params: { start, end } }),
};
// Schedule API
export const scheduleApi = {
regenerate: () => api.post('/schedule/regenerate'),
clear: () => api.delete('/schedule/clear'),
};
// ConnectWise API
export const connectWiseApi = {
getConnections: () => api.get('/connections/connectwise'),
createConnection: (data: {
companyId: string;
publicKey: string;
privateKey: string;
apiUrl: string;
memberId: string;
}) => api.post('/connections/connectwise', data),
deleteConnection: (id: string) => api.delete(`/connections/connectwise/${id}`),
syncConnection: (id: string) => api.post(`/connections/connectwise/${id}/sync`),
};