2025-02-21 11:57:59 -05:00
|
|
|
<header class="flex justify-between items-center text-primary font-medium">
|
|
|
|
<h1 class="text-xl"><%= t(".accounts") %></h1>
|
|
|
|
<div class="flex items-center gap-5">
|
|
|
|
<div class="flex items-center gap-2">
|
2025-05-12 18:55:19 -04:00
|
|
|
<% if Rails.env.development? %>
|
|
|
|
<%= render ButtonComponent.new(
|
|
|
|
text: "Sync all",
|
|
|
|
href: sync_all_accounts_path,
|
|
|
|
method: :post,
|
|
|
|
variant: "outline",
|
|
|
|
disabled: Current.family.syncing?,
|
|
|
|
icon: "refresh-cw",
|
|
|
|
) %>
|
|
|
|
<% end %>
|
2024-06-13 14:37:27 -04:00
|
|
|
|
2025-04-30 18:14:22 -04:00
|
|
|
<%= render LinkComponent.new(
|
|
|
|
text: "New account",
|
|
|
|
href: new_account_path(return_to: accounts_path),
|
|
|
|
variant: "primary",
|
|
|
|
icon: "plus",
|
|
|
|
frame: :modal
|
|
|
|
) %>
|
2024-03-07 10:55:51 -05:00
|
|
|
</div>
|
2025-02-21 11:57:59 -05:00
|
|
|
</div>
|
|
|
|
</header>
|
2024-06-13 14:37:27 -04:00
|
|
|
|
2025-02-21 11:57:59 -05:00
|
|
|
<% if @manual_accounts.empty? && @plaid_items.empty? %>
|
|
|
|
<%= render "empty" %>
|
|
|
|
<% else %>
|
|
|
|
<div class="space-y-2">
|
|
|
|
<% if @plaid_items.any? %>
|
|
|
|
<%= render @plaid_items.sort_by(&:created_at) %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if @manual_accounts.any? %>
|
|
|
|
<%= render "accounts/index/manual_accounts", accounts: @manual_accounts %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|