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">
|
|
|
|
<%= button_to sync_all_accounts_path,
|
2024-11-15 13:49:37 -05:00
|
|
|
disabled: Current.family.syncing?,
|
2025-04-18 18:53:10 +05:30
|
|
|
class: "md:btn md:btn--outline flex items-center justify-center gap-2 w-9 h-9 md:w-auto md:h-auto rounded-full md:rounded-lg",
|
2024-11-15 13:49:37 -05:00
|
|
|
title: t(".sync") do %>
|
2025-02-21 11:57:59 -05:00
|
|
|
<%= lucide_icon "refresh-cw", class: "w-5 h-5" %>
|
2025-04-18 18:53:10 +05:30
|
|
|
<span class="hidden md:inline"><%= t(".sync") %></span>
|
2025-02-21 11:57:59 -05:00
|
|
|
<% end %>
|
2024-06-13 14:37:27 -04:00
|
|
|
|
2025-02-21 11:57:59 -05:00
|
|
|
<%= link_to new_account_path(return_to: accounts_path),
|
2024-06-13 14:37:27 -04:00
|
|
|
data: { turbo_frame: "modal" },
|
2025-04-18 18:53:10 +05:30
|
|
|
class: "btn btn--primary flex items-center justify-center gap-1 w-9 h-9 md:w-auto md:h-auto rounded-full md:rounded-lg" do %>
|
|
|
|
<div class="flex items-center justify-center w-5 h-5">
|
|
|
|
|
|
|
|
<%= lucide_icon("plus")%>
|
|
|
|
</div>
|
|
|
|
<p class="hidden md:block text-sm font-medium"><%= t(".new_account") %></p>
|
2024-09-11 17:24:01 -04:00
|
|
|
<% end %>
|
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 %>
|