mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-04 21:15:19 +02:00
17 lines
858 B
Text
17 lines
858 B
Text
<%# locals: (account:, transactions:)%>
|
|
<div class="bg-white space-y-4 p-5 border border-alpha-black-25 rounded-xl shadow-xs">
|
|
<div class="flex justify-between items-center">
|
|
<h3 class="font-medium text-lg">Transactions</h3>
|
|
<%= link_to new_transaction_path(account_id: account), class: "flex gap-1 font-medium items-center bg-gray-50 text-gray-900 p-2 rounded-lg", data: { turbo_frame: :modal } do %>
|
|
<%= lucide_icon("plus", class: "w-5 h-5 text-gray-900") %>
|
|
<span class="text-sm">New transaction</span>
|
|
<% end %>
|
|
</div>
|
|
<% if transactions.empty? %>
|
|
<p class="text-gray-500 py-4">No transactions for this account yet.</p>
|
|
<% else %>
|
|
<div class="space-y-6">
|
|
<%= render partial: "transactions/transaction_group", collection: transactions.group_by(&:date), as: :transaction_group %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|