Commit Graph

711 Commits

Author SHA1 Message Date
Shazib Hussain
287fb9b9d6 Tidy up exports in loot-core (#1147)
Following on from #1146 this PR removes all unused exports from
`loot-core/`
2023-06-20 20:57:19 +01:00
Matiss Janis Aboltins
c286f1c5f3 🐛 remove 'we have been notified' copy (#1155)
Closes #1069

I've not actually tested this change. Which is why I'm not changing it
to direct links (as they might not work).

Instead I'm just applying a very quick patch so the message would not be
misleading anymore.
2023-06-20 20:56:23 +01:00
Jed Fox
977e0c9008 Updates to the server button at the top right (#1141)
It now always shows a menu, so the user doesn’t unexpectedly perform an
action.
2023-06-20 14:57:23 -04:00
Joel Jeremy Marquez
497a3104f0 Expand / collapse all categories (#1143)
This PR is for the first item listed in #559: `Expand All / Collapse All
Categories`

For the expand / collapse all categories functionality, I was choosing
between having a single `Expand / collapse all categories` button or one
for each: `Expand all categories` and `Collapse all categories` buttons.

For the initial implementation, I have opted with the latter. Please let
me know which one is the right way to go or if there are other
suggestions and I'll just accordingly.


![image](https://github.com/actualbudget/actual/assets/20313680/64d0e498-1139-4dd0-9b7f-4d478ab947aa)
2023-06-20 14:35:01 -04:00
Matiss Janis Aboltins
adc5e324a7 (nordigen) release the feature (#1135) 2023-06-20 19:21:30 +01:00
Jed Fox
2c6cca6bf6 Improve error logging in the API (#1121) 2023-06-19 06:41:49 -04:00
Matiss Janis Aboltins
610c42a1ae ♻️ (crdt) moved re-used utils in actual-server to separate package (#1150)
actual-server does not need to import the full actual-app/api package.
It can import only the CRDT stuff.. so I'm extracting it into a new
package to reduce the size of actual-server and make the link between
things more transparent.
2023-06-18 20:16:50 +01:00
Shazib Hussain
fcb1bba7fa Removing Tutorial code (#1146) 2023-06-17 19:49:48 -04:00
Shazib Hussain
764a20a36b Removing unused functions (#1145)
Continuing on from #1139 this PR deletes all function that are not used
anywhere.

The next PR will include all the entire files that are unused & deleted.
2023-06-16 21:37:30 -04:00
Jed Fox
b8dbec46bb Revert “Make number parsing agnostic to decimal and thousands separators” (#1144)
This reverts #1029. As raised in #1097, the formatting chosen doesn’t
work well when doing math. There may be a way to balance compatibility
with multiple format styles with handling non-currency amounts
correctly, but it will require some more careful consideration. Re-opens
#894.
2023-06-16 15:30:27 -04:00
Jed Fox
a86fd9cf06 Strip a trailing slash off of server URLs (#1140)
URLs with the trailing slash don’t work well — requests end up being
made to `https://example.com//sync/sync` and such which can 404

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2023-06-16 13:54:13 -04:00
Jed Fox
8f16e0167c Update CONTRIBUTING.md to point to the website (#1138) 2023-06-16 13:38:28 -04:00
Jed Fox
60a8f72be8 Updates to the account creation/linking flow (#1137) 2023-06-16 13:38:16 -04:00
Shazib Hussain
61a5b1a337 Remove 'export' keyword where not needed. (#1139)
As discussed in #1126 creating separate PRs.

The linter rule isn't actually part of this first PR and will likely be
in the final PR as otherwise it will just fail because all the issues
aren't resolved.

The code is 'ready' though so as soon as this is merged I will open next
one(s)
2023-06-15 18:11:45 -04:00
Matiss Janis Aboltins
f8dfa5a6e0 🐛 disable 'all payees' checkbox while schedules are loading (#1136)
Closes #1125

Disables (hides) the "all payees" checkbox when schedules are loading.

Reproduction:
1. open `/schedule/discover`
2. while the data is still loading - click on the checkbox in the table
header
3. after loading finishes - the page crashes with an error
2023-06-15 20:45:04 +01:00
Jed Fox
9aea091f53 Update links to point to new domain (#1129)
Depends on https://github.com/actualbudget/docs/pull/202.
2023-06-15 06:46:04 +01:00
Rich Howell
4bee4584dc Contributing link update (#1134)
Replaced contributing link

<!-- Thank you for submitting a pull request! Make sure to follow the
instructions to write release notes for your PR — it should only take a
minute or two:
https://github.com/actualbudget/docs#writing-good-release-notes -->
2023-06-14 20:08:25 +01:00
Matiss Janis Aboltins
05754d3e42 🐛 (nordigen) expired bank-links (#1133)
Further Nordigen fixes for expired bank-links. With the recent changes
to the router, we had broken this functionality.

<img width="488" alt="Screenshot 2023-06-14 at 09 00 21"
src="https://github.com/actualbudget/actual/assets/886567/8e7516e0-121a-46e0-9e52-24748b161173">
<img width="437" alt="Screenshot 2023-06-14 at 09 00 30"
src="https://github.com/actualbudget/actual/assets/886567/88b36549-1073-4269-b42f-1553c164316f">
2023-06-14 18:13:57 +01:00
Matiss Janis Aboltins
4f5fd6c463 🐛 (nordigen) linking an account via account page (#1128)
Fix linking via the account page. Previously it was not fully working if
the user had not set up the credentials before.



https://github.com/actualbudget/actual/assets/886567/588dc437-b53d-4616-8612-a2ef07445dc8

---------

Co-authored-by: Jed Fox <git@jedfox.com>
2023-06-14 07:38:46 +01:00
Matiss Janis Aboltins
06b2a8757e 🐛 (nordigen) perform status check only if server is online (#1127)
Small bugfix for nordigen.

Do not perform the server status check if the user is actually offline.
2023-06-13 20:47:59 +01:00
Jed Fox
0e2b317eb8 Fix sync-related errors that show up in the console when not using a server (#984)
Previously, the frontend would attempt to make real requests to
`https://not-configured/`, which of course failed. I’ve changed the
internal structure to have the lack of a server expressed as a `null`
server. A new `did-bootstrap` browser-level setting has been added to
track if the user clicked “Don’t use a server.”

Finally, I updated the auth logic for methods that call out to the
server to make them consistent and use the early return style which
reduces indentation.
2023-06-11 13:57:32 -04:00
Jed Fox
15bc3c45a0 Partition GitHub Actions cache based on Node version (#1118)
This should fix the test failures on `master` — currently tests are
failing because the cache was created with an old version of Node.
2023-06-11 13:37:20 -04:00
youngcw
ded6ee8a65 Goals: Check template action (#1108)
This adds an option to the month drop down to check all the template
lines. If there are errors the offending line is shown with its
category.

I also modified the wording on the regular template return to be more
accurate. Fixes #1100
2023-06-11 10:14:46 -04:00
Jed Fox
c1af40ff5c Update recommended version to Node.js 18 (#1117)
After #1115, new Node.js versions will be able to be used for
development of the frontend. This PR changes the recommended Node.js
version to 18 (the current LTS version). I have also tested with 16 and
20 and it works.

I also took the opportunity to:

- move the build script that was at the project root to the `bin/`
folder
- update the `browserslist` to target Electron 24 (which is the version
we currently build against). This results in a slightly smaller bundle
due to no longer having to transpile optional chaining.
2023-06-10 13:12:42 -04:00
Jed Fox
f06edd723d Update loot-core to webpack 5 (#1115)
~based on #1114~

This brings its build process up to date with the rest of the project.
We can now use Node 20 to build successfully.

Closes #918
2023-06-10 12:59:51 -04:00
Jed Fox
02f1fe48c6 Stop mixing platform-specific code (#1114)
Bundle sizes are unchanged but now we no longer pull in the
Electron-specific FS code on the web version
2023-06-09 16:06:18 -04:00
Davis Silverman
87d269ba5c Remove 'new' OFX parser as it is too buggy (#1111)
Draft because it is untested, maybe tonight I will test it! Just wanted
to get some code out cause i had a spare 5 minutes.

The new parser isn't immediately good enough to replace the old parser,
and I sadly lost the time to contribute more! Sorry! If someone else
wants to take maintenance burden of this code, we can not merge this.
Otherwise, it should go the way of the Dodo it seems.

Thanks!

Closes #1044
2023-06-08 14:52:34 -04:00
Jed Fox
6e6d765699 Fix migration ID for “remove account type” migration (#1109)
Good catch @Jackenmen in
https://github.com/actualbudget/actual/pull/948#issuecomment-1580501909
— I’ve also added a CI check to ensure bad migrations aren’t introduced
in the future.

I think if you have a budget that has managed to have this migration
applied successfully, you’ll need to manually patch
`getAppliedMigrations` in
`packages/loot-core/src/server/migrate/migrations.ts` and inject a query
to remove the old migration ID and insert the new one.
2023-06-08 14:52:13 -04:00
Jed Fox
a25327d370 Remove account types (#948)
Closes #944, closes #532. ~WIP because something is causing the test
budget to fail to create because it’s using INSERT instead of UPDATE sql
queries. (Or not? I have no idea)~
2023-06-06 16:41:46 -04:00
youngcw
ed285e9ac5 Goals: Remainder option (#1101)
Added the option to add a remainder goal template. This will use the
remaining available funds and dump them into the respective category.
There is optional weighting. The remainder templates will be forced to
the lowest priority as to run after all other templates.

Usage: `#template remainder <weight>` Add the template line to any
categories you want to catch any remaining funds such as savings. The
amount added to the category will equal
`remaining_budget/total_of_weights*weight`. The default weight is 1.
2023-06-06 16:41:09 -04:00
SudoCerb
c42d17897c BUGFIX Unused Payees: Corrected an issue where the filter control was not being referenced (#1107) 2023-06-05 08:34:48 +01:00
Shazib Hussain
be81091698 More Electron fixes (#1099)
- Fix socket connection issues when reloading
- Fix external url clicking & middle clicking internal links
- Remove broken menu option. Easier for now than refactoring the
settings panel it now lives in. We can add it back later if needed?
2023-06-04 21:21:15 +01:00
Matiss Janis Aboltins
3cba838412 🔧 (cross-env) add missing dep and upgrade all to same version (#1106)
1. Upgrade all `cross-env` versions to be the same
2. Added `cross-env` to `desktop-electron` - it was used there, but was
missing as a dep
2023-06-04 21:11:09 +01:00
Jed Fox
38357f7efa Fix error in console when hideFraction pref is missing (#1105) 2023-06-04 14:35:08 -04:00
Jed Fox
2c7b814d37 Disable “Reset sync” button when sync is disabled (#1104)
Extracted from #984
2023-06-04 14:22:32 -04:00
Jed Fox
e1f7262f2a Add clear error to API when no budget is open (#1073)
Previously, this would fail with a confusing “cannot read property of
`undefined`” error.
2023-06-04 13:57:29 -04:00
shall0pass
400078dce5 Goals: Cleanup script error (#1095)
There was one more location where the cleanup script could generate an
error. This should fully resolve the error, along with
https://github.com/actualbudget/actual/pull/1084.
2023-06-03 12:02:39 -04:00
Jed Fox
6de6ad661d Sync more often when using the API (#1075) 2023-06-02 15:34:42 -04:00
Matiss Janis Aboltins
a0dfb8afbd 🔖 (23.6.0) category hiding and filters for reports (#1087)
Web: https://github.com/actualbudget/actual/pull/1087
Server: https://github.com/actualbudget/actual-server/pull/207
Docs: https://github.com/actualbudget/docs/pull/179

---------

Co-authored-by: Jed Fox <git@jedfox.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v23.6.0
2023-06-01 20:58:42 +01:00
shall0pass
1d301ac78d Bug: Cleanup script (#1084) 2023-06-01 10:25:00 -04:00
youngcw
8875f6d487 fix parser bug where by goals couldn't repeat on months/years >9 (#1083) 2023-06-01 08:26:28 -04:00
Tom French
66bfef28c0 chore: migrate some JS to TS (#1078) 2023-06-01 08:25:19 -04:00
Tom French
f03b8a3a14 chore: remove loot-design reference from readme.md (#1079) 2023-06-01 08:24:26 -04:00
Matiss Janis Aboltins
62ebd0627d 🐛 (budget) link from budget to transactions not working (#1067) 2023-06-01 07:11:28 +01:00
shall0pass
bb1a4747f5 Goals: Schedule include spent value in calculation (#1049)
This adds back the functionality, which was inadvertantly removed, that
includes the already spent column in the calculation when the template
is run.

Some transactions may be posted to the account prior to running the
templates and would result incorrect budgeted amounts.

---------

Co-authored-by: Jed Fox <git@jedfox.com>
2023-05-30 15:24:21 -04:00
shall0pass
d640859940 End of month cleanup script (#1016)
~This is really just a proof of concept. I have no delusions that this
might get included. I'm sure others might have a much cleaner
implementation.~
I'm now delusional.

Resolves https://github.com/actualbudget/actual/issues/508

Taking @youngcw 's advice, I changed the keyword to #cleanup for the end
of month script to keep it separated.

This screen video shows two categories that are sources of funds. At the
end of the month, any excess in these funds can be redistributed to your
highest priorities. Three categories are set as sinks, or recipients, of
excess funds.

#cleanup source   -> Move 'extra' funds to To Budget
#cleanup sink -> Fund category with To Budget funds, default weight = 1
#cleanup sink 2       -> Fund category with To Budget funds, weight = 2

Steps of the script:
1. Return funds from any category marked 'source'
2. Fund overspent categories fully if negative carryover is not allowed.
3. Fund each 'sink' category by the desired weight.

I run through the script twice. Once to show that if there is a debt
category that has a rolling negative balance, it will skip funding that
category first and once to show how if a rolling negative balance isn't
allowed, it will fund it before applying the weighted remainder. The
example shown uses weights of 60, 20, and 20; therefore, the Debt
category will receive 60% of the To Budget funds while General and Bills
receive 20% each. The weights could have been changed to 6, 2, and 2 or
3 for the Debt category with no additional value for General and Bills
to achieve the same result.


![cleanup_button](https://github.com/actualbudget/actual/assets/20625555/56ae2b29-9be6-4e85-b532-1b05cff7c4c7)
2023-05-30 15:24:03 -04:00
Jed Fox
e660e1e727 More import-related ESLint rules (#1070)
- Enforce that imports from the same package are merged into a single
import
- In `loot-core`, require that imports of other `loot-core` files use a
relative import (like the vast majority of such imports) rather than
specifiers starting with `loot-core/` (probably a result of moving files
out of other packages into `loot-core`)
2023-05-29 13:31:01 -04:00
Jed Fox
ad89aea45c Integrate useMemo into useLiveQuery (#1064) 2023-05-28 07:38:37 -04:00
Jack
c73416bdb8 [Feature] Hide category (#1060) 2023-05-27 15:15:09 +01:00
Jed Fox
6253aaa015 Use the useLiveQuery hook in a couple more places (#1061) 2023-05-25 16:50:55 -04:00