From 52f1f79c01b4428180dff3786d64c4ec79b6135f Mon Sep 17 00:00:00 2001 From: youngcw <calebyoung94@gmail.com> Date: Tue, 27 Feb 2024 10:44:20 -0700 Subject: [PATCH] fix #2363 broken create schedule from transaction (#2401) * fix missing name * note * update how payees is created * lint --- .../src/components/schedules/ScheduleDetails.jsx | 3 ++- upcoming-release-notes/2401.md | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 upcoming-release-notes/2401.md diff --git a/packages/desktop-client/src/components/schedules/ScheduleDetails.jsx b/packages/desktop-client/src/components/schedules/ScheduleDetails.jsx index 6cce5e686..96cc47d29 100644 --- a/packages/desktop-client/src/components/schedules/ScheduleDetails.jsx +++ b/packages/desktop-client/src/components/schedules/ScheduleDetails.jsx @@ -1,6 +1,7 @@ import React, { useEffect, useReducer } from 'react'; import { useDispatch } from 'react-redux'; +import { getPayeesById } from 'loot-core/client/reducers/queries'; import { pushModal } from 'loot-core/src/client/actions/modals'; import { runQuery, liveQuery } from 'loot-core/src/client/query-helpers'; import { send, sendCatch } from 'loot-core/src/platform/client/fetch'; @@ -71,7 +72,7 @@ function updateScheduleConditions(schedule, fields) { export function ScheduleDetails({ modalProps, actions, id, transaction }) { const adding = id == null; const fromTrans = transaction != null; - const payees = usePayees({ idKey: true }); + const payees = getPayeesById(usePayees()); const globalDispatch = useDispatch(); const dateFormat = useDateFormat() || 'MM/dd/yyyy'; diff --git a/upcoming-release-notes/2401.md b/upcoming-release-notes/2401.md new file mode 100644 index 000000000..9108bd0a7 --- /dev/null +++ b/upcoming-release-notes/2401.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [youngcw] +--- + +Fix bug in create schedule from transaction -- GitLab