mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-25 16:19:40 +02:00
Omit trend if zero in sidebar (#1173)
* Omit trend if zero in sidebar * Lint fix
This commit is contained in:
parent
277e4476d9
commit
c28dd8f940
1 changed files with 8 additions and 6 deletions
|
@ -39,8 +39,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col ml-auto font-medium text-right">
|
<div class="flex flex-col ml-auto font-medium text-right">
|
||||||
<p><%= format_money account.balance_money %></p>
|
<p><%= format_money account.balance_money %></p>
|
||||||
<div class="flex items-center gap-1">
|
<% unless account_value_node.series.trend.direction.flat? %>
|
||||||
<%=
|
<div class="flex items-center gap-1">
|
||||||
|
<%=
|
||||||
tag.div(
|
tag.div(
|
||||||
id: dom_id(account, :list_sparkline),
|
id: dom_id(account, :list_sparkline),
|
||||||
class: "h-3 w-8 ml-auto",
|
class: "h-3 w-8 ml-auto",
|
||||||
|
@ -52,10 +53,11 @@
|
||||||
"time-series-chart-use-tooltip-value": false
|
"time-series-chart-use-tooltip-value": false
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
%>
|
%>
|
||||||
<% styles = trend_styles(account_value_node.series.trend) %>
|
<% styles = trend_styles(account_value_node.series.trend) %>
|
||||||
<span class="text-xs <%= styles[:text_class] %>"><%= sprintf("%+.2f", account_value_node.series.trend.percent) %>%</span>
|
<span class="text-xs <%= styles[:text_class] %>"><%= sprintf("%+.2f", account_value_node.series.trend.percent) %>%</span>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue