From dc425042ec2c60ef884837771a5280a0aca5e9fa Mon Sep 17 00:00:00 2001 From: Michael Clark <5285928+MikesGlitch@users.noreply.github.com> Date: Thu, 31 Oct 2024 10:13:24 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=A7=20=20Remove=20test=20file=20(#?= =?UTF-8?q?3756)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * remove unneeded file * release notes * release notes --- packages/loot-core/init-node.js | 39 --------------------------------- upcoming-release-notes/3756.md | 6 +++++ 2 files changed, 6 insertions(+), 39 deletions(-) delete mode 100644 packages/loot-core/init-node.js create mode 100644 upcoming-release-notes/3756.md diff --git a/packages/loot-core/init-node.js b/packages/loot-core/init-node.js deleted file mode 100644 index 3470eccd0e3..00000000000 --- a/packages/loot-core/init-node.js +++ /dev/null @@ -1,39 +0,0 @@ -import { dirname, basename } from 'path'; - -import fetch from 'node-fetch'; -import 'source-map-support/register'; - -// eslint-disable-next-line import/extensions -import bundle from './lib-dist/bundle.desktop.js'; - -global.fetch = fetch; - -async function init(budgetPath) { - const dir = dirname(budgetPath); - const budgetId = basename(budgetPath); - await bundle.initEmbedded('0.0.147', true, dir); - await bundle.lib.send('load-budget', { id: budgetId }); - - return bundle.lib; -} - -async function run() { - const { send } = await init('/tmp/_test-budget'); - const accounts = await send('accounts-get'); - - await send('transaction-add', { - date: '2022-03-20', - account: accounts[0].id, - amount: 1000, - }); - - await new Promise(resolve => { - setTimeout(() => { - resolve(); - }, 5000); - }); - - await send('close-budget'); -} - -run(); diff --git a/upcoming-release-notes/3756.md b/upcoming-release-notes/3756.md new file mode 100644 index 00000000000..6df2705044c --- /dev/null +++ b/upcoming-release-notes/3756.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [MikesGlitch] +--- + +Remove unneeded node test file From 6666014fe518f39d822245330adb4a4d9fcb467f Mon Sep 17 00:00:00 2001 From: Julian Dominguez-Schatz Date: Sat, 2 Nov 2024 16:09:17 -0400 Subject: [PATCH 2/2] Fix bugs in payee table (#3768) --- .../desktop-client/src/components/payees/PayeeTable.tsx | 9 ++++++++- .../src/components/payees/PayeeTableRow.tsx | 3 +++ upcoming-release-notes/3768.md | 6 ++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 upcoming-release-notes/3768.md diff --git a/packages/desktop-client/src/components/payees/PayeeTable.tsx b/packages/desktop-client/src/components/payees/PayeeTable.tsx index 08542439935..b23cdbf490a 100644 --- a/packages/desktop-client/src/components/payees/PayeeTable.tsx +++ b/packages/desktop-client/src/components/payees/PayeeTable.tsx @@ -12,7 +12,7 @@ import { type PayeeEntity } from 'loot-core/src/types/models'; import { useSelectedItems } from '../../hooks/useSelected'; import { View } from '../common/View'; -import { Table } from '../table'; +import { useTableNavigator, Table } from '../table'; import { PayeeTableRow } from './PayeeTableRow'; @@ -46,9 +46,16 @@ export const PayeeTable = forwardRef< setHovered(id); }, []); + const tableNavigator = useTableNavigator(payees, item => + item.transfer_acct == null + ? ['select', 'name', 'rule-count'] + : ['rule-count'], + ); + return ( setHovered(null)}> { diff --git a/packages/desktop-client/src/components/payees/PayeeTableRow.tsx b/packages/desktop-client/src/components/payees/PayeeTableRow.tsx index 4bdd60b1758..b0464a2bc9d 100644 --- a/packages/desktop-client/src/components/payees/PayeeTableRow.tsx +++ b/packages/desktop-client/src/components/payees/PayeeTableRow.tsx @@ -133,6 +133,9 @@ export const PayeeTableRow = memo( focused={focusedField === 'select'} selected={selected} onSelect={e => { + if (payee.transfer_acct != null) { + return; + } dispatchSelected({ type: 'select', id: payee.id, diff --git a/upcoming-release-notes/3768.md b/upcoming-release-notes/3768.md new file mode 100644 index 00000000000..98eafad6c92 --- /dev/null +++ b/upcoming-release-notes/3768.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [jfdoming] +--- + +Fix bugs on payee management page