mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 15:49:39 +02:00
perf(transactions): add kind
to Transaction
model and remove expensive Transfer joins in aggregations (#2388)
* add kind to transaction model * Basic transfer creator * Fix method naming conflict * Creator form pattern * Remove stale methods * Tweak migration * Remove BaseQuery, write entire query in each class for clarity * Query optimizations * Remove unused exchange rate query lines * Remove temporary cache-warming strategy * Fix test * Update transaction search * Decouple transactions endpoint from IncomeStatement * Clean up transactions controller * Update cursor rules * Cleanup comments, logic in search * Fix totals logic on transactions view * Fix pagination * Optimize search totals query * Default to last 30 days on transactions page if no filters * Decouple transactions list from transfer details * Revert transfer route * Migration reset * Bundle update * Fix matching logic, tests * Remove unused code
This commit is contained in:
parent
7aca5a2277
commit
1aae00f586
49 changed files with 1749 additions and 705 deletions
|
@ -189,7 +189,7 @@ class TransactionsTest < ApplicationSystemTestCase
|
|||
end
|
||||
select "Deposit", from: "Type"
|
||||
fill_in "Date", with: transfer_date
|
||||
fill_in "entry[amount]", with: 175.25
|
||||
fill_in "model[amount]", with: 175.25
|
||||
click_button "Add transaction"
|
||||
within "#entry-group-" + transfer_date.to_s do
|
||||
assert_text "175.25"
|
||||
|
@ -203,6 +203,7 @@ class TransactionsTest < ApplicationSystemTestCase
|
|||
inflow_entry = create_transaction("inflow", 1.day.ago.to_date, -500, account: investment_account)
|
||||
@user.family.auto_match_transfers!
|
||||
visit transactions_url
|
||||
|
||||
within "#entry-group-" + Date.current.to_s + "-totals" do
|
||||
assert_text "-$100.00" # transaction eleven from setup
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue