( task: TaskInfo, event: MouseEvent, plugin: TaskNotesPlugin )
| 84 | } |
| 85 | |
| 86 | async function handleToggleStatus( |
| 87 | task: TaskInfo, |
| 88 | event: MouseEvent, |
| 89 | plugin: TaskNotesPlugin |
| 90 | ): Promise<void> { |
| 91 | try { |
| 92 | if (task.recurrence) { |
| 93 | await plugin.toggleRecurringTaskComplete(task, getKanbanTaskActionDate(task)); |
| 94 | } else { |
| 95 | await plugin.toggleTaskStatus(task); |
| 96 | } |
| 97 | } catch (error) { |
| 98 | tasknotesLogger.error("[TaskNotes][KanbanView] Failed to toggle status", { |
| 99 | category: "internal", |
| 100 | operation: "toggle-status", |
| 101 | error: error, |
| 102 | }); |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | export function getKanbanTaskActionDate(task: TaskInfo): Date { |
| 107 | const dateStr = getDatePart(task.scheduled || task.due || ""); |
no test coverage detected