From 1ee49cbca4bac180fc11a12152be82bde00b20f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bla=C5=BE=20Dular?=
<22869613+xBlaz3kx@users.noreply.github.com>
Date: Wed, 27 May 2026 23:04:42 +0200
Subject: [PATCH] fix(accounts): show activity label instead of category for
accounts supporting trades (#1993)
---
app/components/UI/account/chart.html.erb | 4 ++--
app/views/transactions/_transaction.html.erb | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/components/UI/account/chart.html.erb b/app/components/UI/account/chart.html.erb
index 91fb0b69c..c14627575 100644
--- a/app/components/UI/account/chart.html.erb
+++ b/app/components/UI/account/chart.html.erb
@@ -4,7 +4,7 @@
<%= 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 %>
@@ -19,7 +19,7 @@
<%= form_with url: account_path(account), method: :get, data: { controller: "auto-submit-form" } do |form| %>
- <% 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 },
diff --git a/app/views/transactions/_transaction.html.erb b/app/views/transactions/_transaction.html.erb
index 8bccd8b4e..9aff39d03 100644
--- a/app/views/transactions/_transaction.html.erb
+++ b/app/views/transactions/_transaction.html.erb
@@ -180,8 +180,8 @@
- <% 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 %>