mirror of
https://github.com/we-promise/sure.git
synced 2026-04-20 12:34:12 +00:00
* Move accountable partials * Split accountables into separate view partials * Fix test * Add form to permitted partials * Fix failing system tests * Update new account modal views * New sync algorithm implementation * Update account system test assertions to match new behavior * Fix off by 1 date error * Revert new balance sync algorithm * Add missing account overviews
29 lines
1.3 KiB
Plaintext
29 lines
1.3 KiB
Plaintext
<%# locals: (account:, selected_tab:) %>
|
|
|
|
<% if account.entries.account_trades.any? || account.entries.account_transactions.any? %>
|
|
<div class="flex gap-2 text-sm text-gray-900 font-medium mb-4">
|
|
<%= render "accounts/accountables/tab", account: account, key: "holdings", is_selected: selected_tab.in?([nil, "holdings"]) %>
|
|
<%= render "accounts/accountables/tab", account: account, key: "cash", is_selected: selected_tab == "cash" %>
|
|
<%= render "accounts/accountables/tab", account: account, key: "transactions", is_selected: selected_tab == "transactions" %>
|
|
</div>
|
|
|
|
<div class="min-h-[800px]">
|
|
<% case selected_tab %>
|
|
<% when nil, "holdings" %>
|
|
<%= turbo_frame_tag dom_id(account, :holdings), src: account_holdings_path(account) do %>
|
|
<%= render "account/entries/loading" %>
|
|
<% end %>
|
|
<% when "cash" %>
|
|
<%= turbo_frame_tag dom_id(account, :cash), src: account_cashes_path(account) do %>
|
|
<%= render "account/entries/loading" %>
|
|
<% end %>
|
|
<% when "transactions" %>
|
|
<%= turbo_frame_tag dom_id(account, :trades), src: account_trades_path(account) do %>
|
|
<%= render "account/entries/loading" %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
<% else %>
|
|
<%= render "accounts/accountables/valuations", account: account %>
|
|
<% end %>
|