From 174e13b3fe1e1947487d893f06a4be187ef33b3a Mon Sep 17 00:00:00 2001 From: Joel Jeremy Marquez Date: Wed, 21 May 2025 09:30:36 -0700 Subject: [PATCH] Fix category schedule indicators not showing up in budget page (#5036) * Fix category schedule indicators not showing up in budget page * Update release notes --- .../hooks/useCategoryScheduleGoalTemplates.ts | 19 ++++++------------- upcoming-release-notes/5036.md | 6 ++++++ 2 files changed, 12 insertions(+), 13 deletions(-) create mode 100644 upcoming-release-notes/5036.md diff --git a/packages/desktop-client/src/hooks/useCategoryScheduleGoalTemplates.ts b/packages/desktop-client/src/hooks/useCategoryScheduleGoalTemplates.ts index 03328b5443..5e38f2c528 100644 --- a/packages/desktop-client/src/hooks/useCategoryScheduleGoalTemplates.ts +++ b/packages/desktop-client/src/hooks/useCategoryScheduleGoalTemplates.ts @@ -76,19 +76,12 @@ export function useCategoryScheduleGoalTemplates({ const scheduleIds = new Set(schedules.map(s => s.id)); - const statuses = allStatuses; - for (const scheduleId of statuses.keys()) { - if (!scheduleIds.has(scheduleId)) { - statuses.delete(scheduleId); - } - } - - const statusLabels = allStatusLabels; - for (const scheduleId of statusLabels.keys()) { - if (!scheduleIds.has(scheduleId)) { - statusLabels.delete(scheduleId); - } - } + const statuses = new Map( + [...allStatuses].filter(([id]) => scheduleIds.has(id)), + ); + const statusLabels = new Map( + [...allStatusLabels].filter(([id]) => scheduleIds.has(id)), + ); return { schedules, diff --git a/upcoming-release-notes/5036.md b/upcoming-release-notes/5036.md new file mode 100644 index 0000000000..80225e4156 --- /dev/null +++ b/upcoming-release-notes/5036.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [joel-jeremy] +--- + +Fix category schedule indicators not showing up in budget page