1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-03 04:25:21 +02:00

Update empty account states on dashboard (#1166)

* Update empty account states on dashboard

* Translations
This commit is contained in:
Zach Gollwitzer 2024-09-10 17:17:10 -04:00 committed by GitHub
parent 04037b8943
commit ac0ff35360
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 134 additions and 134 deletions

View file

@ -1,6 +1,6 @@
<%# locals: (group:) -%>
<% type = Accountable.from_type(group.name) %>
<% if group %>
<% if group && group.children.any? %>
<details class="mb-1 text-sm group" data-controller="account-collapse" data-account-collapse-type-value="<%= type %>">
<summary class="flex gap-4 px-3 py-2 items-center w-full rounded-[10px] font-medium hover:bg-gray-100 cursor-pointer">
<%= lucide_icon("chevron-down", class: "hidden group-open:block text-gray-500 w-5 h-5") %>
@ -8,8 +8,8 @@
<div class="text-left"><%= type.model_name.human %></div>
<div class="ml-auto flex flex-col items-end">
<p class="text-right"><%= format_money group.sum %></p>
<div class="flex items-center gap-1">
<%=
<div class="flex items-center gap-1">
<%=
tag.div(
id: "#{group.name}_sparkline",
class: "h-3 w-8 ml-auto",
@ -21,10 +21,10 @@
"time-series-chart-use-tooltip-value": false
}
)
%>
<% styles = trend_styles(group.series.trend) %>
<span class="text-xs <%= styles[:text_class] %>"><%= sprintf("%+.2f", group.series.trend.percent) %>%</span>
</div>
%>
<% styles = trend_styles(group.series.trend) %>
<span class="text-xs <%= styles[:text_class] %>"><%= sprintf("%+.2f", group.series.trend.percent) %>%</span>
</div>
</div>
</summary>
<% group.children.sort_by(&:name).each do |account_value_node| %>