Compare commits

..

393 Commits

Author SHA1 Message Date
Joel Jeremy Marquez
8e71dcccd8 Release notes 2024-01-28 23:49:56 -08:00
Joel Jeremy Marquez
de9a1880a7 Migrate LoadBackup to ts 2024-01-28 23:49:10 -08:00
youngcw
43ebe9e0fd fix bad account sort order in demo (#2279)
* fix bad sort order in demo

* note

* add async back

* fix tests

* fix2

* fix3

* update vrt

* fix image
2024-01-26 09:12:54 -07:00
youngcw
515bdf5a74 update vrt instructions (#2287)
* update

* note

* revise
2024-01-26 09:06:12 -07:00
Ed
018714610a Updating link for GoCardless Bank Account Sync (#2276)
* Updating link for GoCardless Bank Account Sync

* Adding release notes

* Update URL to point to docs

* Fixing lint
2024-01-26 07:11:18 -08:00
Joel Jeremy Marquez
00ee165f8e Mobile Off Budget category label (#2284)
* Mobile Off Budget category label

* Release notes

* Fix error

* Fix release notes
2024-01-26 07:09:29 -08:00
Neil
68442ae9e6 Custom reports: hide "show ..." checkboxes in menu (#2174)
* Add Toggles

* budget table

* testing

* updates

* updates

* fixes

* updates

* fix Menu

* lint fixes

* fix keybindings

* revert budget menu changes

* notes

* remove default exports

* fixes

* disabled fix

* add style option

* lint fix

* remove css

* lint fixes

* color updates

* merge menu with togglemenu

* host

* menu fixes

* fix regression

* remove host

* adjustments

* onToggle

* vrt fix

* typecheck

* merge fixes

* colors

* lint fix
2024-01-24 21:49:12 +00:00
shall0pass
b937bfae04 [Bugfix] Goals: Database entry (#2281)
* fix database insertion

* dbMonth format

* release note
2024-01-24 14:51:38 -06:00
DJ Mountney
317e7f135e 🐛 Avoid passing a boolean to the import trans category title (#2278)
* Avoid passing a boolean to the import trans category title

- Fixes an error regading passing false to title
  when category is not available
2024-01-24 11:23:02 -08:00
DJ Mountney
5adb083575 🐛 Fix a missing ref param warning for forwardRef (#2277)
* Fix a missing ref param warning for forwardRef

- Drop unused usage of forwardRef on TableWithNavigator
2024-01-24 11:13:43 -08:00
Joel Jeremy Marquez
524bd4e9eb Update vite / swc / ts versions (#2268)
* Update vite / swc / ts versions

* Release notes

* Revert root tsconfig module changes

* yarn dedupe

* Dummy update to run pipeline

* Update webpack and playwright

* Update playwright docker images
2024-01-24 10:49:12 -08:00
Matiss Janis Aboltins
9dfd6ce34c 🐛 fix uncategorized transaction banner flashing on load (#2273) 2024-01-23 08:23:32 +00:00
Matiss Janis Aboltins
5d28bc0e3b 🏷️ making some files comply with strict TS (#2247) 2024-01-22 19:01:05 +00:00
Matiss Janis Aboltins
a4e97e0070 ♻️ refactored cash-flow report from victory to recharts (#2260) 2024-01-22 08:34:51 +00:00
Matiss Janis Aboltins
a6e38ad2ae allow un-reconciling (unlocking) transactions (#2252) 2024-01-22 08:34:40 +00:00
Matiss Janis Aboltins
bb0ae4ebc3 🔥 removing unused variables (batch 2) (#2256) 2024-01-21 14:55:24 +00:00
youngcw
dd29e02c5c fix color of schedule before/after weekend box (#2261)
* fix color of schedule after box

* note
2024-01-20 15:37:34 -07:00
Zach Whelchel
75186183eb SimpleFin (#2188)
* Some initial UI work for adding SimpleFin.

* SimpleFin proof of concept working.

* Adds linking & unlinking to existing accounts through the account menu UI.

* Added loading and lint fixes.

* Lint changes.

* Added release notes.

* Typecheck cleanup.

* Import, lint, typecheck cleanups.

* More typecheck cleanup.

* Refactored language for consistency.

* Added default institution name.

* Lint cleanup.

* Addressed change requests.

* Added a default to migration, made variables consistent, added feature flag.

* Added account_sync_source to server schema.

* Adds account_sync_source to test.

* Fix for typecheck.

* Attempt to make typecheck happy.

* Added strict ignore.

* Moved account_sync_source to the right model (face palm).

* Hotfix for institution format.

* Lint cleanup.

* Removed unnecessary promise.all.

* Lint cleanup.
2024-01-20 14:35:52 -08:00
Neil
83f13cbdc8 add compact to custom reports (#2258)
* add compact

* notes
2024-01-20 21:18:15 +00:00
DJ Mountney
0045d9212e Bundle loot-core types into the API (#2053)
* Bundle loot-core types into the API

So we can have loot-core be the source of truth
for some types that get passed through

- Improves downstream development with API by including types
- Use path aliases for dist vs dev tsconfigs
- Convert api index to typescript as example
- Permit ts-ignore for issues with our version of typescript

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2024-01-20 10:30:23 -08:00
Matiss Janis Aboltins
dd254c6c23 🔧 add link to community discord for support (#2250) 2024-01-20 10:40:52 +00:00
Neil
c66d6e00f5 Custom Reports - add schema (#2246)
* Add schema work

* notes

* merge fixes

* add to handlers

* notes update

* Update packages/loot-core/src/server/reports/app.ts

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>

* review changes

* type updates

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2024-01-20 10:22:28 +00:00
Matiss Janis Aboltins
ae3be13aa8 🔥 removing unused variables (batch 1) (#2255) 2024-01-19 23:02:21 +00:00
Neil
cd9d1fb674 Clean-up some custom reports code (#2254)
* work

* missed

* notes

* change element name

* update

* update changes

* merge fixes
2024-01-19 22:39:09 +00:00
Matiss Janis Aboltins
edba670d3a ⬆️ (prettier) upgrade, fix issues and enable for jsx files (#2253) 2024-01-19 21:48:30 +00:00
Matiss Janis Aboltins
fbb1a9647d 🐛 fix 'delete budget' button always deleting cloud file (#2251)
Closes #2216
2024-01-19 20:04:00 +00:00
Neil
06cf65497f Custom Reports: fix broken table (#2249)
* fix broken table

* notes

* error fixes
2024-01-19 19:37:14 +00:00
Neil
62a0a0fedc Custom Reports compact additions (#2245)
* compact additions

* notes

* vrt fix

* revert AnchorLink

* Update upcoming-release-notes/2245.md

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>

* merge fixes

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2024-01-19 08:59:47 +00:00
Neil
106dce25dd Custom Reports update entites (#2244)
* work

* notes

* missing entity

* lint
2024-01-18 22:39:42 +00:00
Matiss Janis Aboltins
ff11399180 ♻️ (typescript) fixing strictNullChecks=true issues (#2228)
* ♻️ (typescript) fixing strictNullChecks=true issues

* Patch test-helpers

* Strict patch
2024-01-18 08:23:50 +00:00
Matiss Janis Aboltins
363c9e4afb 🐛 (gocardless) fix sync when additionalInformation field is null (#2238) 2024-01-18 08:23:29 +00:00
Neil
e745a4073b Custom Reports: fix table rendering (#2192)
* reorg

* notes

* Add render

* privacy Filter additions

* merge fixes

* notes

* merge fixes

* Apply patches for strict mode

* review fixes

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2024-01-16 20:14:38 +00:00
DJ Mountney
7d1a895b48 Restore ability to use console.log in vite (#2233)
Restore ability to use console.log in vite

- Swap our swc plugin to remove-react-properties
- Configure remove-react-properties to preserve our testids
2024-01-16 09:40:44 -08:00
DJ Mountney
a8b42bcd50 Change the vite chunk filename hash usage (#2224)
* Change the vite chunk filename hash usage

- Change to more closely match the . syntax we use with webpack
- This should fix some issues with our size compare as well
* Account for chunks being base64
2024-01-15 09:47:09 -08:00
Matiss Janis Aboltins
f33bce41ea ♻️ (typescript) enable strict mode everywhere (#2230) 2024-01-15 08:24:33 +00:00
Ikko Eltociear Ashimine
cdefe6133f chore: Update actions.ts (#2227)
non-existant -> non-existent
2024-01-14 16:13:48 +00:00
Nik
44a5199a31 Add split distribution (#2151)
* Add split distribution feature

* Add upcoming release notes

* Fix tests

* Fix remaining test

* Disable distribute button when all transactions are filled

* Add canDistributeRemainder

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2024-01-13 15:43:13 -08:00
Neil
dccad902d6 vite host regression fix (#2217)
add host to vite config
2024-01-12 17:45:20 -08:00
Neil
b477f7c2f1 Custom Reports: Enable Show Labels (#2124)
* work

* updates

* merge fixes

* syntax fix

* Add Label element

* updates

* notes

* normalize customLabel

* fix

* range adjustments

* margin update

* merge fixes

* review Updates

* labelFix

* Fix adjustTextSize
2024-01-12 21:46:22 +00:00
Stefan Hall
540c410957 fixed:issue->#1968 Import from nYNAB fails with unknown error (#2191)
* Allow case insensitive ynab5 import for special 'starting balance' payee

* set upcoming release number to related github issue

* extract string comparison into separate function

and reuse when checking starting balance/s on ynab4 import

* make all category group checks case insensitive

when importing from ynab5 to make the check strategy consistent when importing from ynab5

* extract findById into sreusable function

to 'simplify' usage

* Add null check

Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>

---------

Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>
2024-01-12 12:59:31 -08:00
Matiss Janis Aboltins
e205344867 ♻️ (typescript) fixing strictNullChecks=true issues (#2212) 2024-01-12 17:49:54 +00:00
HansiWursti
8b968579b1 Proposal - Disable Save Button in Mobile Transaction View if field is edited (#2214)
* Disable SaveButton if field is edited

* Add Release Notes and fix VRT
2024-01-12 08:57:22 -08:00
Matiss Janis Aboltins
6ce794ffcc 🔥 (ofx) removing old parser (#2215)
* 🔥 (ofx) removing old parser

* Release notes

* Patch unit test
2024-01-12 07:27:18 -08:00
DJ Mountney
d5359a96ca Proposal for switching desktop-client to vite (#2084)
* Proof of concept for switching desktop-client to vite

* Fix other packages ts tests issues

* Update jsx tests to use vitest instead of jest

* Inject our global shims properly

* Add comment regarding new plugin

* Cleanup unnessary change after rebase

* Fix inter fonts pathing

* Remove manual chunks sizes for now

Just set the limit higher

* Bring back size compare

* Suppress victory warnings

* Remove craco config now that it's not used

* Add vite basic ssl plugin

- This autogenerates self-signed certs in dev mode when HTTPS env is set
- Made to match the CRA behaviour

* Add release note

* Remove warning suppression for victory

- Updated to a rollup version that includes the fix
2024-01-11 10:18:49 -08:00
Matiss Janis Aboltins
3eee0b11d2 🐛 (autocomplete) fix multi-autocomplete causing crashes (#2207) 2024-01-10 17:15:34 +00:00
HansiWursti
e792afb1fd ReAdd Mobile Account Error Page (#2204)
* Add "error" Page for special accounts in Mobile
2024-01-09 15:06:24 -08:00
HansiWursti
4fb55d0d70 Mobile - Add cleared and uncleared Balances in Account Details (#2056)
* - Added Mobile Account Cleared and Uncleared
  Balanced

* Changed font size

* Add release notes

* Changed Visibility

* Centered the different Values

* Updated VRT

* Fix merge Conflict?!
2024-01-09 15:06:01 -06:00
DJ Mountney
b330991855 Add proper types to runHandler (#2136)
* Add proper types to runHandler

- Args and return values from runHandler should now work within loot core
- Updated some of the handler types to be more accurate
2024-01-09 13:05:15 -08:00
shall0pass
165ad45822 [Enhancement] Add crossorigin field to manifest line (#2206)
* add crossorigin

* release note

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2024-01-09 15:04:22 -06:00
Joel Jeremy Marquez
295917036b ESLint to enforce Actual's useNavigate hook (#2208)
* ESLint to enforce Actual's useNavigate hook

* Release notes

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2024-01-09 13:03:09 -08:00
Matiss Janis Aboltins
ef9a7cfe85 🔧 (ci) fork the electron build job - master and PR (#2209) 2024-01-09 20:06:50 +00:00
Matiss Janis Aboltins
4ece4a7ff6 ♻️ (gocardless) rename nordigen_* secrets to gocardless_* (#2181) 2024-01-09 19:21:16 +00:00
DJ Mountney
761b3c6a16 Tests: Add api tests for payees and transactions (#2168)
* Tests: Add api CRUD tests for payees and transactions
2024-01-09 11:20:06 -08:00
Matiss Janis Aboltins
7ace8c52dd 🔧 (electron) release electron app to app store (osx) (#2182) 2024-01-09 18:54:57 +00:00
Subhaditya Nath
f6dd0ecdb9 Fix site.webmanifest to enable Actual to be installed as Chromium PWA (#2202) 2024-01-09 10:21:34 -06:00
rjwonder
97a4296d7c Update sync.ts with additionalInformation as fallback (#2176) 2024-01-09 08:53:15 +00:00
Matiss Janis Aboltins
89698480a5 🐛 (rules) add 'no rules' message & always show rule table (#2199) 2024-01-09 08:32:12 +00:00
Matiss Janis Aboltins
1a6db82cfb Revert "👷 (ci) adding helper comments for failed CI jobs (#2074)" (#2183)
This reverts commit e11b65719e.
2024-01-08 18:38:46 +00:00
Matiss Janis Aboltins
6ce502ea24 ♻️ refactor(electron): moving back from websockets to IPC (#2190) 2024-01-08 18:34:19 +00:00
youngcw
fd962a97b0 fix missing borders in single category drop down in report budget (#2195)
* fix missing borders in single category drop down in report budget

* note
2024-01-08 11:20:52 -07:00
youngcw
300ed824f0 change the pie chart background color in the report status (#2196)
* change the pie chart background color in the report status

* note
2024-01-08 11:20:29 -07:00
Neil
caca2497ea Add ability to import categories from CSV (#2163)
* update transaction table

* notes

* adjust parser
2024-01-08 17:51:51 +00:00
shall0pass
33e778fe9f [Maintenence] Refactor Goals Schedule file (#2102)
* refactor pass 1

* refactor pass 2

* refactor pass 3

* commented out startDate

* remove console logging

* release note

* non-repeating error

* add daily

* move else

* Fix compounding to_budget

* lint

* reapply 2125
2024-01-07 16:19:19 -06:00
Neil
8c43c78fc7 Custom reports reorganize table graph files (#2153)
* reorg

* notes

* Update upcoming-release-notes/2153.md

Co-authored-by: DJ Mountney <david.mountney@twkie.net>

* merge fixes

* fix

* another

* f

---------

Co-authored-by: DJ Mountney <david.mountney@twkie.net>
2024-01-07 21:55:21 +00:00
DJ Mountney
e0d82fd4f9 Revert "Add "error" Page for special accounts in Mobile" (#2186)
* Revert "Add "error" Page for special accounts in Mobile (#2114)"

This reverts commit b6462347a9.
2024-01-06 15:20:19 -08:00
HansiWursti
b6462347a9 Add "error" Page for special accounts in Mobile (#2114)
* Add "error" Page for special accounts in Mobile
2024-01-06 14:33:59 -08:00
Joel Jeremy Marquez
8bf0f8e5bf [TS migration] MobileBudget tsx (#2081)
* MobileBudget tsx

* Release notes

* Fix type error

* Update upcoming-release-notes/2081.md

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>

* SyncRefresh.tsx

* Remove loadCategories

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2024-01-06 14:32:16 -08:00
Joel Jeremy Marquez
bc07235017 ESLint no-default-export 13 - final (#2185)
* ESLint no-default-export 13 - final

* Release notes

* Fix lint error

* Add api/migrations to override

* Fix lint error
2024-01-06 14:00:13 -08:00
Joel Jeremy Marquez
794476ac51 ESLint no-default-exports 12 - all loot-core folders except server (#2184)
* ESLint no-default-exports 12 - All loot-core folders except server

* Release notes

* Fix imports
2024-01-06 13:49:02 -08:00
Joel Jeremy Marquez
30bc216142 ESLint no-default-exports 11 - icons (last one for desktop-client package) (#2173)
* ESLint no-default-exports 10 - icons

* Fix icon imports + lint errors

* Release notes

* Fix typecheck error

* Fix icon import

* Fix lint error
2024-01-06 13:38:54 -08:00
Joel Jeremy Marquez
6f8d2574ab ESLint no-default-exports 10 - all desktop-client src folders except icons (#2172)
* ESLint no-default-exports 10 - all desktop-client src folders except icons

* Release notes
2024-01-06 12:57:45 -08:00
Joel Jeremy Marquez
9262b46428 ESLint no-default-exports 9 - all components folder (#2171)
* ESLint no default exports 9 - components folder

* ESLint no default exports 9 - components folder 2

* Release notes
2024-01-06 12:35:50 -08:00
Joel Jeremy Marquez
8e1c11e18e ESLint no-default-exports 8 (#2170)
* Fix default imports

* Fix manager Modals import

* ESLint no default exports 8

* Release notes

* Schedules
2024-01-06 12:14:52 -08:00
Joel Jeremy Marquez
6b5ee3f774 ESLint no-default-exports 7 (#2169)
* Fix default imports

* Fix manager Modals import

* ESLint no default exports 7

* Release notes
2024-01-06 11:54:52 -08:00
Joel Jeremy Marquez
02d3f96c20 ESLint no-default-exports 6 - View.tsx (#2120)
* Fix default imports

* Fix manager Modals import

* ESLint no default export part 6 - View.tsx

* Fix default imports

* Fix imports

* Release notes
2024-01-06 11:40:09 -08:00
Joel Jeremy Marquez
829c83afb2 ESLint no-default-exports 5 - Text.tsx (#2119)
* Fix default imports

* Fix manager Modals import

* ESLint no-default-exports part 5 - Text.tsx

* Fix default import

* Release notes
2024-01-06 11:21:25 -08:00
Joel Jeremy Marquez
5d29585fb7 ESLint no default exports 4 (#2118)
* ESLint no-default-exports part 4

* Fix default imports

* Fix default imports

* Fix manager Modals import

* Release notes
2024-01-06 11:06:39 -08:00
Joel Jeremy Marquez
882fd9f5cd ESLint no-default-exports 3 (#2117)
* ESLint no default exports - part 3

* Fix default imports

* Release notes

* Fix Menu
2024-01-06 10:57:19 -08:00
Jason
d203def230 Fix when pressing Enter adds an extra split transaction when no split remains (#2144)
* Fix pressing enter adds split transaction when no split remains

* Added release notes

* Refactor to use find indstead of findIndex
2024-01-06 09:43:06 -08:00
Joel Jeremy Marquez
4d7cfab8bc ESLint no-default-exports 2 - Button.tsx (#2116)
* ESLint no default imports - Button

* Fix

* Release notes

* Fix Button imports
2024-01-06 09:32:06 -08:00
Joel Jeremy Marquez
84a9269ae4 ESLint no-default-exports 1 (#2115)
* ESLint no-default-imports part 1

* Release notes

* Remove Notes.tsx default export

* Fix Notes imports
2024-01-06 09:06:26 -08:00
Jakub Kuczys
83d2472a55 Ask for confirmation when editing date of a locked transaction (#2134)
* Ask for confirmation when editing date of a locked transaction

* Add release note
2024-01-06 08:14:00 -07:00
Khanh Nguyen
458d556e51 added cleared column in csv export (#2138)
* added cleared column in csv export

* added release note
2024-01-06 08:09:48 -07:00
Jason
d9aeb8db1e Change net worth graph to show more detail in compact card view (#2132)
* Change net worth graph to show more detail in compact card view

* Added release notes

* Update release notes

* Update VRT images
2024-01-06 08:06:24 -07:00
David Kus
85c0352abb Adding filter for reconciled transactions (#2108)
* Adding filter for reconciled transactions

* Adding release note
2024-01-06 08:05:49 -07:00
Matiss Janis Aboltins
7a40a645e6 ♻️ (TypeScript) fix strictFunctionTypes violations (pt 5) (#2072) 2024-01-06 12:58:08 +00:00
Matiss Janis Aboltins
7e9921e9e5 ♻️ (TypeScript) fix strictFunctionTypes violations (pt 4) (#2142) 2024-01-06 12:48:45 +00:00
Matiss Janis Aboltins
02aff1acbe 🔖 (24.1.0) Mobile split transactions (#2177) 2024-01-06 09:56:10 +00:00
Matiss Janis Aboltins
e0d66d3083 🐛 (rules) fix filtering in the rules page (#2141) 2024-01-05 19:06:32 +00:00
Joel Jeremy Marquez
d999e466b7 Fix mobile transaction page amount input (#2166)
* Request active edit on focus

* Release notes

* Track previous focus state

* use inputRef to focus

* Focus total amount effect

* Run active edit action synchronously

* Revert unneeded changes

* Run cleanup synchronously

* Cleanup

* runAction

* Space
2024-01-05 07:05:07 -08:00
Martin French
e589163bb7 [Goals] Negate schedule amount to budget if income (#2125)
* Negate schedule amount to budget if income

* Release notes

* Determine sign at initial calc

To ensure no unintended impact to remainder calcs etc.

* Lint fixes
2024-01-03 08:02:07 -06:00
Matiss Janis Aboltins
d2b86d100c 🐛 (import) fix reconciled transactions getting overriden on import (#2140) 2024-01-01 12:44:57 +00:00
Matiss Janis Aboltins
d8996405c4 revert: ♻️ (TypeScript) fix strictFunctionTypes violations (pt 4) (#2128) 2023-12-29 18:32:10 +00:00
Martin French
e548125907 [Bugfix] Fix update transaction API bug (#2127) 2023-12-27 17:20:58 +00:00
Neil
edbcaba89b Custom reports header fix (#2085)
* tablechanges

* notes

* trigger rerun

* fixes

* lint fixes
2023-12-26 17:55:41 +00:00
Joel Jeremy Marquez
b39d106c04 Mobile category modal menu (#1964)
* Mobile category modal menu

* Release notes

* Apply category and group modals

* Category modal updates + notes

* Reduce notes modal view height

* Update CategoryGroupMenu modal view height

* Update CategoryMenu modal view height

* Fix lint error

* No notes text

* Add budget-table testid on edit mode

* Fix lint error

* Fix lint error

* Remove edit mode tooltip

* Update modals

* Updates + Simplify code by removing edit mode

* Optional closeModal arg

* Fix mobile budget table category divider

* Cleanup + close modal on click outside

* collapseModals action

* Fix lint errors

* Category modal hidden menus + Lift edit state to MobileBudget component

* Hide category / group actions when editing title

* Add margins between buttons

* Fix lint errors
2023-12-22 14:35:46 -08:00
Joel Jeremy Marquez
4894118809 Mobile split transactions (#2068)
* Mobile split transactions

* Release notes

* Fix colors

* Update test ids

* AmountInput component on split transactions

* Add notes to mobile split transaction

* Ease of use improvements + functional components

* Ease of use updates

* VRT updates

* Fix AmountInput blur

* Remove negative state in AmountInput + fix vrt
2023-12-22 13:53:39 -08:00
Matiss Janis Aboltins
c6723da780 ♻️ (TypeScript) fix strictFunctionTypes violations (pt 4) (#2071) 2023-12-22 21:20:29 +00:00
Neil
7a8c320560 Custom Reports Donut Graph refactor (#2098)
* donut refactor

* notes

* fixes
2023-12-22 20:31:36 +00:00
Joel Jeremy Marquez
6fbf0fdc10 [ESLint] Enable prefer-const project-wide (#2113)
* Enable prefer-const project-wide

* Release notes

* Fix remaining lint errors
2023-12-22 11:42:40 -08:00
Matiss Janis Aboltins
efaefcfaa9 ♻️ (typescript) moving DeleteFile modal to TS (#2112) 2023-12-22 19:13:49 +00:00
Matiss Janis Aboltins
73d281b6ee ♻️ (eslint) disallow unnecessary curly braces (#2111) 2023-12-22 09:30:05 +00:00
Matiss Janis Aboltins
03e943f383 ♻️ (TypeScript) fix strictFunctionTypes violations (pt 3) (#2070) 2023-12-22 09:29:48 +00:00
Matiss Janis Aboltins
5854dffd50 🐛 fix category spending report (#2096) 2023-12-19 18:40:08 +00:00
Matiss Janis Aboltins
c727e3e980 ♻️ (TypeScript) fix strictFunctionTypes violations (pt 2) (#2066) 2023-12-19 18:01:06 +00:00
youngcw
b385c715ef [Goals]: don't run templates in hidden groups (#2100)
* don't run templates in hidden groups

* note

* lint
2023-12-18 08:00:30 -07:00
youngcw
77e550f028 [Goals]: fully skip budgeted categories when only applying (#2099)
* remove budgeted categories from list when only applying

* cleanup

* speed up the category removal

* note
2023-12-18 07:58:49 -07:00
DJ Mountney
9ea8e86bb3 (ESLint) Enforce filename extensions for jsx (#2101) 2023-12-18 11:00:47 +00:00
Neil
273fa8cd59 Custom reports: make views global (#2094)
* make views global

* notes and lint fixes

* fixes

* lint fix

* fix

* fix
2023-12-17 22:18:57 +00:00
IzStriker
d4c8b5fa16 [TS migration] Reafactor tooltips.js to use typescript (#2073) 2023-12-17 20:55:16 +00:00
Neil
e62e8ca24e Custom Reports Enable Legend (#2078)
* enable Legend

* notes

* adding type

* overhaul

* calculateLegend
2023-12-16 21:38:45 +00:00
Neil
4497fbcb10 Custom Reports date paused (#2080)
* work

* fixes

* updates

* update table layout

* revert changes

* notes

* updae names and improve flow
2023-12-15 15:05:06 -08:00
Matiss Janis Aboltins
8a15caf42d ♻️ (TypeScript) fix strictFunctionTypes violations (pt 1) (#2065) 2023-12-15 18:09:36 +00:00
iOSLife
af9efa09f0 API – Return Hidden for Category and CategoryGroup (#2062) 2023-12-15 18:09:14 +00:00
HansiWursti
a5557ca032 Fix issue 1878 (#2093)
* Fix issue 1878

* Add release notes
2023-12-15 10:38:47 -07:00
HansiWursti
0bf587bcf5 Added BG Color to view to fix Issue 2089 (#2092)
* Added BG Color to view to fix Issue 2289

* add release notes
2023-12-15 08:46:52 -07:00
Matiss Janis Aboltins
e11b65719e 👷 (ci) adding helper comments for failed CI jobs (#2074) 2023-12-14 19:02:05 +00:00
Julian Dominguez-Schatz
c09a85f340 Add schedule end date/count field (#1899)
* Add "end" field with date/count options

* Use "end" field to generate schedule

* Show "end" field in recurring description

* Disable weekend before/after picker when not enabled

* Add release notes

* Fix failing typechecks

* Add some description tests

* PR feedback

* 'Features', not 'Feature'

* Fix goal templates infinite loop

* Empty commit to bump ci

* Fix bug where schedule templates in the past would apply incorrectly

For example, if you had a schedule which started in November 2023 for
1.00, and you applied the schedule in October 2023, then you would end
up with a value of 0.50 applied in October.

* Fix handling of schedules with an end date

This commit also includes a refactor of the skip-weekend logic: rather
than referring only to dates with skipped weekends (which requires
checking whether the "next date" request worked correctly), we track a
"base date" which is the previous value of the schedule according to the
rrule, excluding any weekend-skipping. This lets us use `addDays(baseDate, 1)`
to get the next occurrence, regardless of the weekend behaviour.

Doing things this way ensures that the loop will always make progress.

* Only compute skipped weekend if weekend skips were requested

* Fix typo in iterate-schedule-occurrences code

We should be using `nextBaseDate` to derive the next base date, not
`nextDate`; this is because we want the base date to be guaranteed to
make progress in each loop iteration, so we can finish in at most 30
iterations without duplicate base dates.

* Use const

* Revert const -> let for one mutable variable
2023-12-14 05:43:16 -06:00
Joel Jeremy Marquez
f90fe04b2b Add left and right margins to modals (#2082)
* Add left and right margins to modals

* Release notes
2023-12-13 19:47:47 -08:00
spezzino
ca55d9c85e add support for auto theme (#1906)
* add support for system theme

* add release notes

* Rename auto theme

* add theme selector

* update visual snapshots

* update snapshots

* update snapshots
2023-12-13 15:10:14 -07:00
Neil
4ada92071e Custom Reports typescript updates and small functional changes (#2046)
* work

* notes

* error fixes

* updates

* card fix

* fix filters

* fixes
2023-12-12 11:34:58 -08:00
DJ Mountney
e848946898 Remove older version of react-router (#2064) 2023-12-12 17:58:22 +00:00
Neil
9da05543c3 Dark Theme color fixes (#2048)
* subdued fix

* notes

* fixes

* upcoming

* autocomplete menu

* make notes consistenet on budget page

* VRT updates
2023-12-12 06:40:52 -08:00
Neil
8a721bf2e0 Renaming variables for reports files (#2069)
* work

* notes

* error fixes

* updates

* card fix

* fix filters

* splitting PR work

* notes

* fixes

* lint fix

* Update upcoming-release-notes/2069.md

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2023-12-12 05:06:05 -08:00
Lucas
36914abcd4 Cashflow.js -> Cashflow.tsx (#2005) 2023-12-12 10:21:48 +00:00
Neil
cd2d186599 Add new types for reports files (#2067)
* work

* notes

* error fixes

* updates

* card fix

* fix filters

* splitting PR work

* notes
2023-12-11 16:31:25 -08:00
Joel Jeremy Marquez
b3bcff094d [Maintenance] ESLint - prefer-const on loot-core server (#2032)
* Another round of prefer-const rule updates

* Release notes

* Fix test error

* Fix sync.ts
2023-12-09 13:22:16 -08:00
Matiss Janis Aboltins
7955fe7aed ♻️ (typescript) refactor FixedSizeList to TS (#2022) 2023-12-07 19:30:29 +00:00
Neil
2741422c0a Custom Reports optimization (#1988)
* Range fix and payee fix

* bug fixes and UI tweaks

* range options, hover UI

* Select - UnSelect All Buttons

* fix hidden group bug

* YAxis PrivacyFilter

* notes

* more privacyFilter graphs

* overflowY fix

* Loading Indicator

* Fix Filter button hover

* data revamp

* review fixes

* LoadingIndicator fixes

* remove a loop

* filterbuttontype

* lint fixes

* review fixes

* filtersbutton

* updates

* Split out functions to separate files

* uncategorized optimization

* rename ambiguous variables

* notes

* remove indexStack

* renaming variables

* Improve scrolling of tableGraph

* revert renaming variables

* code fixes

* lint fixes

* review fixes

* fix

* review fixes

* variable name changes

* const eslint fixes

* remove indexStack
2023-12-06 09:33:19 -08:00
Tuhin Ghose
cde4551eb7 [Maintenance] Migrating util.js and chartTheme.js to typescript (#2009) 2023-12-06 08:26:17 +00:00
Matiss Janis Aboltins
7174fccfe4 ♻️ (typescript) adding strict typings to utils.ts (#2023) 2023-12-06 08:22:33 +00:00
Joel Jeremy Marquez
0303292a28 [Maintenance] ESLint: prefer-const components folder part 2 (#2034)
* ESLint prefer-const components folder part 2

* Release notes
2023-12-05 13:36:29 -08:00
Joel Jeremy Marquez
f95df06800 [Maintenance] ESLint: prefer-const components folder part 1 (#2033)
* ESLint prefer-const components folder part 1

* Release notes
2023-12-05 13:14:37 -08:00
DJ Mountney
3680d45814 Add API category tests (#2036) 2023-12-05 20:08:48 +00:00
Joel Jeremy Marquez
dc872647a9 [Maintenance] Use Page component for mobile pages (#1993)
* Use Page component for mobile pages

* Release notes

* Use Button instead of Link in MobileBackButton

* Update mobile budget table to use Page component

* Settings page cleanup

* Fix lint error

* Updates + small font size increase in  page headings

* Fix rebase error

* Button height

* Revert payees navtab
2023-12-05 11:18:35 -08:00
Matiss Janis Aboltins
7a45d467b7 ♻️ (eslint) enable 'react/no-children-prop' rule and fix issues (#2029) 2023-12-05 18:58:22 +00:00
Joel Jeremy Marquez
79aa07ff1a Fix bulk edit field modal in desktop (#2031)
* Fix bulk edit field modal in desktop

* Release notes
2023-12-05 09:44:30 -08:00
Kyle Mckay
c4ff099f26 Fix failure to create category with deleted name (#2002)
* Fix failure to create category with deleted name

I'm not 100% familiar with the design of the data model so may have
misinterpreted what's going on here, but how I read this:

- The tombstone flag is used to soft delete categories.
- When creating a new category, duplicate names within a group are
  prevented.
- When checking for duplicate names, the tombstone flag was unchecked
  which meant deleted categories were falsely blocking creation.

I had a look at category deleteion logic to verify that simply including
the tombstone flag in this check is sane and see that there's a category
mapping being maintained to redirect one category to another on
deletion. So from what I can tell the correct behaviour here is to allow
a new category with the previously deleted name, rather than to revive
the old category (to preserve that old mapping lineage).

* Add release note

* Add regression test
2023-12-05 08:48:16 -07:00
Vishnu Kaushik
ad2b577515 Fix #1977: Filter Amount formatting issue (#2008)
* Fix #1977: Filter Amount formatting issue

* Fix linting and add release notes
2023-12-05 08:42:54 -07:00
Michael Clark
5f52801869 [Maintenance] Adding Aria labels for accessibility (#2025) 2023-12-04 19:31:38 +00:00
Ameek Singh
6bfd9586e0 [Maintenance] Converting dateRange and useReport to tsx (#2007) 2023-12-02 22:43:56 +00:00
Michael Clark
f36713e0be [Maintenance] BudgetTotals, GoCardlessLink, Import, WelcomeScreen components to Typescript. (#2004) 2023-12-02 22:43:29 +00:00
DJ Mountney
8b20169b59 Add some initial api tests for budgets and accounts (#1991) 2023-12-02 20:42:53 +00:00
Matiss Janis Aboltins
da03acc394 🔖 (23.12.0) darkmode, transaction locking, mobile updates and more (#2003) 2023-12-02 19:26:02 +00:00
Joel Jeremy Marquez
5d1f2d48ae Larger mobile autocomplete fonts and paddings (#1900)
* Larger mobile autocomplete fonts and paddings

* Release notes

* VRT + update tests

* Update tests

* Update data-highlighted and tests

* Use styles text

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Adjust Add Transaction padding + VRT updates

* Larger autocomplete text and divider

* Fix rebase

* Fix rebase

* Fix icons

* Adjust fonts

* Fix lint errors

* PR feedback

* VRT

* Update embedded autocomplete highlight hover color

* Refactor create payee button

* Embedded create payee button color

* Dummy change to re-run CI
2023-12-01 13:10:01 -08:00
youngcw
c96782d7c1 [Goals]: Sort the priorities properly (#2000)
* sort properly

* note
2023-12-01 08:40:35 -07:00
Neil
5d61dfce68 Update rules API (#1987)
* Update rules.ts

* notes

* Update packages/loot-core/src/server/accounts/rules.ts

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>

* Entity update

* fix

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2023-11-30 10:27:51 -08:00
youngcw
5a81a25b7e fix broken schedule amount sign in firefox (#1992)
* fix broken schedule amount sign in firefox

* note

* delete line
2023-11-30 09:50:31 -07:00
Stefan Hall
29f323e721 Validates minimum node version to 18.12.0 for @actual-app/api npm package (#1980) 2023-11-28 19:19:18 +00:00
shall0pass
c462604833 [Bugfix] Goals: Schedule overbudget condition (#1984)
* fix overbudget in schedules template

* release note
2023-11-27 18:18:26 -06:00
Neil
e48f36cd20 Custom Reports Bug Fixes (#1930)
* Range fix and payee fix

* bug fixes and UI tweaks

* range options, hover UI

* Select - UnSelect All Buttons

* fix hidden group bug

* YAxis PrivacyFilter

* notes

* more privacyFilter graphs

* overflowY fix

* Loading Indicator

* Fix Filter button hover

* review fixes

* LoadingIndicator fixes

* remove a loop

* filterbuttontype

* review fixes

* filtersbutton

* updates
2023-11-26 12:19:58 -08:00
Michael Clark
1ed84059d7 [Maintenance] Update ConfirmCategoryDelete, GoCardlessExternalMsg, ManageRulesModal to tsx (#1972) 2023-11-26 19:49:26 +00:00
William Kurniawan
5d8b96a749 Fix cancel add category group (#1975) 2023-11-26 16:38:05 +00:00
Julian Dominguez-Schatz
0920bdc3fa Fix bug in rule transaction apply preventing amount overrides (#1976) 2023-11-26 16:35:09 +00:00
Mohamed Muhsin
c3a9b4dda3 [refactor] Migrate Discover schedules to tsx (#1946) 2023-11-26 15:51:18 +00:00
Matiss Janis Aboltins
eab0068428 🎨 (fix) gocardless success button color (#1970) 2023-11-26 15:50:28 +00:00
Joel Jeremy Marquez
0d1b962b2f Fix budget amount not saved when clicking on another budget cell (#1965)
* Fix budget amount not saved when clicking on another budget cell

* Release notes
2023-11-25 16:52:38 -08:00
Joel Jeremy Marquez
67b9143dfc Transfer and Off Budget category in mobile (#1955)
* Transfer and Off Budget category in mobile

* Release notes

* Fix typo

* Update lookupName callers
2023-11-25 16:52:05 -08:00
Zach Whelchel
e7f298e32a [Bugfix] Fixed modal error and transactions now unlock when moved across accounts. (#1962) 2023-11-25 14:52:01 +00:00
Matiss Janis Aboltins
516f0c259f 🔧 (vrt) make screenshot comparisons more strict (#1960) 2023-11-25 14:34:24 +00:00
Neil
2c87c60328 Dark Theme Live (#1925)
* Remove Featureflag

* notes

* VRT updates

* Dark Theme fixes

* VRT updates

* VRT updates

* Revert "VRT updates"

This reverts commit 7d669f2df2.

* Revert VRT

Reverting VRT

* VRT updates

* pillbackground

* VRT updates

* Theme Selector

* VRT Updates

* notes

* VRT updates
2023-11-24 13:20:03 -08:00
DJ Mountney
b4fd6e86ed Create category rules for ynab imports (#1944) 2023-11-23 08:36:15 +00:00
Matiss Janis Aboltins
a3e71a8b49 🔧 (eslint) enable object-shorthand:properties rule (#1959) 2023-11-22 22:52:53 +00:00
Joel Jeremy Marquez
aa9c992f2e Part 2 of eslint prefer-const (#1958)
* Part 2 of eslint prefer-const

* Release notes

* Update
2023-11-22 14:28:09 -08:00
Zach Whelchel
ca498b19cc Lock transactions after reconcilliation (#1789) 2023-11-22 22:14:34 +00:00
Matiss Janis Aboltins
8be2389fd9 ♻️ (typescript) ported gocardless auth file to TS (#1941) 2023-11-22 21:54:43 +00:00
Matiss Janis Aboltins
46988800ef ♻️ (typescript) refactor global-events to TS (#1942) 2023-11-22 19:35:30 +00:00
Joel Jeremy Marquez
881999bcfe ESLint prefer-const (#1956) 2023-11-22 11:12:22 -08:00
Joel Jeremy Marquez
9c124e8e44 Consistent button size in budget title bar + use zondicon eye icon (#1951)
* Consistent button size in budget title bar + use zondicon eye icon

* Release notes

* VRT
2023-11-22 11:02:02 -08:00
Kyle Mckay
3306963c54 [Maintenance] Refactor payee table to typescript (#1948) 2023-11-22 17:58:07 +00:00
Kyle Mckay
baa474843a [Maintenance] Split up large payee management components file (#1950) 2023-11-21 19:27:20 +00:00
Matiss Janis Aboltins
6ed1b58321 🔧 (eslint) disallow using 'var': no-var rule (#1949) 2023-11-21 19:18:13 +00:00
Paul Sukow
28266ed9a2 Fix switching budget from rollover budget to report budget and immediately back does not work (#1933)
* Fix switching budget from rollover budget to report budget and immediately back does not work

* Pr Changes
2023-11-21 08:15:18 -08:00
Julian Dominguez-Schatz
cd6bd9ece8 Fix crash when undoing a rule application (#1885)
* Undo shouldn't open modal if it wasn't open before

* Add release notes
2023-11-21 00:19:31 -08:00
Michael Huynh
fb2f712c16 Fix flickering scroll bar on mobile transaction input (#1782) (#1929) 2023-11-20 12:46:47 -08:00
Joel Jeremy Marquez
f58fae8d16 Support multiple months in experimental ofx parser (#1921)
* Support multiple months in experimental ofx parser

* Release notes

* Fix lint error
2023-11-20 12:44:28 -08:00
Joel Jeremy Marquez
a10b10a87b [regression] Remove extra padding in mobile accounts page (#1916)
* [regression] Remove extra padding in mobile accounts page

* Release notes

* VRT
2023-11-20 12:44:12 -08:00
DJ Mountney
47007232b8 Switch from en-ZA to en-SE for space-comma NumberFormat (#1938) 2023-11-20 20:28:55 +00:00
Stefan Hall
4761e9ce2f Specify minimum node version for @actual-app/api nom package (#1934) 2023-11-20 18:37:38 +00:00
Kyle Mckay
849262c95e [Maintenance] Refactor amount input to typescript (#1936) 2023-11-20 18:29:19 +00:00
Shazib Hussain
e6e184c412 Fix Electron Build (#1926) 2023-11-20 18:16:25 +00:00
Shazib Hussain
9c6d9ecf0a Don't allow duplicate category names (per group) (#1833)
* Remove author from electron package.json

* Don't allow dupes in cat names (per group)

* Release Notes

* Handle reorders and moves

* Fix linter warnings

* Fix typecheck

* Show the name of the duplicate category

* missed func call

* Upper case before compare

* lint fixes

---------

Co-authored-by: Shazib Hussain <contact@shazib.com>
2023-11-20 09:41:13 -07:00
Joel Jeremy Marquez
65273127f5 Mobile report budget (#1880)
* Mobile report budget

* Release notes

* Update bindings

* Cleanup

* Mobile report budget summary + reuse desktop components
2023-11-18 20:22:05 -08:00
Joel Jeremy Marquez
b5530085bb Mobile create account (#1853)
* Mobile create account

* Release notes

* Update add button style

* Add back desktop page header padding

* Empty accounts handling

* decimal keyboard on CreateLocalAccount balance input

* VRT updates
2023-11-18 20:21:41 -08:00
Michael Clark
9ec82d52c9 [Maintenance] Update CloseAccount, AccountAutocomplete, SavedFilterAutocomplete, PayeeAutocomplete components to Typescript. (#1923) 2023-11-18 13:21:21 +00:00
shall0pass
93922567fc [Bugfix] Goals: Fix Schedule Infinite loop (#1917)
* logic

* release note
2023-11-17 11:09:13 -06:00
Neil
7c0b7a2f17 Duplicate color removal (#1911)
* duplicate color removal

* notes
2023-11-16 02:17:51 -08:00
Neil
e8055bbc35 Mobile pages standardized (Colors/UI) (#1874)
* Mobile Color Consistency

* VRT updates

* color updates

* notes

* Sync Text

* Adjust header font smaller

* color and format adjustments

* tidying header buttons

* color and button adjustments

* Header Text color

* VRT updates

* back button changes

* VRT changes

* adjust buttons

* lint fix

* darkTheme header background

* VRT updates

* VRT updates
2023-11-16 00:08:46 -08:00
Neil
7fdd9767ba sideBar Dark Color changes (#1887)
* sideBar Dark Color changes

* notes

* VRT updates

* test fixes

* color fixes

* Revert "test fixes"

This reverts commit 3c6131b2c4.

* Revert "VRT updates"

This reverts commit b84d7659a4.

* color update

* VRT updates

* calendar changes

* VRT update

* notes update

* color change

* Revert "VRT update"

This reverts commit 4c5aba4247.

* Revert "VRT updates"

This reverts commit ba142b0653.

* VRT updates
2023-11-16 00:05:58 -08:00
Neil
1f105999af Customizeable Reports (#1791)
* Reorganize and add graphs

* Create Customizable Chart

* Notes

* Hide Menu update Donut

* lint fixes

* Organize Menus

* Change Title

* UI changes

* UI updates

* Add Data Table

* Functionality additions and Privacy Filters

* Date filters working and formatting changes

* Fix default spreadsheet and add tableGraph

* Integrate Summary Data and Split Legend

* started adding functionality on charts

* list fix

* Enabling more graphs, fixing errors

* Legend, interactions, Empty Rows Filter

* fixes for EmptyRows/interactions/legends

* formatting UI and filtering data

* format date

* fix errors

* Fix Legend Order

* lint fixes

* Add tooltips

* Feature Flag

* fix overview card, fix offbudget checkbox

* Revamped dataType, added scrollBars

* data display adjustments

* data spreadsheet updates/groups added to matrix

* Add Category Selector

* Add Labels Button

* formatting fixes

* Add Averages to dataTable

* data bug fix

* Added all type back in with exceptions

* formatting

* split assets/debts, add Uncategorized

* bug fixes and UI updates

* add scrollbars to table

* formatting dataTable

* tooltips, navigation and graph labels

* Code clean-up and re-org

* revert color change

* Change labels name

* organize files

* code cleanup

* Tooltip Colors

* Descoping legend for future PR

* descope legend & rename split

* rename type variable to be more descriptive

* adjustments for sankey and eslint merges

* notes update

* code review fixes

* code fixes

* fix date selections
2023-11-16 00:04:29 -08:00
Stefan Hall
f970263c72 Add typings condition operators for Action class (#1909) 2023-11-15 17:18:06 +00:00
Neil
fecc9178b3 Color Consolidations (#1868)
* Color normalization

* color updates

* VRT updates

* update colors table

* VRT updates

* more VRT updates

* pillborder

* VRT updates

* Revert "VRT updates"

This reverts commit ae58317b00.

* Revert "more VRT updates"

This reverts commit a316745efd.

* Revert "VRT updates"

This reverts commit 03797af362.

* Revert "VRT updates"

This reverts commit 454adac251.

* VRT refresh

* border color

* Checkbox Border

* VRT updates
2023-11-15 01:18:46 -08:00
Matiss Janis Aboltins
08c80b6f58 ⬆️ (yarn) upgrade to v4 and better-sqlite3 to v9.1.1 (#1902) 2023-11-14 08:34:12 +00:00
Joel Jeremy Marquez
a3995582c4 Swipe up mobile navbar (#1758)
* Swipe up mobile navbar to reveal more menus

* Release notes

* Revert navbar button height to 70

* Reduce debounce value

* More tabs coming soon

* VRT update

* VRT update

* Fix: e2e tests

* Smoother mobile navtabs

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2023-11-13 14:14:16 -08:00
Shaan Khosla
5008eb022f Sankey with Recharts (#1739)
* added sankey plot

* fix sankey

* formatting

* formatting

* lint

* reduce margin

* experimental flag

* update location of recharts install

* truncate tooltip

* add titles to node and sizing

* better filtering

* comments, types, and check if data exists

* don't log

* clean up extra views

* responsive container, and fix label in graph

* change back

* fix bug and font

* static tooltip

* update overview to fit both sankey and category spending

* overview sankey

* increase iterations, fix right text, and release notes

* remove is out

* lint

* fix tooltip space

* fix margins

* format and efficient sql payees query

* restructure category sum value

* add tooltip names...again

* conditionally use container

* use useCategories
2023-11-12 16:01:12 -05:00
Joel Jeremy Marquez
353e7be31f Support ofx INVSTMTMSGSRSV1 (#1876)
* Support ofx INVSTMTMSGSRSV1

* Release notes
2023-11-11 13:28:48 -08:00
Michael Clark
30c7024663 [Maintenance] Convert ExpenseGroup, ExpenseCategory, IncomeCategory components to Typescript. (#1897) 2023-11-11 21:05:45 +00:00
youngcw
22efe74ec8 add budget tables to the aql schema (#1895)
* add budget tables to the schema

* note

* note fix

* lint
2023-11-11 13:08:14 -07:00
Matiss Janis Aboltins
5792b15cb5 🔧 (eslint) enabling 'react/no-unstable-nested-components' rule (#1893) 2023-11-11 18:46:28 +00:00
shall0pass
168b79a178 [Maintenance] Goals break out goal target calculations to individual files (#1888)
* move goal calculations to separate files by type

* bug squashing

* release note
2023-11-11 10:48:33 -06:00
Michael Clark
7062f2a7d9 Maintenance: BudgetSummaries, MonthPicker, SidebarCategory components to tsx. (#1879) 2023-11-10 21:38:18 +00:00
Matiss Janis Aboltins
af666458d3 (VRT) darkmode visual regression tests (#1860) 2023-11-10 21:17:07 +00:00
Neil
184b302273 Remove Static Colors (#1875)
* Color Changes

* notes
2023-11-09 15:51:58 -08:00
Neil
3004f336da Final Colors Consolidation (#1871)
* Color Updates

* color change

* notes

* fix preview background
2023-11-09 15:45:59 -08:00
James Costian
45bb7696c3 Support full month names when importing CSV transactions (#1862)
Support dates like "Dec 24, 2020" and "december 24, 2020"
2023-11-09 10:16:23 -07:00
James Costian
199a9f838d Make Select All respect filters and splits (#1864) 2023-11-09 07:11:51 -08:00
youngcw
df5aa3186c Goals: Save full goal value and add an indicator of goal status (#1780)
* first pass at progress bar

* db migration / enter goal in db

* add getGoal function

* stabilize

* whoops

* TS

* reset goal in db if no template found

* reconfirm

* release note

* typo

* rename migration

* to ms

* move priority logic, consistent variable names,

* fixup

* clear goal if template removed

* Visual goals (#40)

* 🔥 removing privacyMode feature flag (#1688)

* 🎨  fix multiline label in schedules modal (#1687)

* Update Visual Regression README File (#1689)

* Fix typo in GoCardlessLink.js (#1684)

happend -> happened

* queried cleared balance for tooltip (#1678)

* Dark Theme Reports/Settings (#1512)

* 🐛 Mobile account transaction list: Fix sticky date section headers (#1698)

* 👷  do not cancel github ci jobs on master branch (#1692)

* Sidebar Account Fix (#1703)

* Dark Theme Final (#1513)

* Category autocomplete should only search selectable categories  (#1681)

* set colors based on a goal value

* extra comment

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
Co-authored-by: Crazypkr1099 <nicholas.lacasse430@gmail.com>
Co-authored-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
Co-authored-by: Shaan Khosla <35707672+shaankhosla@users.noreply.github.com>
Co-authored-by: Neil <55785687+carkom@users.noreply.github.com>
Co-authored-by: Trevor Farlow <trevdor@users.noreply.github.com>

* update release note

* lint

* use null as cleared state

* show goal status via colors (#41)

* cleanup

* I think its working

* lint

* fix report budget, by adding in the goal coloring

* fix the error by adding colors to the report side (#42)

* [refactor] Migrate Schedules Table to typescript (#1691)

* 🔧  removing unnecessary manual module resolution (#1707)

* 🐛 (mobile) scrolling in lists with pull-to-refresh (#1706)

* 💄 (mobile) updating apple home-screen icon (#1705)

* Enhance Y-Axis Scaling on Net Worth Graph (#1709)

* fix report budget, by adding in the goal coloring

---------

Co-authored-by: Mohamed Muhsin <62111075+muhsinkamil@users.noreply.github.com>
Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
Co-authored-by: Crazypkr1099 <nicholas.lacasse430@gmail.com>

* report budget database updates

* Goal progress bar (#1734)

* first pass at progress bar

* db migration / enter goal in db

* add getGoal function

* stabilize

* whoops

* TS

* reset goal in db if no template found

* reconfirm

* release note

* typo

* rename migration

* to ms

* move priority logic, consistent variable names,

* fixup

* clear goal if template removed

* Visual goals (#40)

* 🔥 removing privacyMode feature flag (#1688)

* 🎨  fix multiline label in schedules modal (#1687)

* Update Visual Regression README File (#1689)

* Fix typo in GoCardlessLink.js (#1684)

happend -> happened

* queried cleared balance for tooltip (#1678)

* Dark Theme Reports/Settings (#1512)

* 🐛 Mobile account transaction list: Fix sticky date section headers (#1698)

* 👷  do not cancel github ci jobs on master branch (#1692)

* Sidebar Account Fix (#1703)

* Dark Theme Final (#1513)

* Category autocomplete should only search selectable categories  (#1681)

* set colors based on a goal value

* extra comment

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
Co-authored-by: Crazypkr1099 <nicholas.lacasse430@gmail.com>
Co-authored-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
Co-authored-by: Shaan Khosla <35707672+shaankhosla@users.noreply.github.com>
Co-authored-by: Neil <55785687+carkom@users.noreply.github.com>
Co-authored-by: Trevor Farlow <trevdor@users.noreply.github.com>

* update release note

* lint

* use null as cleared state

* show goal status via colors (#41)

* cleanup

* I think its working

* lint

* fix the error by adding colors to the report side (#42)

* [refactor] Migrate Schedules Table to typescript (#1691)

* 🔧  removing unnecessary manual module resolution (#1707)

* 🐛 (mobile) scrolling in lists with pull-to-refresh (#1706)

* 💄 (mobile) updating apple home-screen icon (#1705)

* Enhance Y-Axis Scaling on Net Worth Graph (#1709)

* fix report budget, by adding in the goal coloring

---------

Co-authored-by: Mohamed Muhsin <62111075+muhsinkamil@users.noreply.github.com>
Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
Co-authored-by: Crazypkr1099 <nicholas.lacasse430@gmail.com>

* report budget database updates

* Fix schedule searchbar (#1729)

---------

Co-authored-by: youngcw <calebyoung94@gmail.com>
Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
Co-authored-by: Crazypkr1099 <nicholas.lacasse430@gmail.com>
Co-authored-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
Co-authored-by: Shaan Khosla <35707672+shaankhosla@users.noreply.github.com>
Co-authored-by: Neil <55785687+carkom@users.noreply.github.com>
Co-authored-by: Trevor Farlow <trevdor@users.noreply.github.com>
Co-authored-by: Mohamed Muhsin <62111075+muhsinkamil@users.noreply.github.com>

* working dynamic colors.  Need to figure out what changes are actually needed

* cleanup

* more cleanup

* lint

* reset the goal when applying a single template

* make getCategory function

* remove some unneeded changes

* actually remove the changes, not just comment

* cleanup some unneeded code that was causing some bugs. Works for me, but should be vetted more

* lint

* add json definitions to database

* use template feature flag to enable colors

* some fixes

* don't set goals for remainders, remove unneeded change

* lint

* release note

* lint again

* fix mobile crash

* undo changes in CellValue.tsx

* lint

* use getStyle

* move status calc to helper

* lint

* recommendations

* suggestion

Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>

---------

Co-authored-by: shall0pass <20625555+shall0pass@users.noreply.github.com>
Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
Co-authored-by: Crazypkr1099 <nicholas.lacasse430@gmail.com>
Co-authored-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
Co-authored-by: Shaan Khosla <35707672+shaankhosla@users.noreply.github.com>
Co-authored-by: Neil <55785687+carkom@users.noreply.github.com>
Co-authored-by: Trevor Farlow <trevdor@users.noreply.github.com>
Co-authored-by: Mohamed Muhsin <62111075+muhsinkamil@users.noreply.github.com>
Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>
2023-11-08 12:44:45 -07:00
Sreetam Das
1c68c3f964 [Bugfix]: Account filter for budgeted and offbudget accounts (#1867)
* Update AQL filter for budgeted and offbudget accounts

* Add release note
2023-11-07 11:52:32 -08:00
Neil
a15f80e771 Warning Color Consolidations (#1798) 2023-11-05 17:29:55 +00:00
Jesse Visser
be18891957 Enhancement: Add option to select in/out field during import (#1788) 2023-11-05 14:49:00 +00:00
Stefan Hall
a6dae398da fixed:issue->#1835 Support NYNAB import of transactions that contain subtransactions tha… (#1836) 2023-11-05 14:42:23 +00:00
Joel Jeremy Marquez
d8c885bf4e Mobile budget pull down to sync (#1858)
* Mobile budget pull down to sync

* Release notes
2023-11-04 16:45:16 -07:00
Evan Trujillo
f94d8aff9f [Bugfix]: Dark mode - darker tint for pageTextLink (#1765) 2023-11-04 21:47:02 +00:00
Seth Gillett
a549cdf0e7 fixed:issue->#1762 Schedule creation modal notify user of weekend skip option (#1840) 2023-11-04 15:58:26 +00:00
凯 - kǎi
b7a2f16246 fix styling of transaction page on mobile (#1820) 2023-11-04 15:31:35 +00:00
Michael Clark
0ec88ecc24 Maintenance: Moving some components to Typescript (#1834) 2023-11-04 15:23:09 +00:00
Matiss Janis Aboltins
39fa9f2097 🔖 (23.11.0) (#1859) 2023-11-04 09:27:13 +00:00
Matiss Janis Aboltins
9040cab600 🐛 fix: bring back rollover arrow in budget page (#1856)
Closes #1845
2023-11-03 18:44:05 +00:00
Matiss Janis Aboltins
e56cb4bc85 🐛 fix: add missing top border for budget menu icon (#1855)
* 🐛  fix: add missing top border for budget menu icon

* Release notes
2023-11-03 18:33:12 +00:00
Joel Jeremy Marquez
fc08baf7ae Fix mobile budget click handlers (#1844)
* Fix mobile budget click handlers

* Release notes
2023-10-31 07:48:32 -07:00
Joel Jeremy Marquez
7325153da1 Mobile balance cover/transfer/rollover overspending (#1802)
* Mobile balance cover/transfer

* Release notes

* Fix errors

* Cleanup

* Fix hit boxes and add line clamp

* Fix styling

* Prevent simultaneous field edits

* Use onPointerDown

* Remove balanceTooltip close effect
2023-10-29 20:26:12 -07:00
Joel Jeremy Marquez
e12793e7eb Inline mobile category and group edit (#1781)
* Inline mobile category and group edit

* Release notes

* Allow one edit at any time

* Mobile: long press to edit category/group

* Mobile: set userSelect: 'none'

* Move getLongPressEvents

* Add role to prevent tap-to-search

* Add role to text

* Prevent default on longpress

* Add tabIndex to disable tap-to-search

* Add back userSelect

* Role updates

* Remove userSelect

* Revert long press category name

* Remove unused import

* Fix lint error

* Edit mode

* Do not allow to start an edit when another  field is currenty being edited

* Fix blur event not firing

* Grey out zero spent or balance values

* VRT update

* Fix budget cell being zero on click

* Delete useLongPress
2023-10-28 09:42:47 -07:00
Kit PANG
5fe146ee0a Allow categorise transfer to off budget accounts on mobile (#1824)
* Allow categorise transfer to off budget accounts

* Add release notes
2023-10-27 09:48:01 -07:00
Joel Jeremy Marquez
0af2987cef Hide mobile nav tabs on scroll (#1745)
* Hide mobile nav tabs on scroll

* Release notes

* Reduced navbar bottom padding

* Make hide transition a bit faster

* Update scroll defaults

* VRT snapshots

* Fix: safari scroll bounce effect disrupting the show/hide of bottom nav

* Update release notes

* No tap highlight on MobileNavTabs

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2023-10-22 19:12:39 -07:00
Joel Jeremy Marquez
e266093a4a Custom useNavigate which tracks previous location (#1808)
* Custom useNavigate which tracks previous location

* Release notes

* Fix lint errors
2023-10-22 11:41:07 -07:00
Michael Clark
19f0efb654 Maintenance: Converting Utils and Sort to typescript (#1823) 2023-10-22 16:18:59 +01:00
Neil
e0b2eab475 Error Color Consolidation (#1756)
* Error Color Consolidation

* notes

* color changes
2023-10-21 14:33:30 -07:00
Neil
25f4e2a8b5 Page color updates (#1799)
* page color updates

* notes
2023-10-21 14:23:02 -07:00
Shaan Khosla
d338a73794 add styling back to cash flow graph (#1819)
* add styling back

* release notes

* vrt
2023-10-21 10:21:16 -07:00
Shaan Khosla
75f2bf8b1b 2 new vrt tests for reports (#1814) 2023-10-19 17:33:31 +01:00
Michael Clark
eb54487d8e Maintenance: Convert FixEncryptionKey, Loading, AnimatedLoading components to TypeScript (#1784) 2023-10-19 08:14:50 +01:00
Michael Clark
5cc6bad34b Maintenance: Updating icons generator to output typescript (#1785) 2023-10-19 08:13:04 +01:00
Neil
acf4456077 darkMode Fixes (#1800)
* darkMode Fixes

* notes

* AutoComplete Colors

* Sync button fix

* dark color changes
2023-10-16 07:18:33 -07:00
youngcw
b45615e6fc Darkmode: fix theming on budget table (#1795)
* fix darkmode for budget table

* note

* lint

* fix totals line, fix group colot
2023-10-16 07:13:32 -07:00
Michael Huynh
38609ee25a Add user-friendly theme option labels (#1796) (#1797) 2023-10-16 07:05:01 -07:00
Joel Jeremy Marquez
cae2b9cd5a Allow linked child transactions (#1759)
* Allow linked child transactions

* Release notes
2023-10-13 21:19:42 -07:00
Joel Jeremy Marquez
4cacc845c0 Fix mobile budget header sync button (#1783)
* Fix mobile budget header sync button

* Release notes
2023-10-11 00:21:29 -07:00
Shaan Khosla
3dfbd23f96 POC Recharts charting library (#1740) 2023-10-11 08:02:01 +01:00
youngcw
21effa654d Goal speedup2 (#1720)
* only use needed priorities

* cleanup

* cleanup

* cleanup

* maybe better?

* note

* note fix

* suggestion

Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>

---------

Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>
2023-10-10 14:39:37 -07:00
Joel Jeremy Marquez
c33dc6fbad Mobile category and group functionalities (#1737)
* More mobile functionalities

* Cleanup

* Remove close button on mobile budget summary modal

* Release notes

* Close mobile inputs on enter

* Fix mobile budget row header color

* Fix income group hidden

* Add validation + close button on category tooltip

* Add mobile budget visual cues

* More mobile visual cues

* Error message fix

* Update blank category name behavior

* Cleanup

* Cleanup

* Fix mobile group deletion and category tooltip behavior

* Zero sign for AmountInput

* VRT snapshot updates

* Handle null values in must-category-transfer
2023-10-10 13:02:33 -07:00
Michael Clark
057caf127a Maintenance: DateSelect component to tsx & server-handlers get-categories type (#1776) 2023-10-10 20:38:15 +01:00
Matiss Janis Aboltins
767bc8ecb6 Update FUNDING.yml - add github sponsors (#1772) 2023-10-10 20:19:53 +01:00
Compositr
bdf5c45cda Sync on ctrl+s (#1770) 2023-10-10 20:19:23 +01:00
凯 - kǎi
3dfe633428 fix: csv parser delimiter (#1774) 2023-10-09 20:49:54 +01:00
Michael Clark
efba86a72d Maintenance: BudgetSummary & CreateLocalAccount to tsx (#1768) 2023-10-09 18:46:29 +01:00
shall0pass
316da144e1 [Bug] End of month cleanup error (#1750)
* check for null carryover

* release note

* simplify logic
2023-10-06 17:12:13 -05:00
shall0pass
d3ab8f9812 [Bug] Goals: Fix schedules 'in between' calculation (#1753)
* fix in between calculation

* release note
2023-10-06 17:11:52 -05:00
Joel Jeremy Marquez
0ea7f1852b Prevent parent transaction from being added to transfer account (#1751)
* Prevent parent transaction from being added to transfer account

* Release notes
2023-10-06 15:06:55 -07:00
Josh Krebs
3c341fc583 Budget tsx refactor (#1743) 2023-10-06 21:51:29 +01:00
Matiss Janis Aboltins
de90504a6d 🐛 (electron) reconnect to sockets if connection lost (#1694) 2023-10-05 08:40:41 +01:00
Michael Clark
f6e2d3b1f3 Maintenance: CreateAccount and CreateEncryptionKey to tsx (#1755) 2023-10-04 22:33:05 +01:00
Joel Jeremy Marquez
f1973d55c0 Editable mobile budget (#1662)
* Editable mobile budget

* Fix error on empty amount

* Fix typo

* Decimal keyboard + select input on click

* Remove scrollIntoView

* Fix focus

* Focus input on negative/positive

* Use CellValue

* Functional mobile components

* Blur fix c/o dmlazaro

* Use pointer event

* Remove useFireChangeOnUnmount

* Release notes

* Prevent default on pointerdown

* Add dmlazaro to release notes

* Disable amount input button when not focused

* Remove input refocus
2023-10-04 14:19:12 -07:00
Neil
476070b0a7 Consolidate Notice Colors (#1724) 2023-10-04 20:47:14 +01:00
Matiss Janis Aboltins
510f635bbc 🔖 (23.10.0) (#1757)
* 🔖 (23.10.0)

* Remove used release notes

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-04 17:33:51 +01:00
Neil
d1e57340b8 Regression fixes (#1752)
* regression fixes

* notes

* VRT updates
2023-10-02 11:46:28 -05:00
Matiss Janis Aboltins
9ca36f3eeb ♻️ (typescript) hardening data entity types (#1680) 2023-09-27 20:56:53 +01:00
shall0pass
05f0df4917 [Bugfix]: Goals - Fixed an overbudgeting condition (#1738)
* fix

* release note
2023-09-26 09:50:47 -05:00
Michael Clark
5f347bbe40 Maintenance: Consolidate useMergedRef and convert to typescript (#1733) 2023-09-24 17:40:44 +01:00
Shaan Khosla
3c4f62bd51 keep name after schedule completion or recreation (#1728) 2023-09-24 17:37:49 +01:00
Shaan Khosla
abd2d424a6 Fix schedule searchbar (#1729) 2023-09-24 17:34:49 +01:00
Jainam Desai
89c5f15c1f Add link type to Button Component (#1725) 2023-09-23 10:38:50 +01:00
Syukron Rifa'il Muttaqi
2a597fb3b8 fix: filter empty note (#1708) 2023-09-22 20:11:21 +01:00
Shaan Khosla
2f97c3a1e2 changed default months to 5 in cash flow report (#1723) 2023-09-22 20:03:10 +01:00
Matiss Janis Aboltins
ba5174ddfa 🐛 (mobile) redirect to budget page for all 404 (#1721) 2023-09-22 08:37:16 +01:00
Matiss Janis Aboltins
9a900f9ff1 ♻️ moving rule server actions to separate file (#1677) 2023-09-22 08:36:56 +01:00
Joshua Krebs
2081e25cf5 refactor BudgetMonthCountContext to tsx (#1722)
* refactor BudgetMonthCountContext to tsx

* add release notes
2023-09-21 16:25:40 -07:00
youngcw
49ab358cf2 Goals: speed up and a bugfix (#1718)
* speed up and a bug fix

* cleanup

* note

* lint
2023-09-21 09:08:26 -05:00
Jainam Desai
efb72af1b8 Add common component for AnchorLink and ButtonLink (#1701) 2023-09-20 17:19:09 +01:00
Crazypkr1099
16334f67a5 Enhance Y-Axis Scaling on Net Worth Graph (#1709) 2023-09-19 18:40:33 +01:00
Matiss Janis Aboltins
ddb78af57d 💄 (mobile) updating apple home-screen icon (#1705) 2023-09-18 18:43:34 +01:00
Matiss Janis Aboltins
9e2226e384 🐛 (mobile) scrolling in lists with pull-to-refresh (#1706) 2023-09-18 18:43:13 +01:00
Matiss Janis Aboltins
a1dd6cf3dc 🔧 removing unnecessary manual module resolution (#1707) 2023-09-18 18:42:57 +01:00
Mohamed Muhsin
2ee023ac22 [refactor] Migrate Schedules Table to typescript (#1691) 2023-09-17 19:05:32 +01:00
Shaan Khosla
3496ac28f3 Category autocomplete should only search selectable categories (#1681) 2023-09-16 09:58:59 +01:00
Neil
f6f496f656 Dark Theme Final (#1513) 2023-09-16 09:56:19 +01:00
Neil
68147d654f Sidebar Account Fix (#1703) 2023-09-15 21:39:58 +01:00
Matiss Janis Aboltins
3d29cfbed5 👷 do not cancel github ci jobs on master branch (#1692) 2023-09-15 17:10:31 +01:00
Trevor Farlow
fbd1097a0c 🐛 Mobile account transaction list: Fix sticky date section headers (#1698) 2023-09-15 07:25:19 -06:00
Neil
0cc34798fb Dark Theme Reports/Settings (#1512) 2023-09-13 18:40:16 +01:00
Shaan Khosla
b6100cfecd queried cleared balance for tooltip (#1678) 2023-09-13 17:58:48 +01:00
Ikko Eltociear Ashimine
d835b113f8 Fix typo in GoCardlessLink.js (#1684)
happend -> happened
2023-09-12 17:25:18 +01:00
Crazypkr1099
4e4d20ad31 Update Visual Regression README File (#1689) 2023-09-12 17:15:04 +01:00
Matiss Janis Aboltins
8167ea8a83 🎨 fix multiline label in schedules modal (#1687) 2023-09-12 17:11:00 +01:00
Matiss Janis Aboltins
42e1b5ca7e 🔥 removing privacyMode feature flag (#1688) 2023-09-12 17:10:46 +01:00
Neil
55285f4c5f Dark Theme Manager and Modals (#1503) 2023-09-11 20:11:58 +01:00
Crazypkr1099
5565116c34 Add spent column to mobile view (#1651) 2023-09-11 18:06:19 +01:00
Matiss Janis Aboltins
addd8e0f5f (e2e) adding sample schedules to test budget (#1672) 2023-09-11 08:42:22 +01:00
Matiss Janis Aboltins
0e66ebfeef ⬆️ (electron) upgrading electron-based dependencies (#1674) 2023-09-10 16:15:27 +01:00
youngcw
05f2e2af1a Mobile: Show proper name of income group (#1679)
* Show right name for income group on mobile

* release note
2023-09-09 17:59:05 -04:00
Neil
8ff89a5ab4 DarkTheme Schedules/Payees (#1487) 2023-09-09 18:21:17 +01:00
Matiss Janis Aboltins
faa4a7c0e2 🔧 (eslint) convert rules from ERROR to WARN to improve devX (#1599) 2023-09-09 17:54:06 +01:00
Joshua Krebs
ba4885cb85 refactor budget/IncomeHeader to tsx (#1670) 2023-09-08 19:39:48 +01:00
Matiss Janis Aboltins
a8a0f777e2 🐛 (mobile) fix schedule status positioning (#1669)
* 🐛 (mobile) fix schedule status positioning

* Release notes
2023-09-08 07:56:00 +01:00
Matiss Janis Aboltins
852b5373bc 🐛 (signup) fix setting up for the first time with missing protocol (#1657) 2023-09-07 17:40:58 +01:00
Joel Jeremy Marquez
bca09023e2 Left over glamor style cleanup (#1668)
* #1666 - left over glamor style cleanup

* vrt

* Release notes
2023-09-06 23:04:47 -07:00
Matiss Janis Aboltins
4d8efccc73 🔧 (electron) improved OS detection (#1658)
* 🔧 (electron) improved OS detection

* Release notes
2023-09-07 06:56:15 +01:00
Matiss Janis Aboltins
0e539d91fe (mobile) pull down to trigger bank-sync (#1663)
*  (mobile) pull down to trigger bank-sync

* Release notes

* Remove canSync checks
2023-09-07 06:56:02 +01:00
Matiss Janis Aboltins
2ff1e67e8a 🐛 (mobile) fix sync button design (#1665)
* 🐛 (mobile) fix sync button design

* Release notes
2023-09-07 06:55:47 +01:00
youngcw
35c3d54688 Mobile: Dont show hidden groups (#1654)
* fix percent goals in the same priority level not compounding but overwritting

* release note

* don't show hidden groups on mobile view

* cleanup

* cleanup2

* cleanup3

* release note
2023-09-06 21:33:44 -07:00
Joel Jeremy Marquez
50f60b18e7 Enable swc sourcemap (#1659)
* Enable swc sourcemap

* Release notes
2023-09-06 18:48:37 -07:00
youngcw
bc5c2ce059 Mobile: don't show hidden income categories (#1656) 2023-09-06 19:42:38 +01:00
Shyam Guthikonda
21d5f117ee TypeScript migration (partial). (#1660) 2023-09-06 17:27:16 +01:00
Joel Jeremy Marquez
319d196e93 Webpack + SWC Loader (#1650)
* desktopc-client swc-loader

* More swc

* Jest swc + upgrades

* Revert @swc/jest usage for now

* SWC minify

* Remove setupFilesAfterEnv in package.json as per warning message in CI

* Release notes

* Minify on CI

* swc helpers in loot-core

* @swc/jest

* Upgrade webpack

* Add @swc/core to crdt

* Use yarn cache in github actions

* Cleanup

* Fix electron

* Revert "Fix electron"

This reverts commit 787af1980648fa30788a1d1678dcda534716f31d.

* Revert action.yml cache changes

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2023-09-05 13:42:44 -07:00
Joel Jeremy Marquez
96863b3196 Change Accounts page BUDGET label to FOR BUDGET in mobile (#1639)
* Change BUDGET to FOR BUDGET in mobile accounts page

* Release notes

* Updated screenshot
2023-09-05 10:48:29 -07:00
Joel Jeremy Marquez
9fde36dca1 Fix ofx/qfx import options (#1649)
* Fix ofx/qfx import options

* Release notes
2023-09-05 09:54:04 -07:00
Syukron Rifa'il Muttaqi
108daedff5 Fix submit form on enter key pressed (#1634) 2023-09-05 08:34:34 +01:00
Joel Jeremy Marquez
bf786e8872 Break apart budget/misc.js (#1584)
* Break apart budget/misc.js

* Release notes

* Rename release notes

* UI bolder "No server" text
2023-09-05 00:27:52 -07:00
Joel Jeremy Marquez
3eb09b66ec Fix blur performance issue in Safari (#1646)
* Fix blur performance issue in Safari

* Release notes
2023-09-04 23:17:16 -07:00
Joel Jeremy Marquez
cb00826f51 Fix mobile page "back" behaviors (#1648)
* Fix mobile page "back" behaviors

* Release notes
2023-09-04 23:17:03 -07:00
Joel Jeremy Marquez
15ab80a475 Remove glamor css (#1637)
* Remove glamor css syntax

* Release notes

* Remove fallback value

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>

* Remove fallback value

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>

* Remove fallback value

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2023-09-04 23:16:41 -07:00
Joel Jeremy Marquez
3e32db74cc Fix onNavigateToSchedule prop (#1645)
* Fix onNavigateToSchedule prop

* Release notes
2023-09-04 11:51:59 -07:00
Mohamed Muhsin
db07d7a73d refactor: make Schedules component to tsx (#1644) 2023-09-04 17:41:02 +01:00
Oleh
65899b0ef0 Add support for markdown in notes (#1587) 2023-09-04 08:28:07 +01:00
Joel Jeremy Marquez
63c3d07cb9 Replace usage of glamor CSSProperties with React CSSProperties (#1542)
* Remove usages of glamor CSSProperties

* Cleanup

* Re-add CellButton className prop

* More removal of glamor CSSProperties

* Release notes

* Fix vrt test failures

* Use React CSSProperties in View

* Custom CSSProperties type

* Settings UI regression fix

* Fix type check errors

* Address PR comments

* CategorySpendingGraph style

* Fix rebase mistake
2023-09-03 16:15:44 -07:00
Matiss Janis Aboltins
246e0d76c1 ⬆️ (better-sqlite3) upgrade to 8.6.0 to fix electron export crash (#1643) 2023-09-03 21:57:12 +01:00
Matiss Janis Aboltins
1a15d2c039 ♻️ use useCategories everywhere (#1597) 2023-09-03 21:56:58 +01:00
Matiss Janis Aboltins
90e32df3fb 🐛 (vrt) set static version (#1641) 2023-09-03 21:44:24 +01:00
Joel Jeremy Marquez
8ef2c4013a Experimental OFX parser (#1600)
* Experimental OFX parser

* Release notes

* Enable enableExperimentalOfxParser in tests

* Move experimental ofx parser to ofx2json

* Enable experimental ofx parser by default

* Address PR comments
2023-09-03 10:33:06 -07:00
Matiss Janis Aboltins
a460bc25d6 ♻️ convert budget component from class to hook component (#1566) 2023-09-03 17:43:10 +01:00
Joel Jeremy Marquez
59de6b0035 Replace format with useFormat (#1630)
* Replace format with useFormat

* [chore] Release notes
2023-09-03 09:34:24 -07:00
Joel Jeremy Marquez
3931625133 Rename CategorySelect file to CategoryAutocomplete (#1614)
* Rename CategorySelect file to CategoryAutocomplete

* Release notes
2023-09-03 09:32:53 -07:00
Oleh
6a0b7d6b7d Make reports more responsive (#1592) 2023-09-03 17:28:13 +01:00
Matiss Janis Aboltins
6817c45ddc ⬆️ upgrade absurd-sql and remove patch-package (#1632) 2023-09-03 17:26:01 +01:00
Matiss Janis Aboltins
ad4c383adf 🔖 (23.9.0) mobile transaction entry, privacy mode (#1635) 2023-09-03 15:54:28 +01:00
Matiss Janis Aboltins
8864e79db1 Add github sponsors button to the repository (#1636) 2023-09-02 21:56:36 +01:00
Matiss Janis Aboltins
dd7a7fa796 🐛 (imports) ability to toggle on/off OFX import fallback payee (#1631) 2023-09-02 18:03:38 +01:00
Trevor Farlow
d4422f89aa 🐛 Mobile: Account ledger jumps on first selection (#1625) 2023-09-01 10:58:26 -06:00
Trevor Farlow
cdff98b109 🐛 Mobile: fix Accounts page theme color (#1604)
* Make all mobile view themes respect Actual color themes
2023-09-01 10:58:01 -06:00
Matiss Janis Aboltins
835e16e54d releasing privacy mode feature (#1623) 2023-09-01 08:18:45 +01:00
Matiss Janis Aboltins
d46afab6dd 🐛 fix filtering in transaction table (#1622) 2023-09-01 08:04:44 +01:00
Joel Jeremy Marquez
05e582793d Close modals on route change (#1613)
* Close modals on route change

* Release notes

* Fix import error
2023-08-31 07:55:43 -07:00
shall0pass
fc62d85c23 [Bug] Mobile: Account picker text color (#1607)
* commit

* release note
2023-08-30 13:13:26 -05:00
Matiss Janis Aboltins
940af6d367 (vrt) increased strictness, added datepicker test (#1605) 2023-08-30 18:13:29 +01:00
Joshua Krebs
c19717e84c Refactor budget/MobileTable to tsx (#1602) 2023-08-29 21:28:56 +01:00
Matiss Janis Aboltins
080951fb34 🔧 mark PRs as stale and auto-close (#1591) 2023-08-29 21:07:29 +01:00
Joel Jeremy Marquez
245c59e942 Open transaction date picker when clicked while it's focused (#1583)
* Open transaction date picker when clicked while it's focused

* Release notes
2023-08-29 07:13:34 -07:00
youngcw
99dc87d715 Goals: fix percent goals in the same priority level not compounding (#1579)
* fix percent goals in the same priority level not compounding but overwritting

* release note
2023-08-28 12:26:19 -05:00
Joel Jeremy Marquez
e48924d987 Schedule privacy (#1580)
* Schedule privacy

* Release notes

* Fix schedule amount shifting
2023-08-28 08:15:00 -07:00
Joel Jeremy Marquez
2b06a42ac5 Create transfer using child transaction instead of parent (#1581)
Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2023-08-28 07:06:36 -07:00
Matiss Janis Aboltins
d8c99221ff 🐛 (vrt) fix vrt - use static date (#1590) 2023-08-28 06:52:11 +01:00
adamkelly86
7c48e53329 Update screenshot (#1477) 2023-08-25 20:41:20 +01:00
Matiss Janis Aboltins
a0290609f9 👷 visual regression tests (#1553) 2023-08-25 17:34:10 +01:00
Trevor Farlow
821fa724e8 🐛 Schedule editor: Linked transactions table collapses (#1571) 2023-08-23 18:03:59 -06:00
Johannes Löthberg
5adab1885b Show all payees by default for child transactions (#1573)
Previously we would default to only show transfer payees in the payee
selection dropdown for child transactions.  This is confusing and there
doesn't seem to be any obvious reason for this, so this commit removes
that behavior.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2023-08-23 08:50:01 -07:00
Khanh Nguyen
240dc46a23 Fix bug - Manually entered split transactions are not cleared on import #200 (#1465)
* Added clear transactions on import option

* Added release note

* Added cleared column to csv export

* fixed Manually entered split transactions are not cleared on import

* Revert "Added cleared column to csv export"

This reverts commit 2952bc3e7d.

* added release note

* Copied same code to Gocardless

* Updated var name

* Updated to only query  changed transactions instead of all
2023-08-23 08:26:33 -05:00
Jarek Samic
3d621c68cb Sync on visibility change (#1549) 2023-08-23 07:53:26 +01:00
Matiss Janis Aboltins
dd47b6c6ad 🐛 reset reconciliation status when switching accounts (#1547)
Closes #1327
2023-08-22 20:34:51 +01:00
Johannes Löthberg
37cec4c46f Don't update transaction date when syncing from GoCardless. (#1559)
We should not override the date in case the user has manually corrected
it.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2023-08-22 19:12:13 +01:00
Joshua Krebs
108c0a6176 Month count selector ts refactor (#1565) 2023-08-22 19:10:52 +01:00
Trevor Farlow
ec24d0eaae 🐛 Link Schedules modal list of schedules grows too long (#1563) 2023-08-22 09:52:53 -06:00
Johannes Löthberg
6912c082b1 Fetch GoCardless transactions from the last 90 days or since first transaction (#1484)
Most banks allow up to 90 days of transactions, and so we try to fetch
up to 90 days of transactions or transactions since the first
transaction in the Actual account, whichever is shortest.  This lets
users get a clean start based on their selected starting balances date.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2023-08-21 20:53:35 +01:00
Matiss Janis Aboltins
8a6c54c4d5 🎨 improving category spending side-nav style (#1548) 2023-08-21 18:53:32 +01:00
Matiss Janis Aboltins
85f21550cb 🐛 (mobile) hide sync button if sync is not active (#1546) 2023-08-21 07:18:38 +01:00
Matiss Janis Aboltins
fe8ed4e346 🐛 (darkmode) fix more issues - transaction table and csv imports (#1541) 2023-08-21 07:18:25 +01:00
Trevor Farlow
2d0464c097 🐛 Mobile entry will enter positive value instead of negative (#1551)
Ensure our FocusableAmountInput used in MobileTransaction conditionally
applies negation logic the same way onChange as it does onBlur.
2023-08-20 21:15:59 -06:00
Matiss Janis Aboltins
6dfc43abf1 (mobile) allow creating transactions via the footer (#1545) 2023-08-20 20:19:15 +01:00
Ziga Macele
c52900e713 [Bug]: Mobile Header (#1550) 2023-08-20 17:23:55 +01:00
Ziga Macele
4378489d80 [Bug]: darkmode regression - fatal error message is ugly (#1552) 2023-08-20 17:17:26 +01:00
Trevor Farlow
ca5977db75 🐛 Schedule table in Link Schedule modal is collapsed (#1501)
Co-authored-by: kyrias <johannes@kyriasis.com>
2023-08-19 21:45:47 -06:00
Pol Eyschen
639720b6fd Allow schedules to skip weekends (#1505)
* allow schedules to skip weekends

* wording

* release note

* skip weekend in upcoming dates as well

* Clean UI

* Move switch to the date selection modal
2023-08-19 12:55:47 -07:00
Joel Jeremy Marquez
79f4d02350 Port App and FatalError components to TS and functional components (#1535)
* Port app to functional component and tsx

* FatalError functional component + tsx

* Release notes

* Exports cleanup

* App cleanup

* Address PR comments
2023-08-19 12:53:34 -07:00
Matiss Janis Aboltins
f8afb396ed 🐛 (darkmode) fix colors used for schedules in transaction table (#1533) 2023-08-19 19:42:31 +01:00
Matiss Janis Aboltins
884ab8c783 (e2e) adding mobile e2e tests (#1521) 2023-08-19 19:42:04 +01:00
shall0pass
ac055dc2e0 Mobile: To Budget inconsistency (#1540)
* rearrangement

* release note
2023-08-18 15:39:22 -05:00
shall0pass
32cc86ec99 Mobile: Don't show hidden categories (#1539)
* don't show hidden categories on mobile

* release note
2023-08-18 09:25:29 -05:00
Joel Jeremy Marquez
6fae79560e Some typescript migration (#1532)
* Typescript migration

* Release notes

* Update error boundary

* Breakup sidebar components

* Account and Sidebar props

* Remove button in Item component + exports cleanup

* Put accountNameStyle to Account

* Revert component ports (separated to another PR)

* Export cleanup

* Remove ErrorBoundary (separated to another PR)

* Sidebar budgetName as ReactNode
2023-08-17 13:21:29 -07:00
Matiss Janis Aboltins
f8ce38f11e ♻️ extract rules components to individual files + TS (#1517) 2023-08-17 20:29:03 +01:00
Matiss Janis Aboltins
b114a8f8fc (export) adding error handling & improving dev-exp for electron (#1468) 2023-08-17 08:28:43 +01:00
Matiss Janis Aboltins
0228072c6f 🐛 (darkmode) fix transaction list hover effects (#1531) 2023-08-16 20:02:43 +01:00
Matiss Janis Aboltins
efec507bf8 🐛 (darkmode) fixing lightmode regressions in transaction table (#1530) 2023-08-16 17:45:21 +01:00
Matiss Janis Aboltins
1d65184241 🐛 (importer) fix nYNAB importer when decimal budgets used (#1529) 2023-08-16 17:45:06 +01:00
Johannes Löthberg
d3f9a9c3a0 Rely on date determined by server for GoCardless transactions (#1499)
Because different banks use the date fields in vastly different ways we
now let the server's bank integrations decide which date we should use.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2023-08-15 08:33:10 +01:00
Joel Jeremy Marquez
91217b6d5e #1454 - Show projected balance when adding new transaction (#1455)
* 1454 - Show projected balance when adding new transaction

* Release note

* Rename 1455.md to 1454.md

* Update release notes category
2023-08-14 13:30:59 -07:00
Johannes Löthberg
af875ab035 Correctly fix schedule transaction payee (#1526) 2023-08-14 21:03:07 +01:00
Matiss Janis Aboltins
8ada28775e 🔧 (eslint) add 'plugin:react/recommended' (#1492)
* 🔧 (eslint) add 'plugin:react/recommended'

* Release notes
2023-08-13 15:23:14 +01:00
Martin French
6ebcbc8738 🐛 (reports) fix incorrect cashflow balance (#1518)
* 🐛 (reports) fix incorrect cashflow balance

Fixing a small typo here where multiple transfers across different payees on the same day fail to be summed up resulting in significant balance errors.

* release notes

* Update 1518.md
2023-08-12 22:21:17 -07:00
biohzrddd
42af73cdff Bugfix row render (#1402)
* Fix re-rendering all rows on hover

* release note

* Removing isHover logic in place of css :hover

---------

Co-authored-by: biohzrddd <10577752+biohzrddd@users.noreply.github.com>
2023-08-12 22:16:02 -07:00
Johannes Löthberg
71f885b899 Import category notes from YNAB4 exports (#1515)
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2023-08-12 13:32:20 +01:00
Matiss Janis Aboltins
b325bd9b18 ♻️ (typescript) migrating hooks to TypeScript (#1479) 2023-08-12 10:02:02 +01:00
Matiss Janis Aboltins
a0ecd65e70 (reports) add loading indicators (#1491)
*  (reports) add loading indicators

* Release notes
2023-08-12 09:10:45 +01:00
Matiss Janis Aboltins
2ef0fc9415 🐛 show all available transaction icons (#1508) 2023-08-11 21:13:02 +01:00
Johannes Löthberg
ba6eb26e6e Show correct payee for scheduled transactions on budgeted accounts page (#1379)
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2023-08-10 19:52:12 +01:00
Neil
b208294185 DarkTheme Accounts files (#1480) 2023-08-09 19:16:46 +01:00
Johannes Löthberg
448c4546f2 Stop setting endDate when fetching GoCardless transactions (#1493)
This breaks fetching transactions where the valueDate is in the future.
While the GoCardless documentation says this should never happen, it's
what happens with at least Bank Norwegian due to them using the interest
date as valueDate.  (C.f. #1392)

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2023-08-09 08:57:15 +01:00
Jarek Samic
b2738db441 Fix transactions button background color (#1494) 2023-08-08 20:55:11 -06:00
Jed Fox
c667118f10 Remove page-based modals in favor of existing state-based modal logic (#1270)
Co-authored-by: Trevor Farlow <trevdor@users.noreply.github.com>
2023-08-08 20:35:22 -06:00
shall0pass
218a4a761a Goals: Ignore hidden categories when running goal templates (#1481)
* ignore hidden categories

* release note
2023-08-08 05:14:51 -05:00
Neil
e1dc58d456 add dev theme to list (#1469) 2023-08-08 07:39:52 +01:00
Jarek Samic
e9137fccc7 Initial port of react native edit transaction view (#1340)
* Set `role="button"` on downshift autocomplete items
This avoids content observation behavior in WebKit on touch devices that delays the onClick event (and therefore reaction to user input).
* Disable split transaction editing for now
2023-08-07 21:40:01 -06:00
Jarek Samic
facc3acf31 Fix mobile account view (#1486) 2023-08-07 21:37:57 -06:00
Neil
c2d5d475b9 eslint rule for capturing colors/themes (#1482)
This is to prevent any further color changes added to PRs. This will
help prevent the darkTheme getting any addition work loaded onto it.
2023-08-07 21:13:02 +01:00
Johannes Löthberg
e17d90ce5f Add category spending report (#1382) 2023-08-07 19:04:56 +01:00
Neil
9fed15f88b Dark mode filters/rules/transactions (#1436) 2023-08-07 19:04:33 +01:00
2669 changed files with 70484 additions and 359321 deletions

View File

@@ -1,16 +1,19 @@
packages/api/app/bundle.api.js
packages/api/dist
packages/api/@types
packages/api/migrations
packages/crdt/dist
packages/desktop-client/bundle.browser.js
packages/desktop-client/build/
packages/desktop-client/build-stats/
packages/desktop-client/public/kcab/
packages/desktop-client/public/data/
packages/desktop-client/**/node_modules/*
packages/desktop-client/node_modules/
packages/desktop-client/src/icons/**/*
packages/desktop-client/test-results/
packages/desktop-electron/client-build/
packages/desktop-electron/dist/
@@ -22,7 +25,3 @@ packages/import-ynab5/**/node_modules/*
packages/loot-core/**/node_modules/*
packages/loot-core/**/lib-dist/*
packages/loot-core/**/proto/*
packages/node-libofx/libofx.*.js
packages/node-libofx/libofx/
packages/node-libofx/OpenSP-*/

View File

@@ -25,61 +25,97 @@ const restrictedImportPatterns = [
},
];
const restrictedImportColors = [
{
group: ['**/style', '**/colors'],
importNames: ['colors'],
message: 'Please use themes instead of colors',
},
];
module.exports = {
plugins: ['prettier', 'import', 'rulesdir', '@typescript-eslint'],
extends: ['react-app', 'plugin:@typescript-eslint/recommended'],
extends: [
'react-app',
'plugin:react/recommended',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
],
parser: '@typescript-eslint/parser',
parserOptions: { project: [path.join(__dirname, './tsconfig.json')] },
reportUnusedDisableDirectives: true,
globals: {
globalThis: false,
vi: true,
},
rules: {
'prettier/prettier': 'error',
'prettier/prettier': 'warn',
// Note: base rule explicitly disabled in favor of the TS one
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
'warn',
{
args: 'none',
varsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
curly: ['error', 'multi-line', 'consistent'],
curly: ['warn', 'multi-line', 'consistent'],
'no-restricted-globals': ['error'].concat(
'no-restricted-globals': ['warn'].concat(
require('confusing-browser-globals').filter(g => g !== 'self'),
),
'react/jsx-no-useless-fragment': 'error',
'react/self-closing-comp': 'error',
'react/jsx-filename-extension': [
'warn',
{ extensions: ['.jsx', '.tsx'], allow: 'as-needed' },
],
'react/jsx-no-useless-fragment': 'warn',
'react/self-closing-comp': 'warn',
'react/no-unstable-nested-components': [
'warn',
{ allowAsProps: true, customValidators: ['formatter'] },
],
'rulesdir/typography': 'error',
'rulesdir/prefer-if-statement': 'error',
'rulesdir/typography': 'warn',
'rulesdir/prefer-if-statement': 'warn',
// https://github.com/eslint/eslint/issues/16954
// https://github.com/eslint/eslint/issues/16953
'no-loop-func': 'off',
// Do don't need this as we're using TypeScript
'react/prop-types': 'off',
// TODO: re-enable these rules
'react-hooks/exhaustive-deps': 'off',
'react/display-name': 'off',
'react/react-in-jsx-scope': 'off',
// 'react-hooks/exhaustive-deps': [
// 'error',
// 'warn',
// {
// additionalHooks: 'useLiveQuery',
// },
// ],
'no-var': 'warn',
'react/jsx-curly-brace-presence': 'warn',
'object-shorthand': ['warn', 'properties'],
'import/extensions': [
'error',
'warn',
'never',
{
json: 'always',
},
],
'import/no-useless-path-segments': 'error',
'import/no-duplicates': ['error', { 'prefer-inline': true }],
'import/no-unused-modules': ['error', { unusedExports: true }],
'import/no-useless-path-segments': 'warn',
'import/no-duplicates': ['warn', { 'prefer-inline': true }],
'import/no-unused-modules': ['warn', { unusedExports: true }],
'import/order': [
'error',
'warn',
{
alphabetize: {
caseInsensitive: true,
@@ -108,7 +144,7 @@ module.exports = {
],
'no-restricted-syntax': [
'error',
'warn',
{
// forbid React.* as they are legacy https://twitter.com/dan_abramov/status/1308739731551858689
selector:
@@ -123,13 +159,22 @@ module.exports = {
'Using <a> is discouraged, please use <LinkButton> or <ExternalLink> instead.',
},
],
'no-restricted-imports': ['error', { patterns: restrictedImportPatterns }],
'no-restricted-imports': [
'warn',
{ patterns: [...restrictedImportPatterns, ...restrictedImportColors] },
],
'@typescript-eslint/ban-ts-comment': [
'error',
{ 'ts-ignore': 'allow-with-description' },
],
// Rules disable during TS migration
'@typescript-eslint/no-var-requires': 'off',
'prefer-const': 'off',
'prefer-const': 'warn',
'prefer-spread': 'off',
'@typescript-eslint/no-empty-function': 'off',
'import/no-default-export': 'warn',
},
overrides: [
{
@@ -146,14 +191,14 @@ module.exports = {
],
rules: {
// enforce type over interface
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/consistent-type-definitions': ['warn', 'type'],
// enforce import type
'@typescript-eslint/consistent-type-imports': [
'error',
'warn',
{ prefer: 'type-imports', fixStyle: 'inline-type-imports' },
],
'@typescript-eslint/ban-types': [
'error',
'warn',
{
types: {
// forbid FC as superflous
@@ -165,11 +210,31 @@ module.exports = {
],
},
},
{
files: ['./packages/desktop-client/**/*'],
excludedFiles: [
'./packages/desktop-client/src/hooks/useNavigate.{ts,tsx}',
],
rules: {
'no-restricted-imports': [
'warn',
{
patterns: [
{
group: ['react-router-dom'],
importNames: ['useNavigate'],
message: 'Please use Actuals useNavigate() hook instead.',
},
],
},
],
},
},
{
files: ['./packages/loot-core/src/**/*'],
rules: {
'no-restricted-imports': [
'error',
'warn',
{
patterns: [
...restrictedImportPatterns,
@@ -194,11 +259,26 @@ module.exports = {
],
rules: { 'import/no-unused-modules': 'off' },
},
{
files: [
'./packages/desktop-client/src/style/index.*',
'./packages/desktop-client/src/style/palette.*',
],
rules: {
'no-restricted-imports': ['off', { patterns: restrictedImportColors }],
},
},
{
files: [
'./packages/api/migrations/*',
'./packages/loot-core/migrations/*',
],
rules: {
'import/no-default-export': 'off',
},
},
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,

2
.gitattributes vendored
View File

@@ -16,4 +16,4 @@ yarn.lock text eol=lf
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.jpg binary

3
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,3 @@
# Funding policies: https://actualbudget.org/docs/contributing/leadership/funding
open_collective: actual
github: actualbudget

View File

@@ -18,6 +18,18 @@ body:
required: true
validations:
required: true
- type: checkboxes
id: bank-sync-issue
attributes:
label: 'Is this related to GoCardless, Simplefin or another bank-sync provider?'
description: 'Most issues with bank-sync providers are due to a lack of a custom bank-mapper (i.e. payee or other fields not coming through). In such cases you can create a custom bank mapper in [actual-server](https://github.com/actualbudget/actual-server/blob/master/src/app-gocardless/README.md) repository. Other likely issue is misconfigured server - in which case please reach out via the [community Discord](https://discord.gg/pRYNYr4W5A) to get support.'
options:
- label: 'I have checked my server logs and could not see any errors there'
- label: 'I will be attaching my server logs to this issue'
- label: 'I will be attaching my client-side (browser) logs to this issue'
- label: 'I understand that this issue will be automatically closed if insufficient information is provided'
validations:
required: false
- type: textarea
id: what-happened
attributes:

View File

@@ -1 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Support
url: https://discord.gg/pRYNYr4W5A
about: Need help with something? Perhaps having issues setting up bank-sync with GoCardless or SimpleFin? Reach out to the community on Discord.

View File

@@ -9,8 +9,8 @@ function get_status() {
curl --header "Authorization: Bearer $GITHUB_TOKEN" "https://api.github.com/repos/actualbudget/actual/commits/$COMMIT_SHA/statuses" > /tmp/status.json
cat /tmp/status.json
echo "::endgroup::"
netlify=$(jq '[.[] | select(.context == "netlify/actualbudget/deploy-preview")][0]' /tmp/status.json)
state=$(jq -r '.state' <<< "$netlify")
netlify=$(yarn jq '[.[] | select(.context == "netlify/actualbudget/deploy-preview")][0]' /tmp/status.json)
state=$(yarn jq -r '.state' <<< "$netlify")
echo "::group::Netlify Status"
echo "$netlify"
echo "::endgroup::"
@@ -32,7 +32,7 @@ done
if [ "$state" == "success" ]; then
echo -e "\033[0;32mNetlify build succeeded!\033[0m"
jq -r '"url=" + .target_url' <<< "$netlify" > $GITHUB_OUTPUT
yarn jq -r '"url=" + .target_url' <<< "$netlify" > $GITHUB_OUTPUT
exit 0
else
echo -e "\033[0;31mNetlify build failed. Cancelling end-to-end tests.\033[0m"

View File

@@ -15,7 +15,7 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
api:

View File

@@ -8,7 +8,7 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
lint:

View File

@@ -9,7 +9,7 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
analyze:

View File

@@ -10,25 +10,56 @@ concurrency:
cancel-in-progress: true
jobs:
test:
name: Run end-to-end tests on Netlify PR preview
netlify:
name: Wait for Netlify build to finish
runs-on: ubuntu-latest
outputs:
netlify_url: ${{ steps.netlify.outputs.url }}
steps:
- uses: actions/checkout@v3
- name: Set up environment
uses: ./.github/actions/setup
- name: Setup Playwright
run: npx playwright install chromium --with-deps
- name: Wait for Netlify build to finish
id: netlify
env:
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./.github/actions/netlify-wait-for-build
functional:
name: Functional
needs: netlify
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.41.1-jammy
steps:
- uses: actions/checkout@v3
- name: Set up environment
uses: ./.github/actions/setup
- name: Run E2E Tests on Netlify URL
run: yarn e2e
env:
E2E_START_URL: ${{ steps.netlify.outputs.url }}
E2E_START_URL: ${{ needs.netlify.outputs.netlify_url }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: desktop-client-test-results
path: packages/desktop-client/test-results/
retention-days: 30
vrt:
name: Visual regression
needs: netlify
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.41.1-jammy
steps:
- uses: actions/checkout@v3
- name: Set up environment
uses: ./.github/actions/setup
- name: Run VRT Tests on Netlify URL
run: yarn vrt
env:
E2E_START_URL: ${{ needs.netlify.outputs.netlify_url }}
- uses: actions/upload-artifact@v3
if: always()
with:

50
.github/workflows/electron-master.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
name: Electron
defaults:
run:
shell: bash
env:
CI: true
on:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- if: ${{ startsWith(matrix.os, 'windows') }}
run: pip.exe install setuptools
- if: ${{ ! startsWith(matrix.os, 'windows') }}
run: python3 -m pip install setuptools
- name: Set up environment
uses: ./.github/actions/setup
- name: Build Electron
run: ./bin/package-electron
env:
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
CSC_LINK: ${{ secrets.CSC_LINK }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
- name: Upload Build
uses: actions/upload-artifact@v3
with:
name: actual-electron-${{ matrix.os }}
path: |
packages/desktop-electron/dist/*.dmg
packages/desktop-electron/dist/*.exe
packages/desktop-electron/dist/*.AppImage

43
.github/workflows/electron-pr.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Electron
defaults:
run:
shell: bash
env:
CI: true
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- if: ${{ startsWith(matrix.os, 'windows') }}
run: pip.exe install setuptools
- if: ${{ ! startsWith(matrix.os, 'windows') }}
run: python3 -m pip install setuptools
- name: Set up environment
uses: ./.github/actions/setup
- name: Build Electron
run: ./bin/package-electron
- name: Upload Build
uses: actions/upload-artifact@v3
with:
name: actual-electron-${{ matrix.os }}
path: |
packages/desktop-electron/dist/*.dmg
packages/desktop-electron/dist/*.exe
packages/desktop-electron/dist/*.AppImage

View File

@@ -1,42 +0,0 @@
name: Electron
defaults:
run:
shell: bash
env:
CI: true
on:
push:
branches:
- master
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up environment
uses: ./.github/actions/setup
- name: Build Electron
run: ./bin/package-electron
- name: Upload Build
uses: actions/upload-artifact@v3
with:
name: actual-electron-${{ matrix.os }}
path: |
packages/desktop-electron/dist/*.dmg
packages/desktop-electron/dist/*.exe
packages/desktop-electron/dist/*.AppImage

View File

@@ -64,13 +64,17 @@ jobs:
- name: Strip content hashes from stats files
run: |
sed -i -E 's/index\.[0-9a-zA-Z_-]{8,}\./index./g' ./head/web-stats.json
sed -i -E 's/\.[0-9a-zA-Z_-]{8,}\.chunk\././g' ./head/web-stats.json
sed -i -E 's/\.[0-9a-f]{8,}\././g' ./head/*.json
sed -i -E 's/index\.[0-9a-zA-Z_-]{8,}\./index./g' ./base/web-stats.json
sed -i -E 's/\.[0-9a-zA-Z_-]{8,}\.chunk\././g' ./base/web-stats.json
sed -i -E 's/\.[0-9a-f]{8,}\././g' ./base/*.json
- uses: github/webpack-bundlesize-compare-action@v1.8.2
- uses: twk3/rollup-size-compare-action@v1.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
current-stats-json-path: ./head/desktop-client-stats.json
base-stats-json-path: ./base/desktop-client-stats.json
current-stats-json-path: ./head/web-stats.json
base-stats-json-path: ./base/web-stats.json
title: desktop-client
- uses: github/webpack-bundlesize-compare-action@v1.8.2

16
.github/workflows/stale.yml vendored Normal file
View File

@@ -0,0 +1,16 @@
name: 'Close stale PRs'
on:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
with:
stale-pr-message: 'This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
close-pr-message: 'This PR was closed because it has been stalled for 5 days with no activity.'
days-before-stale: 30
days-before-close: 5
days-before-issue-stale: -1

1
.gitignore vendored
View File

@@ -2,6 +2,7 @@
!data/.gitkeep
/data2
packages/api/dist
packages/api/@types
packages/crdt/dist
packages/desktop-electron/client-build
packages/desktop-electron/.electron-symbols

2
.secret-tokens.example Normal file
View File

@@ -0,0 +1,2 @@
export APPLE_ID=example@email.com
export APPLE_APP_SPECIFIC_PASSWORD=password

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

893
.yarn/releases/yarn-4.0.1.cjs vendored Executable file

File diff suppressed because one or more lines are too long

View File

@@ -1,9 +1,7 @@
compressionLevel: mixed
enableGlobalCache: false
nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
yarnPath: .yarn/releases/yarn-3.5.1.cjs
yarnPath: .yarn/releases/yarn-4.0.1.cjs

View File

@@ -3,7 +3,6 @@
ROOT=`dirname $0`
RELEASE=""
RELEASE_NOTES="" # TODO: figure out automation for release notes when we start publishing electron versions
CI=${CI:-false}
cd "$ROOT/.."
@@ -35,8 +34,6 @@ if [ "$OSTYPE" == "msys" ]; then
fi
fi
yarn patch-package
yarn rebuild-electron
yarn workspace loot-core build:node
@@ -49,15 +46,13 @@ yarn workspace desktop-electron update-client
cd packages/desktop-electron;
yarn clean;
export npm_config_better_sqlite3_binary_host="https://static.actualbudget.com/prebuild/better-sqlite3"
if [ "$RELEASE" == "production" ]; then
if [ -f ../../.secret-tokens ]; then
source ../../.secret-tokens
fi
yarn build --publish always -c.releaseInfo.releaseNotes="$RELEASE_NOTES" --arm64 --x64
yarn build --publish never --arm64 --x64
echo "\nCreated release with release notes \"$RELEASE_NOTES\""
echo "\nCreated release"
else
SKIP_NOTARIZATION=true yarn build --publish never --x64
fi

BIN
demo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 107 KiB

View File

@@ -19,7 +19,7 @@
},
"scripts": {
"start": "yarn start:browser",
"start:desktop": "npm-run-all --parallel 'start:desktop-*'",
"start:desktop": "yarn rebuild-electron && npm-run-all --parallel 'start:desktop-*'",
"start:desktop-node": "yarn workspace loot-core watch:node",
"start:desktop-client": "yarn workspace @actual-app/web watch",
"start:desktop-electron": "yarn workspace desktop-electron watch",
@@ -28,40 +28,41 @@
"start:browser-backend": "yarn workspace loot-core watch:browser",
"start:browser-frontend": "yarn workspace @actual-app/web start:browser",
"build:browser": "./bin/package-browser",
"build:desktop": "./bin/package-electron",
"build:api": "yarn workspace @actual-app/api build",
"test": "yarn workspaces foreach --parallel --verbose run test",
"test:debug": "yarn workspaces foreach --verbose run test",
"e2e": "yarn workspaces foreach --parallel --verbose run e2e",
"test": "yarn workspaces foreach --all --parallel --verbose run test",
"test:debug": "yarn workspaces foreach --all --verbose run test",
"e2e": "yarn workspaces foreach --all --parallel --verbose run e2e",
"vrt": "yarn workspaces foreach --all --parallel --verbose run vrt",
"rebuild-electron": "./node_modules/.bin/electron-rebuild -f -m ./packages/loot-core",
"rebuild-node": "yarn workspace loot-core rebuild",
"lint": "eslint . --max-warnings 0",
"lint": "eslint . --max-warnings 0 --ext .js,.jsx,.ts,.tsx",
"lint:verbose": "DEBUG=eslint:cli-engine eslint . --max-warnings 0",
"typecheck": "yarn tsc",
"postinstall": "patch-package"
"typecheck": "yarn tsc && tsc-strict",
"jq": "./node_modules/node-jq/bin/jq"
},
"devDependencies": {
"cross-env": "^7.0.3",
"eslint": "^8.37.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-react-app": "7.0.1",
"eslint-import-resolver-typescript": "3.5.5",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-react": "7.32.2",
"eslint-plugin-rulesdir": "^0.2.2",
"node-jq": "^4.0.1",
"npm-run-all": "^4.1.3",
"patch-package": "^6.1.2",
"prettier": "2.8.2",
"prettier": "3.2.4",
"react-refresh": "^0.14.0",
"source-map-support": "^0.5.21",
"typescript": "^5.0.2"
},
"resolutions": {
"react-error-overlay": "6.0.9"
"typescript": "^5.0.2",
"typescript-strict-plugin": "^2.2.2-beta.2"
},
"engines": {
"node": ">=18.0.0"
},
"packageManager": "yarn@3.5.1",
"packageManager": "yarn@4.0.1",
"browserslist": [
"electron 24.0",
"defaults"

View File

@@ -2,3 +2,4 @@ app/bundle.api.js*
app/stats.json
migrations
default-db.sqlite
mocks/budgets/**/*

View File

@@ -0,0 +1,21 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`API setup and teardown successfully loads budget 1`] = `
Array [
"2016-10",
"2016-11",
"2016-12",
"2017-01",
"2017-02",
"2017-03",
"2017-04",
"2017-05",
"2017-06",
"2017-07",
"2017-08",
"2017-09",
"2017-10",
"2017-11",
"2017-12",
]
`;

View File

@@ -23,7 +23,7 @@ class Query {
}
unfilter(exprs) {
let exprSet = new Set(exprs);
const exprSet = new Set(exprs);
return new Query({
...this.state,
filterExpressions: this.state.filterExpressions.filter(
@@ -37,13 +37,13 @@ class Query {
exprs = [exprs];
}
let query = new Query({ ...this.state, selectExpressions: exprs });
const query = new Query({ ...this.state, selectExpressions: exprs });
query.state.calculation = false;
return query;
}
calculate(expr) {
let query = this.select({ result: expr });
const query = this.select({ result: expr });
query.state.calculation = true;
return query;
}
@@ -99,6 +99,6 @@ class Query {
}
}
export default function q(table) {
export function q(table) {
return new Query({ table });
}

View File

@@ -1,37 +0,0 @@
/* eslint-disable import/no-unused-modules */
// eslint-disable-next-line import/extensions
import * as bundle from './app/bundle.api.js';
import * as injected from './injected';
let actualApp;
export const internal = bundle.lib;
// DEPRECATED: remove the next line in @actual-app/api v7
export * as methods from './methods';
export * from './methods';
export * as utils from './utils';
export async function init(config = {}) {
if (actualApp) {
return;
}
global.fetch = (...args) =>
import('node-fetch').then(({ default: fetch }) => fetch(...args));
await bundle.init(config);
actualApp = bundle.lib;
injected.override(bundle.lib.send);
return bundle.lib;
}
export async function shutdown() {
if (actualApp) {
await actualApp.send('sync');
await actualApp.send('close-budget');
actualApp = null;
}
}

53
packages/api/index.ts Normal file
View File

@@ -0,0 +1,53 @@
import type {
RequestInfo as FetchInfo,
RequestInit as FetchInit,
// @ts-ignore: false-positive commonjs module error on build until typescript 5.3
} from 'node-fetch'; // with { 'resolution-mode': 'import' };
// loot-core types
import type { InitConfig } from 'loot-core/server/main';
// @ts-ignore: bundle not available until we build it
// eslint-disable-next-line import/extensions
import * as bundle from './app/bundle.api.js';
import * as injected from './injected';
import { validateNodeVersion } from './validateNodeVersion';
let actualApp: null | typeof bundle.lib;
export const internal = bundle.lib;
// DEPRECATED: remove the next line in @actual-app/api v7
export * as methods from './methods';
export * from './methods';
export * as utils from './utils';
export async function init(config: InitConfig = {}) {
if (actualApp) {
return;
}
validateNodeVersion();
if (!globalThis.fetch) {
globalThis.fetch = (url: URL | RequestInfo, init?: RequestInit) => {
return import('node-fetch').then(({ default: fetch }) =>
fetch(url as unknown as FetchInfo, init as unknown as FetchInit),
) as unknown as Promise<Response>;
};
}
await bundle.init(config);
actualApp = bundle.lib;
injected.override(bundle.lib.send);
return bundle.lib;
}
export async function shutdown() {
if (actualApp) {
await actualApp.send('sync');
await actualApp.send('close-budget');
actualApp = null;
}
}

View File

@@ -0,0 +1,24 @@
module.exports = {
moduleFileExtensions: [
'testing.js',
'testing.ts',
'api.js',
'api.ts',
'api.tsx',
'electron.js',
'electron.ts',
'mjs',
'js',
'ts',
'tsx',
'json',
],
testEnvironment: 'node',
testPathIgnorePatterns: ['/node_modules/'],
watchPathIgnorePatterns: ['<rootDir>/mocks/budgets/'],
setupFilesAfterEnv: ['<rootDir>/../loot-core/src/mocks/setup.ts'],
transformIgnorePatterns: ['/node_modules/'],
transform: {
'^.+\\.(t|j)sx?$': '@swc/jest',
},
};

View File

@@ -1,155 +0,0 @@
import * as injected from './injected';
export { default as q } from './app/query';
function send(name, args) {
return injected.send(name, args);
}
export async function runImport(name, func) {
await send('api/start-import', { budgetName: name });
try {
await func();
} catch (e) {
await send('api/abort-import');
throw e;
}
await send('api/finish-import');
}
export async function loadBudget(budgetId) {
return send('api/load-budget', { id: budgetId });
}
export async function downloadBudget(syncId, { password } = {}) {
return send('api/download-budget', { syncId, password });
}
export async function sync() {
return send('api/sync');
}
export async function batchBudgetUpdates(func) {
await send('api/batch-budget-start');
try {
await func();
} finally {
await send('api/batch-budget-end');
}
}
export function runQuery(query) {
return send('api/query', { query: query.serialize() });
}
export function getBudgetMonths() {
return send('api/budget-months');
}
export function getBudgetMonth(month) {
return send('api/budget-month', { month });
}
export function setBudgetAmount(month, categoryId, value) {
return send('api/budget-set-amount', { month, categoryId, amount: value });
}
export function setBudgetCarryover(month, categoryId, flag) {
return send('api/budget-set-carryover', { month, categoryId, flag });
}
export function addTransactions(accountId, transactions) {
return send('api/transactions-add', { accountId, transactions });
}
export function importTransactions(accountId, transactions) {
return send('api/transactions-import', { accountId, transactions });
}
export function getTransactions(accountId, startDate, endDate) {
return send('api/transactions-get', { accountId, startDate, endDate });
}
export function filterTransactions(accountId, text) {
return send('api/transactions-filter', { accountId, text });
}
export function updateTransaction(id, fields) {
return send('api/transaction-update', { id, fields });
}
export function deleteTransaction(id) {
return send('api/transaction-delete', { id });
}
export function getAccounts() {
return send('api/accounts-get');
}
export function createAccount(account, initialBalance) {
return send('api/account-create', { account, initialBalance });
}
export function updateAccount(id, fields) {
return send('api/account-update', { id, fields });
}
export function closeAccount(id, transferAccountId, transferCategoryId) {
return send('api/account-close', {
id,
transferAccountId,
transferCategoryId,
});
}
export function reopenAccount(id) {
return send('api/account-reopen', { id });
}
export function deleteAccount(id) {
return send('api/account-delete', { id });
}
export function createCategoryGroup(group) {
return send('api/category-group-create', { group });
}
export function updateCategoryGroup(id, fields) {
return send('api/category-group-update', { id, fields });
}
export function deleteCategoryGroup(id, transferCategoryId) {
return send('api/category-group-delete', { id, transferCategoryId });
}
export function getCategories() {
return send('api/categories-get', { grouped: false });
}
export function createCategory(category) {
return send('api/category-create', { category });
}
export function updateCategory(id, fields) {
return send('api/category-update', { id, fields });
}
export function deleteCategory(id, transferCategoryId) {
return send('api/category-delete', { id, transferCategoryId });
}
export function getPayees() {
return send('api/payees-get');
}
export function createPayee(payee) {
return send('api/payee-create', { payee });
}
export function updatePayee(id, fields) {
return send('api/payee-update', { id, fields });
}
export function deletePayee(id) {
return send('api/payee-delete', { id });
}

View File

@@ -0,0 +1,389 @@
// @ts-strict-ignore
import * as fs from 'fs/promises';
import * as path from 'path';
import * as api from './index';
const budgetName = 'test-budget';
beforeEach(async () => {
// we need real datetime if we are going to mix new timestamps with our mock data
global.restoreDateNow();
const budgetPath = path.join(__dirname, '/mocks/budgets/', budgetName);
await fs.rm(budgetPath, { force: true, recursive: true });
await createTestBudget('default-budget-template', budgetName);
await api.init({
dataDir: path.join(__dirname, '/mocks/budgets/'),
});
});
afterEach(async () => {
global.currentMonth = null;
await api.shutdown();
});
async function createTestBudget(templateName: string, name: string) {
const templatePath = path.join(
__dirname,
'/../loot-core/src/mocks/files',
templateName,
);
const budgetPath = path.join(__dirname, '/mocks/budgets/', name);
await fs.mkdir(budgetPath);
await fs.copyFile(
path.join(templatePath, 'metadata.json'),
path.join(budgetPath, 'metadata.json'),
);
await fs.copyFile(
path.join(templatePath, 'db.sqlite'),
path.join(budgetPath, 'db.sqlite'),
);
}
describe('API setup and teardown', () => {
// apis: loadBudget, getBudgetMonths
test('successfully loads budget', async () => {
await expect(api.loadBudget(budgetName)).resolves.toBeUndefined();
await expect(api.getBudgetMonths()).resolves.toMatchSnapshot();
});
});
describe('API CRUD operations', () => {
beforeEach(async () => {
// load test budget
await api.loadBudget(budgetName);
});
// apis: createCategoryGroup, updateCategoryGroup, deleteCategoryGroup
test('CategoryGroups: successfully update category groups', async () => {
const month = '2023-10';
global.currentMonth = month;
// create our test category group
const mainGroupId = await api.createCategoryGroup({
name: 'test-group',
});
let budgetMonth = await api.getBudgetMonth(month);
expect(budgetMonth.categoryGroups).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: mainGroupId,
}),
]),
);
// update group
await api.updateCategoryGroup(mainGroupId, {
name: 'update-tests',
});
budgetMonth = await api.getBudgetMonth(month);
expect(budgetMonth.categoryGroups).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: mainGroupId,
}),
]),
);
// delete group
await api.deleteCategoryGroup(mainGroupId);
budgetMonth = await api.getBudgetMonth(month);
expect(budgetMonth.categoryGroups).toEqual(
expect.arrayContaining([
expect.not.objectContaining({
id: mainGroupId,
}),
]),
);
});
// apis: createCategory, getCategories, updateCategory, deleteCategory
test('Categories: successfully update categories', async () => {
const month = '2023-10';
global.currentMonth = month;
// create our test category group
const mainGroupId = await api.createCategoryGroup({
name: 'test-group',
});
const secondaryGroupId = await api.createCategoryGroup({
name: 'test-secondary-group',
});
const categoryId = await api.createCategory({
name: 'test-budget',
group_id: mainGroupId,
});
const categoryIdHidden = await api.createCategory({
name: 'test-budget-hidden',
group_id: mainGroupId,
hidden: true,
});
let categories = await api.getCategories();
expect(categories).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: categoryId,
name: 'test-budget',
hidden: false,
group_id: mainGroupId,
}),
expect.objectContaining({
id: categoryIdHidden,
name: 'test-budget-hidden',
hidden: true,
group_id: mainGroupId,
}),
]),
);
// update/move category
await api.updateCategory(categoryId, {
name: 'updated-budget',
group_id: secondaryGroupId,
});
await api.updateCategory(categoryIdHidden, {
name: 'updated-budget-hidden',
group_id: secondaryGroupId,
hidden: false,
});
categories = await api.getCategories();
expect(categories).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: categoryId,
name: 'updated-budget',
hidden: false,
group_id: secondaryGroupId,
}),
expect.objectContaining({
id: categoryIdHidden,
name: 'updated-budget-hidden',
hidden: false,
group_id: secondaryGroupId,
}),
]),
);
// delete categories
await api.deleteCategory(categoryId);
expect(categories).toEqual(
expect.arrayContaining([
expect.not.objectContaining({
id: categoryId,
}),
]),
);
});
// apis: setBudgetAmount, setBudgetCarryover, getBudgetMonth
test('Budgets: successfully update budgets', async () => {
const month = '2023-10';
global.currentMonth = month;
// create some new categories to test with
const groupId = await api.createCategoryGroup({
name: 'tests',
});
const categoryId = await api.createCategory({
name: 'test-budget',
group_id: groupId,
});
await api.setBudgetAmount(month, categoryId, 100);
await api.setBudgetCarryover(month, categoryId, true);
const budgetMonth = await api.getBudgetMonth(month);
expect(budgetMonth.categoryGroups).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: groupId,
categories: expect.arrayContaining([
expect.objectContaining({
id: categoryId,
budgeted: 100,
carryover: true,
}),
]),
}),
]),
);
});
//apis: createAccount, getAccounts, updateAccount, closeAccount, deleteAccount, reopenAccount
test('Accounts: successfully complete account operators', async () => {
const accountId1 = await api.createAccount(
{ name: 'test-account1', offbudget: true },
1000,
);
const accountId2 = await api.createAccount({ name: 'test-account2' }, 0);
let accounts = await api.getAccounts();
// accounts successfully created
expect(accounts).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: accountId1,
name: 'test-account1',
offbudget: true,
}),
expect.objectContaining({ id: accountId2, name: 'test-account2' }),
]),
);
await api.updateAccount(accountId1, { offbudget: false });
await api.closeAccount(accountId1, accountId2, null);
await api.deleteAccount(accountId2);
// accounts successfully updated, and one of them deleted
accounts = await api.getAccounts();
expect(accounts).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: accountId1,
name: 'test-account1',
closed: true,
offbudget: false,
}),
expect.not.objectContaining({ id: accountId2 }),
]),
);
await api.reopenAccount(accountId1);
// the non-deleted account is reopened
accounts = await api.getAccounts();
expect(accounts).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: accountId1,
name: 'test-account1',
closed: false,
}),
]),
);
});
// apis: createPayee, getPayees, updatePayee, deletePayee
test('Payees: successfully update payees', async () => {
const payeeId1 = await api.createPayee({ name: 'test-payee1' });
const payeeId2 = await api.createPayee({ name: 'test-payee2' });
let payees = await api.getPayees();
// payees successfully created
expect(payees).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: payeeId1,
name: 'test-payee1',
}),
expect.objectContaining({
id: payeeId2,
name: 'test-payee2',
}),
]),
);
await api.updatePayee(payeeId1, { name: 'test-updated-payee' });
await api.deletePayee(payeeId2);
// confirm update and delete were successful
payees = await api.getPayees();
expect(payees).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: payeeId1,
name: 'test-updated-payee',
}),
expect.not.objectContaining({
name: 'test-payee1',
}),
expect.not.objectContaining({
id: payeeId2,
}),
]),
);
});
// apis: addTransactions, getTransactions, importTransactions, updateTransaction, deleteTransaction
test('Transactions: successfully update transactions', async () => {
const accountId = await api.createAccount({ name: 'test-account' }, 0);
let newTransaction = [
{ date: '2023-11-03', imported_id: '11', amount: 100 },
{ date: '2023-11-03', imported_id: '11', amount: 100 },
];
const addResult = await api.addTransactions(accountId, newTransaction, {
learnCategories: true,
runTransfers: true,
});
expect(addResult).toBe('ok');
// confirm added transactions exist
let transactions = await api.getTransactions(
accountId,
'2023-11-01',
'2023-11-30',
);
expect(transactions).toEqual(
expect.arrayContaining(
newTransaction.map(trans => expect.objectContaining(trans)),
),
);
expect(transactions).toHaveLength(2);
newTransaction = [
{ date: '2023-12-03', imported_id: '11', amount: 100 },
{ date: '2023-12-03', imported_id: '22', amount: 200 },
];
const reconciled = await api.importTransactions(accountId, newTransaction);
// Expect it to reconcile and to have updated one of the previous transactions
expect(reconciled.added).toHaveLength(1);
expect(reconciled.updated).toHaveLength(1);
// confirm imported transactions exist
transactions = await api.getTransactions(
accountId,
'2023-12-01',
'2023-12-31',
);
expect(transactions).toEqual(
expect.arrayContaining(
newTransaction.map(trans => expect.objectContaining(trans)),
),
);
expect(transactions).toHaveLength(2);
const idToUpdate = reconciled.added[0];
const idToDelete = reconciled.updated[0];
await api.updateTransaction(idToUpdate, { amount: 500 });
await api.deleteTransaction(idToDelete);
// confirm updates and deletions work
transactions = await api.getTransactions(
accountId,
'2023-12-01',
'2023-12-31',
);
expect(transactions).toEqual(
expect.arrayContaining([
expect.objectContaining({ id: idToUpdate, amount: 500 }),
expect.not.objectContaining({ id: idToDelete }),
]),
);
expect(transactions).toHaveLength(1);
});
});

166
packages/api/methods.ts Normal file
View File

@@ -0,0 +1,166 @@
// @ts-strict-ignore
import type { Handlers } from 'loot-core/src/types/handlers';
import * as injected from './injected';
export { q } from './app/query';
function send<K extends keyof Handlers, T extends Handlers[K]>(
name: K,
args?: Parameters<T>[0],
): Promise<Awaited<ReturnType<T>>> {
return injected.send(name, args);
}
export async function runImport(name, func) {
await send('api/start-import', { budgetName: name });
try {
await func();
} catch (e) {
await send('api/abort-import');
throw e;
}
await send('api/finish-import');
}
export async function loadBudget(budgetId) {
return send('api/load-budget', { id: budgetId });
}
export async function downloadBudget(syncId, { password }: { password? } = {}) {
return send('api/download-budget', { syncId, password });
}
export async function sync() {
return send('api/sync');
}
export async function batchBudgetUpdates(func) {
await send('api/batch-budget-start');
try {
await func();
} finally {
await send('api/batch-budget-end');
}
}
export function runQuery(query) {
return send('api/query', { query: query.serialize() });
}
export function getBudgetMonths() {
return send('api/budget-months');
}
export function getBudgetMonth(month) {
return send('api/budget-month', { month });
}
export function setBudgetAmount(month, categoryId, value) {
return send('api/budget-set-amount', { month, categoryId, amount: value });
}
export function setBudgetCarryover(month, categoryId, flag) {
return send('api/budget-set-carryover', { month, categoryId, flag });
}
export function addTransactions(
accountId,
transactions,
{ learnCategories = false, runTransfers = false } = {},
) {
return send('api/transactions-add', {
accountId,
transactions,
learnCategories,
runTransfers,
});
}
export function importTransactions(accountId, transactions) {
return send('api/transactions-import', { accountId, transactions });
}
export function getTransactions(accountId, startDate, endDate) {
return send('api/transactions-get', { accountId, startDate, endDate });
}
export function updateTransaction(id, fields) {
return send('api/transaction-update', { id, fields });
}
export function deleteTransaction(id) {
return send('api/transaction-delete', { id });
}
export function getAccounts() {
return send('api/accounts-get');
}
export function createAccount(account, initialBalance?) {
return send('api/account-create', { account, initialBalance });
}
export function updateAccount(id, fields) {
return send('api/account-update', { id, fields });
}
export function closeAccount(id, transferAccountId?, transferCategoryId?) {
return send('api/account-close', {
id,
transferAccountId,
transferCategoryId,
});
}
export function reopenAccount(id) {
return send('api/account-reopen', { id });
}
export function deleteAccount(id) {
return send('api/account-delete', { id });
}
export function createCategoryGroup(group) {
return send('api/category-group-create', { group });
}
export function updateCategoryGroup(id, fields) {
return send('api/category-group-update', { id, fields });
}
export function deleteCategoryGroup(id, transferCategoryId?) {
return send('api/category-group-delete', { id, transferCategoryId });
}
export function getCategories() {
return send('api/categories-get', { grouped: false });
}
export function createCategory(category) {
return send('api/category-create', { category });
}
export function updateCategory(id, fields) {
return send('api/category-update', { id, fields });
}
export function deleteCategory(id, transferCategoryId?) {
return send('api/category-delete', { id, transferCategoryId });
}
export function getPayees() {
return send('api/payees-get');
}
export function createPayee(payee) {
return send('api/payee-create', { payee });
}
export function updatePayee(id, fields) {
return send('api/payee-update', { id, fields });
}
export function deletePayee(id) {
return send('api/payee-delete', { id });
}

View File

View File

@@ -1,27 +1,38 @@
{
"name": "@actual-app/api",
"version": "6.2.1",
"version": "6.4.0",
"license": "MIT",
"description": "An API for Actual",
"engines": {
"node": ">=18.12.0"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"types": "@types/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build:app": "yarn workspace loot-core build:api",
"build:node": "tsc --p tsconfig.dist.json",
"build:node": "tsc --p tsconfig.dist.json && tsc-alias -p tsconfig.dist.json",
"build:migrations": "cp migrations/*.sql dist/migrations",
"build:default-db": "cp default-db.sqlite dist/",
"build": "rm -rf dist && yarn run build:app && yarn run build:node && yarn run build:migrations && yarn run build:default-db"
"build": "yarn run clean && yarn run build:app && yarn run build:node && yarn run build:migrations && yarn run build:default-db",
"test": "yarn run build:app && jest -c jest.config.js",
"clean": "rm -rf dist @types"
},
"dependencies": {
"better-sqlite3": "^8.2.0",
"better-sqlite3": "^9.2.2",
"compare-versions": "^6.1.0",
"node-fetch": "^3.3.2",
"uuid": "^9.0.0"
},
"devDependencies": {
"@swc/core": "^1.3.105",
"@swc/jest": "^0.2.31",
"@types/jest": "^27.5.0",
"@types/uuid": "^9.0.2",
"jest": "^27.0.0",
"tsc-alias": "^1.8.8",
"typescript": "^5.0.2"
}
}

View File

@@ -3,13 +3,16 @@
"compilerOptions": {
// Using ES2021 because thats the newest version where
// the latest Node 16.x release supports all of the features
"target": "es2021",
"target": "ES2021",
"module": "CommonJS",
"moduleResolution": "Node16",
"noEmit": false,
"declaration": true,
"outDir": "dist"
"outDir": "dist",
"declarationDir": "@types",
"paths": {
"loot-core/*": ["./@types/loot-core/*"],
}
},
"include": ["."],
"exclude": ["dist"]
"exclude": ["**/node_modules/*", "dist", "@types"]
}

View File

@@ -0,0 +1,16 @@
import { satisfies } from 'compare-versions';
import * as packageJson from './package.json';
export function validateNodeVersion() {
if (process?.versions?.node) {
const nodeVersion = process?.versions?.node;
const minimumNodeVersion = packageJson.engines.node;
if (!satisfies(nodeVersion, minimumNodeVersion)) {
throw new Error(
`@actual-app/api requires a node version ${minimumNodeVersion}. Found that you are using: ${nodeVersion}. Please upgrade to a higher version`,
);
}
}
}

View File

@@ -1,4 +1,6 @@
module.exports = {
preset: 'ts-jest/presets/js-with-ts-esm',
testEnvironment: 'node',
transform: {
'^.+\\.(t|j)sx?$': '@swc/jest',
},
};

View File

@@ -20,10 +20,11 @@
"uuid": "^9.0.0"
},
"devDependencies": {
"@swc/core": "^1.3.105",
"@swc/jest": "^0.2.31",
"@types/jest": "^27.5.0",
"@types/uuid": "^9.0.2",
"jest": "^27.0.0",
"ts-jest": "^27.0.0",
"ts-protoc-gen": "^0.15.0",
"typescript": "^5.0.2"
}

View File

@@ -69,8 +69,8 @@ describe('merkle trie', () => {
});
test('diffing works with empty tries', () => {
let trie1 = merkle.emptyTrie();
let trie2 = merkle.insert(
const trie1 = merkle.emptyTrie();
const trie2 = merkle.insert(
merkle.emptyTrie(),
Timestamp.parse('2009-01-02T10:17:37.789Z-0000-0000testinguuid1')!,
);
@@ -79,7 +79,7 @@ describe('merkle trie', () => {
});
test('pruning works and keeps correct hashes', () => {
let messages = [
const messages = [
message('2018-11-01T01:00:00.000Z-0000-0123456789ABCDEF', 1000),
message('2018-11-01T01:09:00.000Z-0000-0123456789ABCDEF', 1100),
message('2018-11-01T01:18:00.000Z-0000-0123456789ABCDEF', 1200),
@@ -101,13 +101,13 @@ describe('merkle trie', () => {
expect(trie.hash).toBe(2496);
expect(trie).toMatchSnapshot();
let pruned = merkle.prune(trie);
const pruned = merkle.prune(trie);
expect(pruned.hash).toBe(2496);
expect(pruned).toMatchSnapshot();
});
test('diffing differently shaped tries returns correct time', () => {
let messages = [
const messages = [
message('2018-11-01T01:00:00.000Z-0000-0123456789ABCDEF', 1000),
message('2018-11-01T01:09:00.000Z-0000-0123456789ABCDEF', 1100),
message('2018-11-01T01:18:00.000Z-0000-0123456789ABCDEF', 1200),
@@ -122,7 +122,7 @@ describe('merkle trie', () => {
message('2018-11-01T02:37:00.000Z-0000-0123456789ABCDEF', 2100),
];
let trie = insertMessages({}, messages);
const trie = insertMessages({}, messages);
// Case 0: It always returns a base time when comparing with an
// empty trie
@@ -136,7 +136,7 @@ describe('merkle trie', () => {
// Case 1: Add an older message that modifies the trie in such a
// way that it modifies the 1st out of 3 branches (so it will be
// pruned away)
let trie1 = insertMessages(trie, [
const trie1 = insertMessages(trie, [
message('2018-11-01T00:59:00.000Z-0000-0123456789ABCDEF', 900),
]);
@@ -167,7 +167,7 @@ describe('merkle trie', () => {
// Case 2: Add two messages similar to the above case, but the
// second message modifies the 2nd key at the same level as the
// first message modifying the 1st key
let trie2 = insertMessages(trie, [
const trie2 = insertMessages(trie, [
message('2018-11-01T00:59:00.000Z-0000-0123456789ABCDEF', 900),
message('2018-11-01T01:15:00.000Z-0000-0123456789ABCDEF', 1422),
]);

View File

@@ -36,7 +36,7 @@ export function getKeys(trie: TrieNode): NumberTrieNodeKey[] {
export function keyToTimestamp(key: string): number {
// 16 is the length of the base 3 value of the current time in
// minutes. Ensure it's padded to create the full value
let fullkey = key + '0'.repeat(16 - key.length);
const fullkey = key + '0'.repeat(16 - key.length);
// Parse the base 3 representation
return parseInt(fullkey, 3) * 1000 * 60;
@@ -46,8 +46,8 @@ export function keyToTimestamp(key: string): number {
* Mutates `trie` to insert a node at `timestamp`
*/
export function insert(trie: TrieNode, timestamp: Timestamp) {
let hash = timestamp.hash();
let key = Number(Math.floor(timestamp.millis() / 1000 / 60)).toString(3);
const hash = timestamp.hash();
const key = Number(Math.floor(timestamp.millis() / 1000 / 60)).toString(3);
trie = Object.assign({}, trie, { hash: (trie.hash || 0) ^ hash });
return insertKey(trie, key, hash);
@@ -68,8 +68,8 @@ function insertKey(trie: TrieNode, key: string, hash: number): TrieNode {
}
export function build(timestamps: Timestamp[]) {
let trie = emptyTrie();
for (let timestamp of timestamps) {
const trie = emptyTrie();
for (const timestamp of timestamps) {
insert(trie, timestamp);
}
return trie;
@@ -89,11 +89,11 @@ export function diff(trie1: TrieNode, trie2: TrieNode): number | null {
// left (this shouldn't happen, if that's the case the hash check at
// the top of this function should pass)
while (1) {
let keyset = new Set([...getKeys(node1), ...getKeys(node2)]);
let keys = [...keyset.values()];
const keyset = new Set([...getKeys(node1), ...getKeys(node2)]);
const keys = [...keyset.values()];
keys.sort();
let diffkey = null;
let diffkey: null | '0' | '1' | '2' = null;
// Traverse down the trie through keys that aren't the same. We
// traverse down the keys in order. Stop in two cases: either one
@@ -110,10 +110,10 @@ export function diff(trie1: TrieNode, trie2: TrieNode): number | null {
// changed time that we know of, because of pruning it might take
// multiple passes to sync up a trie.
for (let i = 0; i < keys.length; i++) {
let key = keys[i];
const key = keys[i];
let next1 = node1[key];
let next2 = node2[key];
const next1 = node1[key];
const next2 = node2[key];
if (!next1 || !next2) {
break;
@@ -143,13 +143,13 @@ export function prune(trie: TrieNode, n = 2): TrieNode {
return trie;
}
let keys = getKeys(trie);
const keys = getKeys(trie);
keys.sort();
let next: TrieNode = { hash: trie.hash };
const next: TrieNode = { hash: trie.hash };
// Prune child nodes.
for (let k of keys.slice(-n)) {
for (const k of keys.slice(-n)) {
const node = trie[k];
if (!node) {

View File

@@ -28,7 +28,7 @@ describe('Timestamp', function () {
describe('parsing', function () {
it('should not parse', function () {
let invalidInputs = [
const invalidInputs = [
null,
undefined,
{},
@@ -44,19 +44,19 @@ describe('Timestamp', function () {
'9999-12-31T23:59:59.999Z-10000-FFFFFFFFFFFFFFFF',
'9999-12-31T23:59:59.999Z-FFFF-10000000000000000',
];
for (let invalidInput of invalidInputs) {
for (const invalidInput of invalidInputs) {
expect(Timestamp.parse(invalidInput as string)).toBe(null);
}
});
it('should parse', function () {
let validInputs = [
const validInputs = [
'1970-01-01T00:00:00.000Z-0000-0000000000000000',
'2015-04-24T22:23:42.123Z-1000-0123456789ABCDEF',
'9999-12-31T23:59:59.999Z-FFFF-FFFFFFFFFFFFFFFF',
];
for (let validInput of validInputs) {
let parsed = Timestamp.parse(validInput)!;
for (const validInput of validInputs) {
const parsed = Timestamp.parse(validInput)!;
expect(typeof parsed).toBe('object');
expect(parsed.millis() >= 0).toBeTruthy();
expect(parsed.millis() < 253402300800000).toBeTruthy();

View File

@@ -80,7 +80,7 @@ export function makeClientId() {
return uuidv4().replace(/-/g, '').slice(-16);
}
let config = {
const config = {
// Allow 5 minutes of clock drift
maxDrift: 5 * 60 * 1000,
};
@@ -96,9 +96,9 @@ export class Timestamp {
constructor(millis: number, counter: number, node: string) {
this._state = {
millis: millis,
counter: counter,
node: node,
millis,
counter,
node,
};
}
@@ -168,11 +168,11 @@ export class Timestamp {
return timestamp;
}
if (typeof timestamp === 'string') {
let parts = timestamp.split('-');
const parts = timestamp.split('-');
if (parts && parts.length === 5) {
let millis = Date.parse(parts.slice(0, 3).join('-')).valueOf();
let counter = parseInt(parts[3], 16);
let node = parts[4];
const millis = Date.parse(parts.slice(0, 3).join('-')).valueOf();
const counter = parseInt(parts[3], 16);
const node = parts[4];
if (
!isNaN(millis) &&
millis >= 0 &&
@@ -198,17 +198,17 @@ export class Timestamp {
}
// retrieve the local wall time
let phys = Date.now();
const phys = Date.now();
// unpack the clock.timestamp logical time and counter
let lOld = clock.timestamp.millis();
let cOld = clock.timestamp.counter();
const lOld = clock.timestamp.millis();
const cOld = clock.timestamp.counter();
// calculate the next logical time and counter
// * ensure that the logical time never goes backward
// * increment the counter if phys time does not advance
let lNew = Math.max(lOld, phys);
let cNew = lOld === lNew ? cOld + 1 : 0;
const lNew = Math.max(lOld, phys);
const cNew = lOld === lNew ? cOld + 1 : 0;
// check the result for drift and counter overflow
if (lNew - phys > config.maxDrift) {
@@ -238,11 +238,11 @@ export class Timestamp {
}
// retrieve the local wall time
let phys = Date.now();
const phys = Date.now();
// unpack the message wall time/counter
let lMsg = msg.millis();
let cMsg = msg.counter();
const lMsg = msg.millis();
const cMsg = msg.counter();
// assert the node id and remote clock drift
// if (msg.node() === clock.timestamp.node()) {
@@ -253,8 +253,8 @@ export class Timestamp {
}
// unpack the clock.timestamp logical time and counter
let lOld = clock.timestamp.millis();
let cOld = clock.timestamp.counter();
const lOld = clock.timestamp.millis();
const cOld = clock.timestamp.counter();
// calculate the next logical time and counter
// . ensure that the logical time never goes backward
@@ -262,15 +262,15 @@ export class Timestamp {
// . if max = old > message, increment local counter
// . if max = messsage > old, increment message counter
// . otherwise, clocks are monotonic, reset counter
let lNew = Math.max(Math.max(lOld, phys), lMsg);
let cNew =
const lNew = Math.max(Math.max(lOld, phys), lMsg);
const cNew =
lNew === lOld && lNew === lMsg
? Math.max(cOld, cMsg) + 1
: lNew === lOld
? cOld + 1
: lNew === lMsg
? cMsg + 1
: 0;
? cOld + 1
: lNew === lMsg
? cMsg + 1
: 0;
// check the result for drift and counter overflow
if (lNew - phys > config.maxDrift) {

View File

@@ -3,7 +3,7 @@
"compilerOptions": {
// Using ES2021 because thats the newest version where
// the latest Node 16.x release supports all of the features
"target": "es2021",
"target": "ES2021",
"module": "CommonJS",
"noEmit": false,
"declaration": true,

View File

@@ -10,11 +10,13 @@ test-results
# production
build
build-stats
stats.json
# misc
.DS_Store
.env
npm-debug.log
.swc
*kcab.*
public/kcab

View File

@@ -0,0 +1,16 @@
{
"jsc": {
"target": "es2022",
"transform": {
"react": {
"runtime": "automatic"
}
},
"externalHelpers": true,
"parser": {
"syntax": "typescript",
"tsx": true
}
},
"sourceMaps": true
}

View File

@@ -4,11 +4,13 @@ Actual on the web
E2E (end-to-end) tests use [Playwright](https://playwright.dev/). Running them requires an Actual server to be running either locally or on a remote server.
### Functional
Running against the local server:
```sh
# Start the development server
yarn start:browser
yarn start
# Run against the local server (localhost:3001)
yarn e2e
@@ -19,3 +21,44 @@ Running against a remote server:
```sh
E2E_START_URL=http://my-remote-server.com yarn e2e
```
### Visual regression
Visual regression tests (also known as screenshot tests) check that the visual appearance of the product has not regressed. Each environment has slightly different colors, fonts etc. Mac differs from Windows which differs from Linux. In order to have a stable test environment for visual comparisons - you must use a standartised docker container. This ensures that the tests are always ran in a consistent environment.
Prerequisites:
- Docker installed
#### Running against the local server
First start a dev instance:
```sh
HTTPS=true yarn start
```
Note the network IP address and port the dev instance is listening on.
Next, navigate to the root of your project folder, run the standartised docker container, and launch the visual regression tests from within it.
```sh
# Run docker container
docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.41.1-jammy /bin/bash
# If you receive an error such as "docker: invalid reference format", please instead use the following command:
docker run --rm --network host -v ${pwd}:/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.41.1-jammy /bin/bash
# Run the VRT tests: important - they MUST be ran against a HTTPS server. Use the ip and port noted earlier
E2E_START_URL=https://ip:port yarn vrt
# To update snapshots, use the following command:
E2E_START_URL=https://ip:port yarn vrt --update-snapshots
```
#### Running against a remote server
You can also run the tests against a remote server by passing the URL:
```sh
E2E_START_URL=https://my-remote-server.com yarn vrt
```

View File

@@ -8,7 +8,6 @@ echo "Building the browser..."
rm -fr build
export IS_GENERIC_BROWSER=1
export INLINE_RUNTIME_CHUNK=false
export REACT_APP_BACKEND_WORKER_HASH=`ls "$ROOT"/../public/kcab/kcab.worker.*.js | sed 's/.*kcab\.worker\.\(.*\)\.js/\1/'`
yarn build
@@ -16,4 +15,4 @@ yarn build
rm -fr build-stats
mkdir build-stats
mv build/kcab/stats.json build-stats/loot-core-stats.json
mv build/stats.json build-stats/desktop-client-stats.json
mv ./stats.json build-stats/web-stats.json

View File

@@ -1,77 +0,0 @@
const path = require('path');
const chokidar = require('chokidar');
const {
addWebpackPlugin,
addWebpackResolve,
babelInclude,
override,
overrideDevServer,
} = require('customize-cra');
const { IgnorePlugin } = require('webpack');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
if (process.env.CI) {
process.env.DISABLE_ESLINT_PLUGIN = 'true';
}
// Forward Netlify env variables
if (process.env.REVIEW_ID) {
process.env.REACT_APP_REVIEW_ID = process.env.REVIEW_ID;
}
module.exports = {
webpack: override(
babelInclude([path.resolve('src'), path.resolve('../loot-core')]),
addWebpackResolve({
extensions: [
...(process.env.IS_GENERIC_BROWSER
? ['.browser.js', '.browser.ts', '.browser.tsx']
: []),
'.web.js',
'.web.ts',
'.web.tsx',
'.js',
'.ts',
'.tsx',
],
}),
addWebpackPlugin(
new BundleAnalyzerPlugin({
analyzerMode: 'disabled',
generateStatsFile: true,
}),
),
// Pikaday throws a warning if Moment.js is not installed however it doesn't
// actually require it to be installed. As we don't use Moment.js ourselves
// then we can just silence this warning.
addWebpackPlugin(
new IgnorePlugin({
contextRegExp: /pikaday$/,
resourceRegExp: /moment$/,
}),
),
),
devServer: overrideDevServer(config => {
return {
...config,
onBeforeSetupMiddleware(server) {
chokidar
.watch([
path.resolve('../loot-core/lib-dist/*.js'),
path.resolve('../loot-core/lib-dist/browser/*.js'),
])
.on('all', function () {
for (const ws of server.webSocketServer.clients) {
ws.send(JSON.stringify({ type: 'static-changed' }));
}
});
},
headers: {
...config.headers,
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp',
},
};
}),
};

View File

@@ -28,13 +28,13 @@ test.describe('Accounts', () => {
balance: 100,
});
expect(await accountPage.getNthTransaction(0)).toMatchObject({
payee: 'Starting Balance',
notes: '',
category: 'Starting Balances',
debit: '',
credit: '100.00',
});
const transaction = accountPage.getNthTransaction(0);
await expect(transaction.payee).toHaveText('Starting Balance');
await expect(transaction.notes).toHaveText('');
await expect(transaction.category).toHaveText('Starting Balances');
await expect(transaction.debit).toHaveText('');
await expect(transaction.credit).toHaveText('100.00');
await expect(page).toMatchThemeScreenshots();
});
test('closes an account', async () => {
@@ -44,8 +44,10 @@ test.describe('Accounts', () => {
const modal = await accountPage.clickCloseAccount();
await modal.selectTransferAccount('Vanguard 401k');
await expect(page).toMatchThemeScreenshots();
await modal.closeAccount();
await expect(accountPage.accountName).toHaveText('Closed: Roth IRA');
await expect(page).toMatchThemeScreenshots();
});
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

View File

@@ -13,6 +13,11 @@ test.describe('Budget', () => {
await page.goto('/');
budgetPage = await configurationPage.createTestFile();
// Move mouse to corner of the screen;
// sometimes the mouse hovers on a budget element thus rendering an input box
// and this breaks screenshot tests
await page.mouse.move(0, 0);
});
test.afterAll(async () => {
@@ -28,6 +33,7 @@ test.describe('Budget', () => {
await expect(summary.getByText(/^Overspent in /)).toBeVisible();
await expect(summary.getByText('Budgeted')).toBeVisible();
await expect(summary.getByText('For Next Month')).toBeVisible();
await expect(page).toMatchThemeScreenshots();
});
test('transfer funds to another category', async () => {
@@ -40,6 +46,7 @@ test.describe('Budget', () => {
expect(await budgetPage.getBalanceForRow(2)).toEqual(
currentFundsA + currentFundsB,
);
await expect(page).toMatchThemeScreenshots();
});
test('budget table is rendered', async () => {
@@ -52,8 +59,8 @@ test.describe('Budget', () => {
});
test('clicking on spent amounts opens a transaction page', async () => {
let categoryName = await budgetPage.getCategoryNameForRow(1);
let accountPage = await budgetPage.clickOnSpentAmountForRow(1);
const categoryName = await budgetPage.getCategoryNameForRow(1);
const accountPage = await budgetPage.clickOnSpentAmountForRow(1);
expect(page.url()).toContain('/accounts');
expect(await accountPage.accountName.textContent()).toMatch(
new RegExp(String.raw`${categoryName} \(\w+ \d+\)`),

View File

@@ -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": []
},

View File

@@ -0,0 +1,152 @@
import { test, expect } from '@playwright/test';
import { ConfigurationPage } from './page-models/configuration-page';
import { MobileNavigation } from './page-models/mobile-navigation';
test.describe('Mobile', () => {
let page;
let navigation;
let configurationPage;
test.beforeEach(async ({ browser }) => {
page = await browser.newPage();
navigation = new MobileNavigation(page);
configurationPage = new ConfigurationPage(page);
await page.setViewportSize({
width: 350,
height: 600,
});
await page.goto('/');
await configurationPage.createTestFile();
});
test.afterEach(async () => {
await page.close();
});
test('loads the budget page with budgeted amounts', async () => {
const budgetPage = await navigation.goToBudgetPage();
await expect(budgetPage.categoryNames).toHaveText([
'Food',
'Restaurants',
'Entertainment',
'Clothing',
'General',
'Gift',
'Medical',
'Savings',
'Cell',
'Internet',
'Mortgage',
'Water',
'Power',
]);
await expect(page).toMatchThemeScreenshots();
});
test('opens the accounts page and asserts on balances', async () => {
const accountsPage = await navigation.goToAccountsPage();
const account = await accountsPage.getNthAccount(1);
await expect(account.name).toHaveText('Ally Savings');
await expect(account.balance).toHaveText('7,653.00');
await expect(page).toMatchThemeScreenshots();
});
test('opens individual account page and checks that filtering is working', async () => {
const accountsPage = await navigation.goToAccountsPage();
const accountPage = await accountsPage.openNthAccount(0);
await expect(accountPage.heading).toHaveText('Bank of America');
expect(await accountPage.getBalance()).toBeGreaterThan(0);
await expect(accountPage.noTransactionsFoundError).not.toBeVisible();
await expect(page).toMatchThemeScreenshots();
await accountPage.searchByText('nothing should be found');
await expect(accountPage.noTransactionsFoundError).toBeVisible();
await expect(accountPage.transactions).toHaveCount(0);
await expect(page).toMatchThemeScreenshots();
await accountPage.searchByText('Kroger');
await expect(accountPage.transactions).not.toHaveCount(0);
await expect(page).toMatchThemeScreenshots();
});
test('creates a transaction via footer button', async () => {
const transactionEntryPage = await navigation.goToTransactionEntryPage();
await expect(page).toMatchThemeScreenshots();
await expect(transactionEntryPage.header).toHaveText('New Transaction');
await transactionEntryPage.amountField.fill('12.34');
// Click anywhere to cancel active edit.
await transactionEntryPage.header.click();
await transactionEntryPage.fillField(
page.getByTestId('payee-field'),
'Kroger',
);
await transactionEntryPage.fillField(
page.getByTestId('category-field'),
'Clothing',
);
await transactionEntryPage.fillField(
page.getByTestId('account-field'),
'Ally Savings',
);
await expect(page).toMatchThemeScreenshots();
const accountPage = await transactionEntryPage.createTransaction();
await expect(accountPage.transactions.nth(0)).toHaveText(
'KrogerClothing-12.34',
);
await expect(page).toMatchThemeScreenshots();
});
test('creates a transaction from `/accounts/:id` page', async () => {
const accountsPage = await navigation.goToAccountsPage();
const accountPage = await accountsPage.openNthAccount(2);
const transactionEntryPage = await accountPage.clickCreateTransaction();
await expect(transactionEntryPage.header).toHaveText('New Transaction');
await expect(page).toMatchThemeScreenshots();
await transactionEntryPage.amountField.fill('12.34');
// Click anywhere to cancel active edit.
await transactionEntryPage.header.click();
await transactionEntryPage.fillField(
page.getByTestId('payee-field'),
'Kroger',
);
await transactionEntryPage.fillField(
page.getByTestId('category-field'),
'Clothing',
);
await transactionEntryPage.createTransaction();
await expect(accountPage.transactions.nth(0)).toHaveText(
'KrogerClothing-12.34',
);
});
test('checks that settings page can be opened', async () => {
const settingsPage = await navigation.goToSettingsPage();
await expect(page).toMatchThemeScreenshots();
const downloadPromise = page.waitForEvent('download');
await settingsPage.exportData();
const download = await downloadPromise;
expect(await download.suggestedFilename()).toMatch(
/^\d{4}-\d{2}-\d{2}-.*.zip$/,
);
await expect(page).toMatchThemeScreenshots();
});
});

View File

@@ -23,6 +23,14 @@ test.describe('Onboarding', () => {
await page.close();
});
test('checks the page visuals', async () => {
await expect(configurationPage.heading).toHaveText('Wheres the server?');
await expect(page).toMatchThemeScreenshots();
await configurationPage.clickOnNoServer();
await expect(page).toMatchThemeScreenshots();
});
test('creates a new budget file by importing YNAB4 budget', async () => {
await configurationPage.clickOnNoServer();
const budgetPage = await configurationPage.importBudget(
@@ -51,10 +59,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 () => {
@@ -64,7 +72,7 @@ test.describe('Onboarding', () => {
path.resolve(__dirname, 'data/actual-demo-budget.zip'),
);
await expect(budgetPage.budgetTable).toBeVisible();
await expect(budgetPage.budgetTable).toBeVisible({ timeout: 20_000 });
const accountPage = await navigation.goToAccountPage('Ally Savings');
await expect(accountPage.accountBalance).toHaveText('1,772.80');

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 KiB

View File

@@ -20,9 +20,11 @@ export class AccountPage {
name: 'Menu',
});
this.transactionTableRow = this.page
.getByTestId('table')
.getByTestId('row');
this.transactionTable = this.page.getByTestId('transaction-table');
this.transactionTableRow = this.transactionTable.getByTestId('row');
this.filterButton = this.page.getByRole('button', { name: 'Filter' });
this.filterSelectTooltip = this.page.getByTestId('filters-select-tooltip');
}
/**
@@ -70,15 +72,15 @@ export class AccountPage {
* Retrieve the data for the nth-transaction.
* 0-based index
*/
async getNthTransaction(index) {
getNthTransaction(index) {
const row = this.transactionTableRow.nth(index);
return {
payee: await row.getByTestId('payee').textContent(),
notes: await row.getByTestId('notes').textContent(),
category: await row.getByTestId('category').textContent(),
debit: await row.getByTestId('debit').textContent(),
credit: await row.getByTestId('credit').textContent(),
payee: row.getByTestId('payee'),
notes: row.getByTestId('notes'),
category: row.getByTestId('category'),
debit: row.getByTestId('debit'),
credit: row.getByTestId('credit'),
};
}
@@ -94,6 +96,26 @@ export class AccountPage {
);
}
/**
* Open the filtering popover.
*/
async filterBy(field) {
await this.filterButton.click();
await this.filterSelectTooltip.getByRole('button', { name: field }).click();
return new FilterTooltip(this.page.getByTestId('filters-menu-tooltip'));
}
/**
* Remove the nth filter
*/
async removeFilter(idx) {
await this.page
.getByRole('button', { name: 'Delete filter' })
.nth(idx)
.click();
}
async _fillTransactionFields(transactionRow, transaction) {
if (transaction.payee) {
await transactionRow.getByTestId('payee').click();
@@ -131,3 +153,10 @@ export class AccountPage {
}
}
}
class FilterTooltip {
constructor(page) {
this.page = page;
this.applyButton = page.getByRole('button', { name: 'Apply' });
}
}

View File

@@ -0,0 +1,39 @@
import { MobileTransactionEntryPage } from './mobile-transaction-entry-page';
export class MobileAccountPage {
constructor(page) {
this.page = page;
this.heading = page.getByRole('heading');
this.balance = page.getByTestId('account-balance');
this.noTransactionsFoundError = page.getByText('No transactions');
this.searchBox = page.getByPlaceholder(/^Search/);
this.transactionList = page.getByLabel('transaction list');
this.transactions = this.transactionList.getByRole('button');
this.createTransactionButton = page.getByRole('button', {
name: 'Add Transaction',
});
}
/**
* Retrieve the balance of the account as a number
*/
async getBalance() {
return parseInt(await this.balance.textContent(), 10);
}
/**
* Search by the given term
*/
async searchByText(term) {
await this.searchBox.fill(term);
}
/**
* Go to transaction creation page
*/
async clickCreateTransaction() {
this.createTransactionButton.click();
return new MobileTransactionEntryPage(this.page);
}
}

View File

@@ -0,0 +1,30 @@
import { MobileAccountPage } from './mobile-account-page';
export class MobileAccountsPage {
constructor(page) {
this.page = page;
this.accounts = this.page.getByTestId('account');
}
/**
* Get the name and balance of the nth account
*/
async getNthAccount(idx) {
const accountRow = this.accounts.nth(idx);
return {
name: accountRow.getByTestId('account-name'),
balance: accountRow.getByTestId('account-balance'),
};
}
/**
* Click on the n-th account to open it up
*/
async openNthAccount(idx) {
await this.accounts.nth(idx).getByRole('button').click();
return new MobileAccountPage(this.page);
}
}

View File

@@ -0,0 +1,9 @@
export class MobileBudgetPage {
constructor(page) {
this.page = page;
this.categoryNames = page
.getByTestId('budget-groups')
.getByTestId('category-name');
}
}

View File

@@ -0,0 +1,46 @@
import { MobileAccountsPage } from './mobile-accounts-page';
import { MobileBudgetPage } from './mobile-budget-page';
import { MobileTransactionEntryPage } from './mobile-transaction-entry-page';
import { SettingsPage } from './settings-page';
export class MobileNavigation {
constructor(page) {
this.page = page;
}
async goToBudgetPage() {
const link = this.page.getByRole('link', { name: 'Budget' });
await link.click();
return new MobileBudgetPage(this.page);
}
async goToAccountsPage() {
const link = this.page.getByRole('link', { name: 'Accounts' });
await link.click();
return new MobileAccountsPage(this.page);
}
async goToTransactionEntryPage() {
const link = this.page.getByRole('link', { name: 'Transaction' });
await link.click();
return new MobileTransactionEntryPage(this.page);
}
async goToSettingsPage() {
await this.dragNavbarUp();
const link = this.page.getByRole('link', { name: 'Settings' });
await link.click();
return new SettingsPage(this.page);
}
async dragNavbarUp() {
await this.page
.getByRole('navigation')
.dragTo(this.page.getByTestId('budget-table'));
}
}

View File

@@ -0,0 +1,23 @@
import { MobileAccountPage } from './mobile-account-page';
export class MobileTransactionEntryPage {
constructor(page) {
this.page = page;
this.header = page.getByRole('heading');
this.amountField = page.getByTestId('amount-input');
this.add = page.getByRole('button', { name: 'Add transaction' });
}
async fillField(fieldLocator, content) {
await fieldLocator.click();
await this.page.locator('css=[role=combobox] input').fill(content);
await this.page.keyboard.press('Enter');
}
async createTransaction() {
await this.add.click();
return new MobileAccountPage(this.page);
}
}

View File

@@ -8,6 +8,16 @@ export class ReportsPage {
return this.pageContent.getByRole('link', { name: /^Net/ }).waitFor();
}
async goToNetWorthPage() {
await this.pageContent.getByRole('link', { name: /^Net/ }).click();
return new ReportsPage(this.page);
}
async goToCashFlowPage() {
await this.pageContent.getByRole('link', { name: /^Cash/ }).click();
return new ReportsPage(this.page);
}
async getAvailableReportList() {
return this.pageContent
.getByRole('link')

View File

@@ -1,6 +1,7 @@
export class RulesPage {
constructor(page) {
this.page = page;
this.searchBox = page.getByPlaceholder('Filter rules...');
}
/**
@@ -22,19 +23,19 @@ export class RulesPage {
* Retrieve the data for the nth-rule.
* 0-based index
*/
async getNthRule(index) {
getNthRule(index) {
const row = this.page.getByTestId('table').getByTestId('row').nth(index);
return {
conditions: await row
.getByTestId('conditions')
.evaluate(el => [...el.children].map(c => c.textContent)),
actions: await row
.getByTestId('actions')
.evaluate(el => [...el.children].map(c => c.textContent)),
conditions: row.getByTestId('conditions').locator(':scope > div'),
actions: row.getByTestId('actions').locator(':scope > div'),
};
}
async searchFor(text) {
await this.searchBox.fill(text);
}
async _fillRuleFields(data) {
if (data.conditionsOp) {
await this.page

Some files were not shown because too many files have changed in this diff Show More