mirror of
https://github.com/we-promise/sure.git
synced 2026-05-29 23:39:03 +00:00
fix(accounts): show activity label instead of category for accounts supporting trades (#1993)
This commit is contained in:
committed by
Juan José Mata
parent
33cc3508b8
commit
1ee49cbca4
@@ -4,7 +4,7 @@
|
||||
<div class="flex items-center gap-1">
|
||||
<%= tag.p title, class: "text-sm font-medium text-secondary" %>
|
||||
|
||||
<% if account.investment? %>
|
||||
<% if account.supports_trades? %>
|
||||
<%= render "investments/value_tooltip", balance: account.balance_money, holdings: holdings_value_money, cash: account.cash_balance_money %>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<%= form_with url: account_path(account), method: :get, data: { controller: "auto-submit-form" } do |form| %>
|
||||
<div class="flex items-center gap-2">
|
||||
<% if account.investment? %>
|
||||
<% if account.supports_trades? %>
|
||||
<%= form.select :chart_view,
|
||||
[[t(".views.total_value"), "balance"], [t(".views.holdings"), "holdings_balance"], [t(".views.cash"), "cash_balance"]],
|
||||
{ selected: view },
|
||||
|
||||
@@ -180,8 +180,8 @@
|
||||
</div>
|
||||
|
||||
<div class="hidden md:flex min-w-0 items-center gap-1 col-span-2">
|
||||
<% if entry.account.investment? && !transaction.transfer? %>
|
||||
<%# For investment accounts, show activity label instead of category %>
|
||||
<% if entry.account.supports_trades? && !transaction.transfer? %>
|
||||
<%# For investment/crypto accounts, show activity label instead of category %>
|
||||
<%= render "investment_activity/quick_edit_badge", entry: entry, entryable: transaction %>
|
||||
<% else %>
|
||||
<%= render "transactions/transaction_category", transaction: transaction, variant: "desktop", in_split_group: in_split_group %>
|
||||
|
||||
Reference in New Issue
Block a user