diff --git a/packages/desktop-client/e2e/data/ynab5-demo-budget.json b/packages/desktop-client/e2e/data/ynab5-demo-budget.json index 2f31164d64c..6dbe3ff5bfe 100644 --- a/packages/desktop-client/e2e/data/ynab5-demo-budget.json +++ b/packages/desktop-client/e2e/data/ynab5-demo-budget.json @@ -1671,9 +1671,70 @@ "import_payee_name_original": null, "debt_transaction_type": null, "deleted": false + }, + { + "id": "213526fc-ba49-4790-8a96-cc2a50182728", + "date": "2023-09-04", + "amount": -100000, + "memo": "Test transaction", + "cleared": "cleared", + "approved": true, + "flag_color": null, + "account_id": "bc1d862f-bab0-41c3-bd1e-6cee8c688e32", + "payee_id": "2a20470a-634f-4efa-a7f6-f1c0b0bdda41", + "category_id": "36120d44-6c61-4402-985a-891a8d267858", + "transfer_account_id": null, + "transfer_transaction_id": null, + "matched_transaction_id": null, + "import_id": null, + "import_payee_name": null, + "import_payee_name_original": null, + "debt_transaction_type": null, + "deleted": false + }, + { + "id": "024494a1-f1e0-4667-9fc0-91e4a4262193", + "date": "2023-09-04", + "amount": 50000, + "memo": "split part b", + "cleared": "cleared", + "approved": true, + "flag_color": null, + "account_id": "125f339b-2a63-481e-84c0-f04d898905d2", + "payee_id": "", + "category_id": null, + "transfer_account_id": "bc1d862f-bab0-41c3-bd1e-6cee8c688e32", + "transfer_transaction_id": "213526fc-ba49-4790-8a96-cc2a50182728", + "matched_transaction_id": "", + "import_id": null, + "import_payee_name": null, + "import_payee_name_original": null, + "debt_transaction_type": null, + "deleted": false + } + ], + "subtransactions": [ + { + "id": "d8ec8c84-5033-4f7e-8485-66bfe19a70d6", + "transaction_id": "213526fc-ba49-4790-8a96-cc2a50182728", + "amount": -50000, + "memo": "split part a", + "payee_id": "2a20470a-634f-4efa-a7f6-f1c0b0bdda41", + "category_id": "36120d44-6c61-4402-985a-891a8d267858", + "transfer_account_id": null, + "deleted": false + }, + { + "id": "870d8780-79cf-4197-a341-47d24b2b5a59", + "transaction_id": "213526fc-ba49-4790-8a96-cc2a50182728", + "amount": -50000, + "memo": "split part b", + "payee_id": "2a20470a-634f-4efa-a7f6-f1c0b0bdda41", + "category_id": null, + "transfer_account_id": "125f339b-2a63-481e-84c0-f04d898905d2", + "deleted": false } ], - "subtransactions": [], "scheduled_transactions": [], "scheduled_subtransactions": [] }, diff --git a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-2-chromium-linux.png b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-2-chromium-linux.png index e50ea3fe2f2..22186d83389 100644 Binary files a/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-2-chromium-linux.png and b/packages/desktop-client/e2e/mobile.test.js-snapshots/Mobile-checks-that-settings-page-can-be-opened-2-chromium-linux.png differ diff --git a/packages/desktop-client/e2e/onboarding.test.js b/packages/desktop-client/e2e/onboarding.test.js index c748ad93523..98c5b28c083 100644 --- a/packages/desktop-client/e2e/onboarding.test.js +++ b/packages/desktop-client/e2e/onboarding.test.js @@ -60,10 +60,10 @@ test.describe('Onboarding', () => { await expect(budgetPage.budgetTable).toBeVisible({ timeout: 30000 }); const accountPage = await navigation.goToAccountPage('Checking'); - await expect(accountPage.accountBalance).toHaveText('700.00'); + await expect(accountPage.accountBalance).toHaveText('600.00'); await navigation.goToAccountPage('Saving'); - await expect(accountPage.accountBalance).toHaveText('200.00'); + await expect(accountPage.accountBalance).toHaveText('250.00'); }); test('creates a new budget file by importing Actual budget', async () => { diff --git a/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png b/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png index b25a320d879..514fef5fcd2 100644 Binary files a/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png and b/packages/desktop-client/e2e/settings.test.js-snapshots/Settings-checks-the-page-visuals-1-chromium-linux.png differ diff --git a/packages/desktop-client/src/components/budget/MobileBudget.js b/packages/desktop-client/src/components/budget/MobileBudget.js index d945c45cf38..c992a255fce 100644 --- a/packages/desktop-client/src/components/budget/MobileBudget.js +++ b/packages/desktop-client/src/components/budget/MobileBudget.js @@ -382,6 +382,7 @@ class Budget extends Component { onReorderGroup={this.onReorderGroup} onOpenActionSheet={() => {}} //this.onOpenActionSheet} onBudgetAction={applyBudgetAction} + onRefresh={onRefresh} savePrefs={savePrefs} /> )} diff --git a/packages/desktop-client/src/components/budget/MobileBudgetTable.js b/packages/desktop-client/src/components/budget/MobileBudgetTable.js index 48d3e0094b4..b650989f76e 100644 --- a/packages/desktop-client/src/components/budget/MobileBudgetTable.js +++ b/packages/desktop-client/src/components/budget/MobileBudgetTable.js @@ -18,6 +18,7 @@ import Label from '../common/Label'; import Menu from '../common/Menu'; import Text from '../common/Text'; import View from '../common/View'; +import PullToRefresh from '../responsive/PullToRefresh'; import { useServerURL } from '../ServerContext'; import CellValue from '../spreadsheet/CellValue'; import NamespaceContext from '../spreadsheet/NamespaceContext'; @@ -1526,6 +1527,7 @@ export function BudgetTable(props) { onShowBudgetDetails, // onOpenActionSheet, onBudgetAction, + onRefresh, savePrefs, } = props; @@ -1742,83 +1744,85 @@ export function BudgetTable(props) { - {!editMode ? ( - // (this.list = el)} - // keyboardShouldPersistTaps="always" - // refreshControl={refreshControl} - // style={{ backgroundColor: colors.n10 }} - // automaticallyAdjustContentInsets={false} - // > - - - - ) : ( - // - // - // {({ - // dragging, - // onGestureEvent, - // onHandlerStateChange, - // scrollRef, - // onScroll - // }) => ( - - - + + {!editMode ? ( + // (this.list = el)} + // keyboardShouldPersistTaps="always" + // refreshControl={refreshControl} + // style={{ backgroundColor: colors.n10 }} + // automaticallyAdjustContentInsets={false} + // > + + + + ) : ( + // + // + // {({ + // dragging, + // onGestureEvent, + // onHandlerStateChange, + // scrollRef, + // onScroll + // }) => ( + + + - // - // - )} + // + // + )} + diff --git a/packages/desktop-client/src/components/settings/Encryption.tsx b/packages/desktop-client/src/components/settings/Encryption.tsx index 23d6d7517db..6f062587c10 100644 --- a/packages/desktop-client/src/components/settings/Encryption.tsx +++ b/packages/desktop-client/src/components/settings/Encryption.tsx @@ -74,7 +74,10 @@ export default function EncryptionSettings() { End-to-end encryption is not available when running without a server. Budget files are always kept unencrypted locally, and encryption is only applied when sending data to a server.{' '} - + Learn moreā€¦ diff --git a/packages/desktop-client/src/components/settings/index.tsx b/packages/desktop-client/src/components/settings/index.tsx index 28e667fa278..26985c78074 100644 --- a/packages/desktop-client/src/components/settings/index.tsx +++ b/packages/desktop-client/src/components/settings/index.tsx @@ -72,7 +72,10 @@ function About() { )} - + Release Notes diff --git a/packages/desktop-client/src/style/themes/dark.ts b/packages/desktop-client/src/style/themes/dark.ts index 50b045f77dd..f86d870c6e2 100644 --- a/packages/desktop-client/src/style/themes/dark.ts +++ b/packages/desktop-client/src/style/themes/dark.ts @@ -195,7 +195,7 @@ export const formInputShadowSelected = colorPalette.purple200; export const altFormInputShadowSelected = formInputShadowSelected; export const formInputTextHighlight = colorPalette.purple400; -export const pillBackground = colorPalette.navy600; +export const pillBackground = colorPalette.navy800; export const pillText = colorPalette.navy200; export const pillTextHighlighted = colorPalette.purple500; export const pillBorder = colorPalette.navy700; diff --git a/packages/loot-core/src/server/importers/ynab5-types.d.ts b/packages/loot-core/src/server/importers/ynab5-types.d.ts index 2b363248bbb..c96d06a093e 100644 --- a/packages/loot-core/src/server/importers/ynab5-types.d.ts +++ b/packages/loot-core/src/server/importers/ynab5-types.d.ts @@ -25,6 +25,7 @@ export namespace YNAB5 { id: string; name: string; deleted: boolean; + transfer_acct?: string; } interface CategoryGroup { @@ -61,6 +62,7 @@ export namespace YNAB5 { category_id: string; memo: string; amount: number; + transfer_account_id: string; } interface Month { diff --git a/packages/loot-core/src/server/importers/ynab5.ts b/packages/loot-core/src/server/importers/ynab5.ts index 320213b2822..8641d82cb22 100644 --- a/packages/loot-core/src/server/importers/ynab5.ts +++ b/packages/loot-core/src/server/importers/ynab5.ts @@ -143,6 +143,13 @@ async function importTransactions( let transactionsGrouped = groupBy(data.transactions, 'account_id'); let subtransactionsGrouped = groupBy(data.subtransactions, 'transaction_id'); + const payeesByTransferAcct = payees + .filter((payee: YNAB5.Payee) => payee?.transfer_acct) + .map((payee: YNAB5.Payee) => [payee.transfer_acct, payee]); + const payeeTransferAcctHashMap = new Map( + payeesByTransferAcct, + ); + // Go ahead and generate ids for all of the transactions so we can // reliably resolve transfers for (let transaction of data.transactions) { @@ -178,11 +185,22 @@ async function importTransactions( entityIdMap.get(transaction.transfer_transaction_id) || null, subtransactions: subtransactions ? subtransactions.map(subtrans => { + let payee = null; + if (subtrans.transfer_account_id) { + const mappedTransferAccountId = entityIdMap.get( + subtrans.transfer_account_id, + ); + payee = payeeTransferAcctHashMap.get( + mappedTransferAccountId, + )?.id; + } + return { id: entityIdMap.get(subtrans.id), amount: amountFromYnab(subtrans.amount), category: entityIdMap.get(subtrans.category_id) || null, notes: subtrans.memo, + payee, }; }) : null, diff --git a/upcoming-release-notes/1765.md b/upcoming-release-notes/1765.md new file mode 100644 index 00000000000..023b0b4297e --- /dev/null +++ b/upcoming-release-notes/1765.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [Evomatic] +--- + +Dark mode - darker tint for pageTextLink. diff --git a/upcoming-release-notes/1836.md b/upcoming-release-notes/1836.md new file mode 100644 index 00000000000..e6c6ff8735f --- /dev/null +++ b/upcoming-release-notes/1836.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [Marethyu1] +--- + +UPDATES NYNAB import to support importing transactions that contain sub transactions that are account transfers diff --git a/upcoming-release-notes/1858.md b/upcoming-release-notes/1858.md new file mode 100644 index 00000000000..e93688883cd --- /dev/null +++ b/upcoming-release-notes/1858.md @@ -0,0 +1,6 @@ +--- +category: Enhancements +authors: [joel-jeremy] +--- + +Mobile budget pull down to sync.