debt-manager/app/views/bubbles/show.html.erb
Louis Vallat edf60e9557
feat: added spendings for bubbles
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
2023-12-31 19:06:33 +01:00

23 lines
486 B
Plaintext

<h1><%= @bubble.name %></h1>
<p><%= @bubble.description %></p>
<%= link_to "Nouvelle dépense", new_bubble_spending_path(@bubble) %>
<table>
<thead>
<tr>
<th>Montant</th>
<th>Origine</th>
<th>Raison</th>
</tr>
</thead>
<tbody>
<% @spendings.each do |spending| %>
<tr>
<td><%= number_to_currency(spending.amount, unit: "€") %></td>
<td><%= spending.owner.email %></td>
<td><%= spending.description %></td>
</tr>
<% end %>
</tbody>
</table>