Account:: namespace simplifications and cleanup (#2110)

* Flatten Holding model

* Flatten balance model

* Entries domain renames

* Fix valuations reference

* Fix trades stream

* Fix brakeman warnings

* Fix tests

* Replace existing entryable type references in DB
This commit is contained in:
Zach Gollwitzer
2025-04-14 11:40:34 -04:00
committed by GitHub
parent f181ba941f
commit e657c40d19
172 changed files with 1297 additions and 1258 deletions

View File

@@ -8,12 +8,12 @@
<section>
<fieldset class="bg-gray-50 rounded-lg p-1 grid grid-flow-col justify-stretch gap-x-2">
<%= link_to new_account_transaction_path(nature: "expense"), data: { turbo_frame: :modal }, class: "flex px-4 py-1 rounded-lg items-center space-x-2 justify-center text-subdued" do %>
<%= link_to new_transaction_path(nature: "expense"), data: { turbo_frame: :modal }, class: "flex px-4 py-1 rounded-lg items-center space-x-2 justify-center text-subdued" do %>
<%= lucide_icon "minus-circle", class: "w-5 h-5" %>
<%= tag.span t(".expense") %>
<% end %>
<%= link_to new_account_transaction_path(nature: "income"), data: { turbo_frame: :modal }, class: "flex px-4 py-1 rounded-lg items-center space-x-2 justify-center text-subdued" do %>
<%= link_to new_transaction_path(nature: "income"), data: { turbo_frame: :modal }, class: "flex px-4 py-1 rounded-lg items-center space-x-2 justify-center text-subdued" do %>
<%= lucide_icon "plus-circle", class: "w-5 h-5" %>
<%= tag.span t(".income") %>
<% end %>

View File

@@ -3,18 +3,18 @@
<%= turbo_stream.replace @transfer.outflow_transaction.entry %>
<%= turbo_stream.replace dom_id(@transfer.inflow_transaction, "category_menu"),
partial: "account/transactions/transaction_category",
partial: "transactions/transaction_category",
locals: { transaction: @transfer.inflow_transaction } %>
<%= turbo_stream.replace dom_id(@transfer.outflow_transaction, "category_menu"),
partial: "account/transactions/transaction_category",
partial: "transactions/transaction_category",
locals: { transaction: @transfer.outflow_transaction } %>
<%= turbo_stream.replace dom_id(@transfer.inflow_transaction, "transfer_match"),
partial: "account/transactions/transfer_match",
partial: "transactions/transfer_match",
locals: { transaction: @transfer.inflow_transaction } %>
<%= turbo_stream.replace dom_id(@transfer.outflow_transaction, "transfer_match"),
partial: "account/transactions/transfer_match",
partial: "transactions/transfer_match",
locals: { transaction: @transfer.outflow_transaction } %>
<% end %>