|
1 | 1 | // @flow |
2 | 2 | //----------------------------------------------------------------------------- |
3 | 3 | // Generate data for OVERDUE Section |
4 | | -// Last updated 2025-12-04 for v2.4.0, @jgclark |
| 4 | +// Last updated 2026-07-10 for v2.4.0.b47, @jgclark |
5 | 5 | //----------------------------------------------------------------------------- |
6 | 6 |
|
7 | 7 | import moment from 'moment/min/moment-with-locales' |
8 | 8 | import pluginJson from '../plugin.json' |
9 | | -import { createSectionItemObject, filterParasByRelevantFolders, filterParasByIgnoreTerms, filterParasByExcludedCalendarSections, filterParasByAllowedTeamspaces, makeDashboardParas, getNotePlanSettings } from './dashboardHelpers' |
| 9 | +import { createSectionItemObject, filterParasByRelevantFolders, filterParasByIgnoreTerms, filterParasByIncludedCalendarSections, filterParasByExcludedCalendarSections, filterParasByAllowedTeamspaces, makeDashboardParas, getNotePlanSettings } from './dashboardHelpers' |
10 | 10 | import { openYesterdayParas, refYesterdayParas } from './demoData' |
11 | 11 | import type { TDashboardSettings, TParagraphForDashboard, TSection, TSectionItem } from './types' |
12 | 12 | import { clo, clof, JSP, logDebug, logError, logInfo, logTimer, logWarn, timer } from '@helpers/dev' |
@@ -220,9 +220,12 @@ export async function getRelevantOverdueTasks( |
220 | 220 | // Filter out anything from 'ignoreItemsWithTerms' setting |
221 | 221 | filteredOverdueParas = filterParasByIgnoreTerms(filteredOverdueParas, dashboardSettings, thisStartTime, 'getRelevantOverdueTasks') |
222 | 222 |
|
| 223 | + // Filter out anything not matching 'includedCalendarSections' setting, if set |
| 224 | + filteredOverdueParas = filterParasByIncludedCalendarSections(filteredOverdueParas, dashboardSettings, thisStartTime, 'getRelevantOverdueTasks') |
| 225 | + |
223 | 226 | // Also if wanted, apply to calendar headings in this note |
224 | 227 | filteredOverdueParas = filterParasByExcludedCalendarSections(filteredOverdueParas, dashboardSettings, thisStartTime, 'getRelevantOverdueTasks') |
225 | | - logTimer('getRelevantOverdueTasks', thisStartTime, `After filtering, ${overdueParas.length} overdue items`) |
| 228 | + logTimer('getRelevantOverdueTasks', thisStartTime, `After filtering, ${filteredOverdueParas.length} overdue items`) |
226 | 229 |
|
227 | 230 | // Remove items that appear in this section twice (which can happen if a task is sync'd), based just on their content |
228 | 231 | // Note: this is a quick operation |
|
0 commit comments