1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 15:49:39 +02:00
Commit graph

281 commits

Author SHA1 Message Date
Zach Gollwitzer
536c82f2aa
Feature: Add the ability to "revert" a CSV import (#1814)
Some checks failed
Publish Docker image / ci (push) Has been cancelled
Publish Docker image / Build docker image (push) Has been cancelled
* Allow reverting imports

* Fix tests

* Add currency column to all imports

* Don't auto-enrich demo account
2025-02-07 15:36:05 -05:00
Josh Pigford
60925bd16c Remove redundant amount validation from Account Holding model 2025-02-07 10:58:41 -06:00
Josh Pigford
cf23673003
Fix Account Holding validation and synchronization (#1818)
* Fix Account Holding validation and synchronization

Fixes #1781

- Add comprehensive validations for Account::Holding
- Implement validation to ensure amount matches qty * price
- Update Account::Syncer to include qty and price during synchronization
- Add database constraints for holding attributes and calculations

* Remove database check constraints for Account Holdings

Align with project convention of keeping complex validations in ActiveRecord
- Remove database-level check constraints for quantity, price, and amount
- Maintain database-level null and unique constraints
- Prepare for more flexible validation in the model layer
2025-02-07 10:42:01 -06:00
Zach Gollwitzer
5eb5ec7aef
fix: Plaid webhook verification (#1824)
* Fix Plaid webhook verification

* Fix client creation in webhook controller
2025-02-07 10:35:42 -05:00
Josh Pigford
21dc4b80f3 fix: Round average monthly budget to two decimal places 2025-02-06 14:35:42 -06:00
Josh Pigford
842e37658c
Multi-factor authentication (#1817)
* Initial pass

* Tests for MFA and locale cleanup

* Brakeman

* Update two-factor authentication status styling

* Update app/models/user.rb

Co-authored-by: Zach Gollwitzer <zach@maybe.co>
Signed-off-by: Josh Pigford <josh@joshpigford.com>

* Refactor MFA verification and session handling in tests

---------

Signed-off-by: Josh Pigford <josh@joshpigford.com>
Co-authored-by: Zach Gollwitzer <zach@maybe.co>
2025-02-06 14:16:53 -06:00
Josh Pigford
7ba9063e04
feat: Add institution details to Plaid items (#1816)
* feat: Add institution details to Plaid items

- Fetch and store institution URL, ID, and primary color for Plaid items
- Update PlaidItem model to retrieve and save institution metadata
- Add new method in Plaid provider to get institution details
- Update account logo view to use institution domain for logo generation

* Add institution domain method to Account model

- Extract institution domain logic from view to Account model
- Simplify logo view by using new institution_domain method
- Improve code reusability and separation of concerns
2025-02-06 08:57:24 -06:00
Marvin M
df5f4c83fe
fix: Save completely allocated budget (#1811)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
Signed-off-by: Marvin M <39344769+M123-dev@users.noreply.github.com>
2025-02-05 13:20:19 -05:00
Josh Pigford
e3ef1dd6b4 Increase profile image size limit 2025-02-05 12:04:24 -06:00
Josh Pigford
4aba9d1c0b
Add scope to filter transactions from active accounts (#1810)
* Add scope to filter transactions from active accounts

* Add test for transfer match candidates with active accounts

* Refactor active account filtering for transactions and entries
2025-02-05 11:52:44 -06:00
Josh Pigford
90f1ff8a0b Increase limit on ticker search 2025-02-05 11:02:12 -06:00
Josh Pigford
b84a33c09d
Refactor transaction enrichment to support batch processing (#1803)
* Refactor transaction enrichment to support batch processing

- Add method to enrich transactions in batches
- Implement job scheduling for unenriched transactions
- Improve logging and error handling for transaction enrichment

* Re-enable enrichment

* Fix transaction enrichment query to use correct table references

- Update queries to explicitly join and reference account_entries and account_transactions tables
- Remove unnecessary name presence check before enrichment
- Improve query precision for unenriched transaction selection

* Optimize transaction enrichment query joins

- Refactor database joins to use explicit table references
- Improve query performance for unenriched transaction selection
- Ensure correct table aliasing in enrichment methods

* Remove deprecated data enrichment job and method

- Delete EnrichDataJob as it's no longer used
- Remove `enrich_data_later` method from Account model
- Update Account::Syncer to directly call `enrich_data` instead of scheduling a job
2025-02-05 10:34:28 -06:00
Saleh Almatrafi
37aab45c19
Fix incorrect currency assignment for stock prices #1623 (#1798)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
2025-02-04 14:27:00 -05:00
Zach Gollwitzer
c9c5eb315a
Split family and Plaid item syncs into multiple jobs (#1799)
* Split family and Plaid item syncs into multiple jobs

* fix test expectations
2025-02-04 14:22:44 -05:00
Zach Gollwitzer
75c8627577 Temporarily disable data enrichment jobs until optimized 2025-02-04 13:54:14 -05:00
Josh Pigford
bdec61f312 Improve HoldingCalculator Security Preloading
- Include securities from both trades and current holdings
- Ensure unique securities are preloaded
- Enhance logging for preloaded securities
2025-02-04 11:02:50 -06:00
Josh Pigford
4c158934d0 Improve Security Price Loading with Robust Error Handling
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
- Add error handling for individual security price loading
- Log detailed error information for problematic securities
- Prevent single security errors from halting entire price loading process
- Enhance logging with more specific security identification details
2025-02-03 19:57:58 -06:00
Josh Pigford
50e5ffb257 Enhance HoldingCalculator with Logging and Error Handling 2025-02-03 19:54:32 -06:00
Zach Gollwitzer
89027f1fbf EU only allows transactions Plaid product 2025-02-03 20:39:08 -05:00
scodes73
f57fa526af
Fix: make date format year consistent overall #1712 (#1726)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
* Fix: make date format year consistent overall

* chore: Consolidating all date formatting options

* adding disabled condition back to mint import

* chore: Moving formats from helper to models/family.rd

* Adding date_format_label to the en translation for import/configurations

* nit: making changes to use individual translations
2025-02-03 11:19:56 -05:00
Jacco Broeren
b02380ac97
Fix: unable to add accounts without plain set up (#1769)
* Update family.rb

Fix for: https://github.com/maybe-finance/maybe/issues/1766

Signed-off-by: Jacco Broeren <jaccobroeren@freedom.nl>

* Update family.rb

Add commenting.

Signed-off-by: Jacco Broeren <jaccobroeren@freedom.nl>

---------

Signed-off-by: Jacco Broeren <jaccobroeren@freedom.nl>
2025-02-03 11:18:49 -05:00
Josh Pigford
a1065fde83 Updated "small" image variant for retina 2025-02-03 09:08:43 -06:00
Josh Pigford
1620d56e2d Allow connecting a few accounts before upgrade prompt 2025-02-03 09:04:39 -06:00
Zach Gollwitzer
2c2b600163
Improve speed of transactions page (#1752)
Some checks failed
Publish Docker image / ci (push) Has been cancelled
Publish Docker image / Build docker image (push) Has been cancelled
* Make demo data more realistic

* Fix N+1 transactions query

* Lint fixes

* Totals query

* Consolidate stats calcs

* Fix preload

* Fix filter clearing

* Fix N+1 queries for family sync detection

* Reduce queries for rendering transfers

* Fix tests

* Remove flaky test
2025-01-31 19:08:21 -05:00
Zach Gollwitzer
53f4b32c33
Fix EU plaid flow (#1761)
* Fix EU plaid flow

* Fix failing tests
2025-01-31 17:04:26 -05:00
Josh Pigford
4bf72506d5
Initial pass at Plaid EU (#1555)
* Initial pass at Plaid EU

* Add EU support to Plaid Items

* Lint

* Temp fix for rubocop isseus

* Merge cleanup

* Pass in region and get tests passing

* Use absolute path for translation

---------

Signed-off-by: Josh Pigford <josh@joshpigford.com>
2025-01-31 12:13:58 -06:00
Josh Pigford
41873de11d
Allow users to update their email address (#1745)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
* Change email address

* Email confirmation

* Email change test

* Lint

* Schema reset

* Set test email sender

* Select specific user fixture

* Refactor/cleanup

* Remove unused email_confirmation_token

* Current user would never be true

* Fix translation test failures
2025-01-31 11:29:49 -06:00
Julien Bertazzo Lambert
ad5b0b8b7d
Ensure Consistent Category Colors (#1722)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
* feat: add validation to require consistent category color

* feat: reflect color requirement in new category form

* refactor: move logic inline over shared component

* rubocop

* tests: fix breaking and add case for new validation

* feat: hide color selector when parent category selected

* feat: override color with parent color in model

* tests: remove case for unnecessary validation

---------

Signed-off-by: Julien Bertazzo Lambert <42924425+JLambertazzo@users.noreply.github.com>
2025-01-30 16:49:31 -05:00
Elvis Serrão
0b17976256
Don't allow a subcategory to be assigned to another subcategory to ensure 1 level of nesting max (#1730)
* Improve category level limit validation

* Set categories list only for non parents

* Disable select field

* Add info about the disabled select

* Don’t render a select input for parent categories

* Handle correctly turbo_stream request format

* Add turbo_stream format to requests on create and update action's tests

* Remove no_content status from update action

* Revert "Remove no_content status from update action"

This reverts commit 866140c196.

* Revert "Add turbo_stream format to requests on create and update action's tests"

This reverts commit c6bf21490f.

* Add correct redirect url for both html and turbo_stream formats

* Remove useless turbo_frame_tag
2025-01-30 12:35:30 -05:00
Zach Gollwitzer
de90b29201
Add RejectedTransfer model, simplify auto matching (#1690)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
* Allow transfers to match when inflow is after outflow

* Simplify transfer auto matching with RejectedTransfer model

* Validations

* Reset migrations
2025-01-27 16:56:46 -05:00
Eirik H
7265f58518
Add cabin / cottage as a property type (#1658)
* Add cabin / cottage as property type

Signed-off-by: Eirik H <post@eirikh.no>

* Update app/models/property.rb

Signed-off-by: Zach Gollwitzer <zach.gollwitzer@gmail.com>

---------

Signed-off-by: Eirik H <post@eirikh.no>
Signed-off-by: Zach Gollwitzer <zach.gollwitzer@gmail.com>
Co-authored-by: Zach Gollwitzer <zach.gollwitzer@gmail.com>
2025-01-27 13:04:36 -05:00
Nikhil Badyal
2a202576f8
Added more periods (#1714) 2025-01-27 13:03:15 -05:00
Georgi Tapalilov
d2a7aef6ef
fix n+1 for categories (#1693)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
2025-01-27 09:34:13 -05:00
Julien Bertazzo Lambert
8be5bb07c8
fix: reuse correct expense total calculation in budget.rb (#1699) 2025-01-27 09:29:50 -05:00
Zach Gollwitzer
e617d791d3 Show budget averages in family currency
Some checks failed
Publish Docker image / ci (push) Has been cancelled
Publish Docker image / Build docker image (push) Has been cancelled
Fixes #1689
2025-01-24 20:19:13 -05:00
Zach Gollwitzer
3140835f28
Adjust queues to prioritize account syncs (#1682) 2025-01-24 13:39:08 -05:00
Zach Gollwitzer
43dd16e3fb
Only update account balance if changed (#1676)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
* Only update balance if changed

* Update test assertions
2025-01-23 21:14:01 -05:00
Zach Gollwitzer
72fd177707
Do not raise on Plaid item not found exceptions for item deletions (#1646)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
2025-01-20 15:12:53 -05:00
Zach Gollwitzer
abccba3947
Fix account deletion cascade bug (#1644)
* Fix account deletion cascade bug

* Rubocop fixes
2025-01-20 11:37:01 -05:00
tlink
ae9287ec9b
FIX: correct display of percentages (#1622)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
* FIX: correct display of percentages

* FIX: correct display of percentages

* FIX: correct display of percentages
2025-01-17 11:21:00 -05:00
Jasper Delahaije
aac9e5eca2
Update family.rb (#1629)
Add where statement to account_transactions overview to only give transactions and not valuations

Signed-off-by: Jasper Delahaije <47220315+Repsay@users.noreply.github.com>
2025-01-17 09:48:16 -05:00
Zach Gollwitzer
ca8bdb6241
Fix budget money formatting (#1626)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
2025-01-16 19:05:34 -05:00
Zach Gollwitzer
1ae4b4d612
Fix transfer matching logic (#1625)
* Fix transfer matching logic

* Fix tests
2025-01-16 17:56:42 -05:00
Zach Gollwitzer
60f1a1e2d2 Fix budget edit button 2025-01-16 16:24:14 -05:00
Zach Gollwitzer
e1d3c7a4a1
Add CA country code to Plaid link
Signed-off-by: Zach Gollwitzer <zach@maybe.co>
2025-01-16 16:02:06 -05:00
Zach Gollwitzer
195ec85d96
Budgeting V1 (#1609)
* Budgeting V1

* Basic UI template

* Fully scaffolded budgeting v1

* Basic working budget

* Finalize donut chart for budgets

* Allow categorization of loan payments for budget

* Include loan payments in incomes_and_expenses scope

* Add budget allocations progress

* Empty states

* Clean up budget methods

* Category aggregation queries

* Handle overage scenarios in form

* Finalize budget donut chart controller

* Passing tests

* Fix allocation naming

* Add income category migration

* Native support for uncategorized budget category

* Formatting

* Fix subcategory sort order, padding

* Fix calculation for category rollups in budget
2025-01-16 14:36:37 -05:00
Zach Gollwitzer
2c30e18c9b Fix enrichment setting 2025-01-07 11:31:44 -05:00
Zach Gollwitzer
307a3687e8
Transfer and Payment auto-matching, model and UI improvements (#1585)
* Transfer data model migration

* Transfers and payment modeling and UI improvements

* Fix CI

* Transfer matching flow

* Better UI for transfers

* Auto transfer matching, approve, reject flow

* Mark transfers created from form as confirmed

* Account filtering

* Excluded rejected transfers from calculations

* Calculation tweaks with transfer exclusions

* Clean up migration
2025-01-07 09:41:24 -05:00
Kabiru Mwenja
dba10c2bc8
Fix unknown attribute 'parent_category' for Category in demo generator (#1575)
```ruby
❯ bin/rails demo_data:reset
user reset
bin/rails aborted!
ActiveModel::UnknownAttributeError: unknown attribute 'parent_category' for Category. (ActiveModel::UnknownAttributeError)

          raise UnknownAttributeError.new(self, k.to_s)
```

Follows: https://github.com/maybe-finance/maybe/pull/1561
2024-12-30 10:04:58 -05:00
Tony Vincent
9d217afb9f
feat: Save error backtrace for sync errors for better debugging (#1578)
Co-authored-by: Tony Vincent Yesudas <tony.yesudas@raisenow.com>
2024-12-30 10:04:05 -05:00