(year: number, month: number)
| 1137 | } |
| 1138 | |
| 1139 | async getCalendarData(year: number, month: number): Promise<Record<string, TaskInfo[]>> { |
| 1140 | // For now, return a simple calendar data structure |
| 1141 | // This can be optimized later if needed |
| 1142 | const tasks = await this.getAllTasks(); |
| 1143 | const calendarData: Record<string, TaskInfo[]> = {}; |
| 1144 | |
| 1145 | for (const task of tasks) { |
| 1146 | if (task.scheduled) { |
| 1147 | if (!calendarData[task.scheduled]) { |
| 1148 | calendarData[task.scheduled] = []; |
| 1149 | } |
| 1150 | calendarData[task.scheduled].push(task); |
| 1151 | } |
| 1152 | if (task.due) { |
| 1153 | if (!calendarData[task.due]) { |
| 1154 | calendarData[task.due] = []; |
| 1155 | } |
| 1156 | if (!calendarData[task.due].includes(task)) { |
| 1157 | calendarData[task.due].push(task); |
| 1158 | } |
| 1159 | } |
| 1160 | } |
| 1161 | |
| 1162 | return calendarData; |
| 1163 | } |
| 1164 | |
| 1165 | async getTaskInfoForDate(date: Date): Promise<TaskInfo[]> { |
| 1166 | const dateStr = formatDateForStorage(date); |
nothing calls this directly
no test coverage detected