mirror of
https://github.com/we-promise/sure.git
synced 2026-04-18 11:34:13 +00:00
* Fix #910 * Unify helper for balance formatting in transactions and accounts views * Remove obsolete method * Rename helper method format_amount_by_curreny => totals_by_currency
22 lines
1.0 KiB
Plaintext
22 lines
1.0 KiB
Plaintext
<%# locals: (date:, group:) %>
|
|
<div id="date-group-<%= date %>" class="bg-gray-25 rounded-xl p-1 w-full" data-bulk-select-target="group">
|
|
<div class="py-2 px-4 flex items-center justify-between font-medium text-xs text-gray-500">
|
|
<div class="flex pl-0.5 items-center gap-4">
|
|
<%= check_box_tag "#{date}_transactions_selection",
|
|
class: ["maybe-checkbox maybe-checkbox--light", "hidden": group[:transactions].count == 0],
|
|
id: "selection_transaction_#{date}",
|
|
data: { action: "bulk-select#toggleGroupSelection" } %>
|
|
|
|
<%= tag.span "#{date.strftime('%b %d, %Y')} · #{group[:transactions].size + (group[:transfers].size * 2)}" %>
|
|
</div>
|
|
|
|
<div>
|
|
<%= totals_by_currency(collection: group[:transactions], money_method: :amount_money, negate: true) %>
|
|
</div>
|
|
</div>
|
|
<div class="bg-white shadow-xs rounded-md border border-alpha-black-25 divide-y divide-alpha-black-50">
|
|
<%= render group[:transactions] %>
|
|
<%= render group[:transfers] %>
|
|
</div>
|
|
</div>
|