diff --git a/packages/desktop-client/src/components/payees/PayeeTable.tsx b/packages/desktop-client/src/components/payees/PayeeTable.tsx index 5c44b899a4a..db7da88555c 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'; @@ -33,15 +33,7 @@ export const PayeeTable = forwardRef< PayeeTableProps >( ( - { - payees, - ruleCounts, - - onUpdate, - onDelete, - onViewRules, - onCreateRule, - }, + { payees, ruleCounts, onUpdate, onDelete, onViewRules, onCreateRule }, ref, ) => { const [hovered, setHovered] = useState(null); @@ -58,9 +50,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 7a3601900ff..dce345a3da8 100644 --- a/packages/desktop-client/src/components/payees/PayeeTableRow.tsx +++ b/packages/desktop-client/src/components/payees/PayeeTableRow.tsx @@ -197,6 +197,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/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 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