The personal finance app for everyone (by everyone)
Ruby
fix(ui): keep the account chart view selector in sync on reload (#3121)
Victor Dusartca876fa02ab7
diff --git a/app/components/UI/account/chart.html.erb b/app/components/UI/account/chart.html.erbindex aedc04abf1..b96d3b9267 100644--- a/app/components/UI/account/chart.html.erb+++ b/app/components/UI/account/chart.html.erb@@ -21,9 +21,10 @@<% if account.supports_trades? %><%= form_with url: account_path(account), method: :get, data: { controller: "auto-submit-form" } do |form| %><%= form.select :chart_view,- [[t(".views.total_value"), "balance"], [t(".views.holdings"), "holdings_balance"], [t(".views.cash"), "cash_balance"], [t(".views.gains"), "gains"]],+ [[t("UI.account.chart.views.total_value"), "balance"], [t("UI.account.chart.views.holdings"), "holdings_balance"], [t("UI.account.chart.views.cash"), "cash_balance"], [t("UI.account.chart.views.gains"), "gains"]],{ selected: view },class: "bg-container border border-secondary rounded-lg text-sm pr-7 cursor-pointer text-primary focus:outline-hidden focus:ring-0",+ autocomplete: "off",data: { "auto-submit-form-target": "auto" } %><% end %><% end %>@@ -50,7 +51,7 @@data-time-series-chart-data-value="<%= series.to_json %>"></div><% else %><div class="w-full h-full flex items-center justify-center">- <p class="text-secondary text-sm"><%= t(".no_data_available") %></p>+ <p class="text-secondary text-sm"><%= t("UI.account.chart.no_data_available") %></p></div><% end %></div>