+
+
+ <%= render partial: "shared/value_heading", locals: {
+ label: t(".net_worth"),
period: @period,
- balance: Current.family.net_worth,
+ value: 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 %>
- <%= 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: "pages/dashboard/net_worth_chart", locals: { series: @net_worth_series } %>
-
- <%= render partial: "shared/line_chart", locals: { series: @net_worth_series } %>
+
+ <%= render partial: "pages/dashboard/allocation_chart" %>
-
-
-
- <%= render partial: "shared/balance_heading", locals: {
- label: "Assets",
- period: @period,
- balance: Current.family.assets,
- trend: @asset_series.trend
- } %>
+
+
+
+
+
+ <%= render partial: "shared/value_heading", locals: {
+ label: t(".income"),
+ period: @period,
+ value: @income_series.last.value,
+ trend: @income_series.trend
+ } %>
+ data-controller="trendline"
+ class="h-full w-2/5"
+ data-trendline-series-value="<%= @income_series.to_json %>"
+ data-trendline-classification-value="asset">
-
-
- <%= render partial: "shared/balance_heading", locals: {
- label: "Liabilities",
- period: @period,
- size: "md",
- balance: Current.family.liabilities,
- trend: @liability_series.trend
- } %>
+
+
+
+
+ <%= render partial: "shared/value_heading", locals: {
+ label: t(".spending"),
+ period: @period,
+ value: @spending_series.last.value,
+ trend: @spending_series.trend
+ } %>
+ data-controller="trendline"
+ class="h-full w-2/5"
+ data-trendline-series-value="<%= @spending_series.to_json %>"
+ data-trendline-classification-value="asset">
+
+
+
+
+
+ <%= render partial: "shared/value_heading", locals: {
+ label: t(".savings_rate"),
+ period: @period,
+ value: @savings_rate_series.last.value,
+ trend: @savings_rate_series.trend,
+ is_percentage: true
+ } %>
+
+
+
+
+
+
+
+ <%= render partial: "shared/value_heading", locals: {
+ label: t(".investing"),
+ period: @period,
+ value: @investing_series.last.value,
+ trend: @investing_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 } %>
-
-
- <%= render partial: "account_percentages_bar", locals: { account_groups: @account_groups[:liabilities].children } %>
- <%= render partial: "account_percentages_table", locals: { account_groups: @account_groups[:liabilities].children } %>
-
+
+
+
<%= t(".transactions") %>
+
-
+
+
+
<%= t(".recurring") %>
+
+
+
+
<%= t(".categories") %>
+
+
diff --git a/app/views/pages/dashboard/_allocation_chart.html.erb b/app/views/pages/dashboard/_allocation_chart.html.erb
new file mode 100644
index 00000000..50797a28
--- /dev/null
+++ b/app/views/pages/dashboard/_allocation_chart.html.erb
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/app/views/pages/dashboard/_net_worth_chart.html.erb b/app/views/pages/dashboard/_net_worth_chart.html.erb
new file mode 100644
index 00000000..72c43d61
--- /dev/null
+++ b/app/views/pages/dashboard/_net_worth_chart.html.erb
@@ -0,0 +1,8 @@
+<%# locals: (series:) %>
+<% if series %>
+
+<% else %>
+
+
No data available for the selected period.
+
+<% end %>
diff --git a/app/views/shared/_balance_heading.html.erb b/app/views/shared/_balance_heading.html.erb
deleted file mode 100644
index b0caaa99..00000000
--- a/app/views/shared/_balance_heading.html.erb
+++ /dev/null
@@ -1,23 +0,0 @@
-<%# locals: (label:, period:, balance:, trend:, size: "lg")%>
-
-
<%= label %>
-
- <%= balance.currency.symbol %>
- font-medium"><%= format_money_without_symbol balance, precision: 0 %>
- <%- if balance.currency.default_precision.positive? -%>
-
- <%= balance.currency.separator %><%= balance.cents_str %>
-
- <% end %>
-
- <% if trend.nil? %>
-
Data not available for the selected period
- <% elsif trend.direction == "flat" %>
-
No change vs. prior period
- <% else %>
-
- <%= render partial: "shared/trend_change", locals: { trend: trend } %>
- <%= period_label(period) %>
-
- <% end %>
-
diff --git a/app/views/shared/_modal.html.erb b/app/views/shared/_modal.html.erb
index 75174faf..c6ae75df 100644
--- a/app/views/shared/_modal.html.erb
+++ b/app/views/shared/_modal.html.erb
@@ -1,6 +1,6 @@
<%# locals: (content:) -%>
<%= turbo_frame_tag "modal" do %>
-