(task: TaskInfo, plugin: TaskNotesPlugin)
| 2244 | } |
| 2245 | |
| 2246 | private getStatusOptions(task: TaskInfo, plugin: TaskNotesPlugin) { |
| 2247 | const statusConfigs = plugin.settings.customStatuses; |
| 2248 | const statusOptions: TaskStatusOption[] = []; |
| 2249 | |
| 2250 | // Use only the user-defined statuses from settings |
| 2251 | if (statusConfigs && statusConfigs.length > 0) { |
| 2252 | // Sort by order property |
| 2253 | const sortedStatuses = [...statusConfigs].sort((a, b) => a.order - b.order); |
| 2254 | |
| 2255 | // Show all statuses for all tasks (including recurring tasks) |
| 2256 | sortedStatuses.forEach((status) => { |
| 2257 | const value = toMenuTitle(status.value); |
| 2258 | if (!value) return; |
| 2259 | statusOptions.push({ |
| 2260 | label: toMenuTitle(status.label, value), |
| 2261 | value, |
| 2262 | color: typeof status.color === "string" ? status.color : undefined, |
| 2263 | icon: typeof status.icon === "string" ? status.icon : undefined, |
| 2264 | }); |
| 2265 | }); |
| 2266 | } |
| 2267 | |
| 2268 | return statusOptions; |
| 2269 | } |
| 2270 | |
| 2271 | private addQuickRemindersSection( |
| 2272 | submenu: Menu, |
no test coverage detected