1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-05 13:35:21 +02:00

Add empty states to account summary page (#1265)

* Add empty states to account summary page

* Liability icon fix

* Normalize translations

* Clean up modal styles

* Account color updates

* Lint fixes

* Test fix
This commit is contained in:
Zach Gollwitzer 2024-10-08 13:00:35 -04:00 committed by GitHub
parent ffd54e4065
commit 2f6479f058
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 93 additions and 69 deletions

View file

@ -1,12 +1,12 @@
<%# locals: (account_groups:) %>
<div class="space-y-4">
<div class="flex gap-1">
<% account_groups.each do |group| %>
<% account_groups.sort_by(&:percent_of_total).reverse.each do |group| %>
<div class="h-1.5 rounded-sm w-12 <%= accountable_bg_class(group.name) %>" style="width: <%= group.percent_of_total %>%;"></div>
<% end %>
</div>
<div class="flex gap-4">
<% account_groups.each do |group| %>
<% account_groups.sort_by(&:percent_of_total).reverse.each do |group| %>
<div class="flex items-center gap-2 text-sm">
<div class="h-2.5 w-2.5 rounded-full <%= accountable_bg_class(group.name) %>"></div>
<p class="text-gray-500"><%= to_accountable_title(Accountable.from_type(group.name)) %></p>

View file

@ -15,6 +15,6 @@
</div>
</div>
<div class="bg-white border border-alpha-black-25 shadow-xs rounded-lg divide-y divide-alpha-black-50">
<%= render partial: "pages/account_group_disclosure", collection: account_groups, as: :accountable_group %>
<%= render partial: "pages/account_group_disclosure", collection: account_groups.sort_by(&:percent_of_total).reverse, as: :accountable_group %>
</div>
</div>