mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 03:55:20 +02:00
* Transaction scaffold * Rough in transaction views * Fix sort order * Fix mass assignment issue * Fix test * Simplify CI workflow * Don't seed db before test
19 lines
913 B
Text
19 lines
913 B
Text
<%# locals: (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, class: "flex gap-1 font-medium items-center bg-gray-50 text-gray-900 p-2 rounded-lg" 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">
|
|
<% transactions.group_by { |transaction| transaction.date }.each do |date, grouped_transactions| %>
|
|
<%= render partial: "transactions/transaction_group", locals: { date: date, transactions: grouped_transactions } %>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|