Dashboard

<%= t('.greeting', name: Current.user.first_name )%>

<%= Date.current.strftime('%A, %b %d') %>

<%= render partial: "shared/balance_heading", locals: { label: "Net Worth", period: @period, balance: Current.family.net_worth, trend: @net_worth_series.trend } %>
<%= form_with url: root_path, method: :get, class: "flex items-center gap-4", data: { controller: "auto-submit-form" } do %> <%= render partial: "shared/period_select", locals: { value: @period.name } %> <% end %>
<%= render partial: "shared/line_chart", locals: { series: @net_worth_series } %>
<%= render partial: "shared/balance_heading", locals: { label: "Assets", period: @period, balance: Current.family.assets, trend: @asset_series.trend } %>
<%= render partial: "shared/balance_heading", locals: { label: "Liabilities", period: @period, size: "md", balance: Current.family.liabilities, trend: @liability_series.trend } %>
<%= link_to new_account_path, class: "flex items-center gap-1 p-2 text-gray-900 text-sm font-medium bg-gray-50 rounded-lg hover:bg-gray-100", data: { turbo_frame: "modal" } do %> <%= lucide_icon("plus", class: "w-5 h-5 text-gray-500") %>

<%= t('.new') %>

<% end %> <%= form_with url: root_path, method: :get, class: "flex items-center gap-4", data: { controller: "auto-submit-form" } do %> <%= render partial: "shared/period_select", locals: { value: @period.name } %> <% end %>
<%= render partial: "account_percentages_bar", locals: { account_groups: @account_groups[:assets].children } %> <%= render partial: "account_percentages_table", locals: { account_groups: @account_groups[:assets].children } %>