2025-02-25 10:14:07 -06:00
|
|
|
<% content_for :page_header do %>
|
2025-04-30 22:24:13 -04:00
|
|
|
<div class="space-y-1 mb-6 flex gap-4 justify-between items-center lg:items-start">
|
2025-04-18 18:53:10 +05:30
|
|
|
<div class="space-y-1">
|
2025-04-30 22:24:13 -04:00
|
|
|
<h1 class="text-xl lg:text-3xl font-medium text-primary">Welcome back, <%= Current.user.first_name %></h1>
|
2025-05-01 16:47:14 -04:00
|
|
|
<p class="text-sm lg:text-base text-secondary">Here's what's happening with your finances</p>
|
2025-04-18 18:53:10 +05:30
|
|
|
</div>
|
2025-04-23 10:42:30 -03:00
|
|
|
|
2025-04-30 18:14:22 -04:00
|
|
|
<%= render LinkComponent.new(
|
|
|
|
icon: "plus",
|
|
|
|
text: "New",
|
|
|
|
href: new_account_path,
|
|
|
|
frame: :modal,
|
|
|
|
class: "hidden lg:inline-flex"
|
|
|
|
) %>
|
|
|
|
|
|
|
|
<%= render LinkComponent.new(
|
|
|
|
variant: "icon-inverse",
|
|
|
|
icon: "plus",
|
|
|
|
href: new_account_path,
|
|
|
|
frame: :modal,
|
|
|
|
class: "rounded-full lg:hidden"
|
|
|
|
) %>
|
2025-02-25 10:14:07 -06:00
|
|
|
</div>
|
|
|
|
<% end %>
|
2024-09-10 17:17:10 -04:00
|
|
|
|
2025-02-25 10:14:07 -06:00
|
|
|
<div class="w-full space-y-6 pb-24">
|
2025-04-30 18:14:22 -04:00
|
|
|
<% if Current.family.accounts.any? %>
|
2025-05-15 10:19:56 -04:00
|
|
|
<section class="bg-container py-4 rounded-xl shadow-border-xs">
|
|
|
|
<%= render partial: "pages/dashboard/net_worth_chart", locals: {
|
|
|
|
balance_sheet: @balance_sheet,
|
|
|
|
period: @period
|
|
|
|
} %>
|
2025-04-30 18:14:22 -04:00
|
|
|
</section>
|
|
|
|
<% else %>
|
2025-05-15 10:19:56 -04:00
|
|
|
<section>
|
2025-04-30 18:14:22 -04:00
|
|
|
<%= render "pages/dashboard/no_accounts_graph_placeholder" %>
|
|
|
|
</section>
|
|
|
|
<% end %>
|
2024-09-10 17:17:10 -04:00
|
|
|
|
2025-02-21 11:57:59 -05:00
|
|
|
<section>
|
|
|
|
<%= render "pages/dashboard/balance_sheet", balance_sheet: @balance_sheet %>
|
|
|
|
</section>
|
2024-03-06 09:56:59 -05:00
|
|
|
</div>
|