mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-11-18 14:48:42 +01:00
Merge pull request #677 from eitchtee/refactor/action-bar-improvements-3
feat(transactions): action bar improvements and new bulk actions
This commit is contained in:
7 files changed
+294
-84
No files matched your search
@@ -439,3 +439,62 @@ class TransferReviewFixTests(TransferTestBase):
|
||||
|
||||
partner.refresh_from_db()
|
||||
self.assertIsNone(partner.linked_transaction)
|
||||
|
||||
|
||||
class BulkActionTests(TransferTestBase):
|
||||
def _get(self, name, *ids, **kwargs):
|
||||
query = "&".join(f"transactions={pk}" for pk in ids)
|
||||
return self.client.get(
|
||||
reverse(name, kwargs=kwargs) + f"?{query}", HTTP_HX_REQUEST="true"
|
||||
)
|
||||
|
||||
def _expense(self, **fields):
|
||||
return Transaction.objects.create(
|
||||
account=self.checking,
|
||||
type=Transaction.Type.EXPENSE,
|
||||
amount=Decimal("10"),
|
||||
date=date(2026, 3, 10),
|
||||
description="Coffee",
|
||||
**fields,
|
||||
)
|
||||
|
||||
def test_change_month_updates_a_fully_selected_transfer_once_per_side(self):
|
||||
from_t, to_t = self._transfer()
|
||||
updated = []
|
||||
receiver = lambda sender, **kwargs: updated.append(sender.pk) # noqa: E731
|
||||
transaction_updated.connect(receiver, weak=False)
|
||||
self.addCleanup(transaction_updated.disconnect, receiver)
|
||||
|
||||
response = self._get(
|
||||
"transactions_bulk_change_month", from_t.id, to_t.id, change_type="next"
|
||||
)
|
||||
|
||||
self.assertEqual(response.status_code, 204)
|
||||
from_t.refresh_from_db()
|
||||
to_t.refresh_from_db()
|
||||
self.assertEqual(from_t.reference_date, date(2026, 4, 1))
|
||||
self.assertEqual(to_t.reference_date, date(2026, 4, 1))
|
||||
self.assertEqual(sorted(updated), sorted([from_t.pk, to_t.pk])) # once per side
|
||||
|
||||
def test_change_month_rejects_unknown_direction(self):
|
||||
t = self._expense()
|
||||
response = self._get("transactions_bulk_change_month", t.id, change_type="sideways")
|
||||
self.assertEqual(response.status_code, 400)
|
||||
|
||||
def test_move_to_today(self):
|
||||
t = self._expense()
|
||||
self._get("transactions_bulk_move_to_today", t.id)
|
||||
t.refresh_from_db()
|
||||
self.assertEqual(t.date, timezone.localdate(timezone.now()))
|
||||
|
||||
def test_mute_skips_transactions_controlled_elsewhere(self):
|
||||
muted_category = TransactionCategory.objects.create(name="Hidden", mute=True)
|
||||
plain = self._expense()
|
||||
by_category = self._expense(category=muted_category)
|
||||
|
||||
self._get("transactions_bulk_mute", plain.id, by_category.id)
|
||||
|
||||
plain.refresh_from_db()
|
||||
by_category.refresh_from_db()
|
||||
self.assertTrue(plain.mute)
|
||||
self.assertFalse(by_category.mute)
|
||||
@@ -81,6 +81,21 @@ urlpatterns = [
|
||||
views.bulk_clone_transactions,
|
||||
name="transactions_bulk_clone",
|
||||
),
|
||||
path(
|
||||
"transactions/actions/change-month/<str:change_type>/",
|
||||
views.bulk_change_month,
|
||||
name="transactions_bulk_change_month",
|
||||
),
|
||||
path(
|
||||
"transactions/actions/move-to-today/",
|
||||
views.bulk_move_to_today,
|
||||
name="transactions_bulk_move_to_today",
|
||||
),
|
||||
path(
|
||||
"transactions/actions/mute/",
|
||||
views.bulk_mute,
|
||||
name="transactions_bulk_mute",
|
||||
),
|
||||
path(
|
||||
"transaction/<int:transaction_id>/pay/",
|
||||
views.transaction_pay,
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import json
|
||||
from copy import deepcopy
|
||||
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from django.contrib import messages
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.db.models import Q
|
||||
from django.http import HttpResponse
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import gettext_lazy as _, ngettext_lazy
|
||||
|
||||
from apps.common.decorators.htmx import only_htmx
|
||||
@@ -149,6 +151,80 @@ def bulk_undelete_transactions(request):
|
||||
)
|
||||
|
||||
|
||||
def _bulk_update(request, transactions, change):
|
||||
"""Applies change to each selected transaction like its single action does.
|
||||
|
||||
A transfer moves as a pair through save(), so a selected partner is skipped.
|
||||
"""
|
||||
done = set()
|
||||
for transaction in transactions:
|
||||
if transaction.linked_transaction_id in done:
|
||||
continue
|
||||
old_data = deepcopy(transaction)
|
||||
change(transaction)
|
||||
transaction.save()
|
||||
transaction_updated.send(sender=transaction, old_data=old_data)
|
||||
done.add(transaction.id)
|
||||
|
||||
count = len(done)
|
||||
messages.success(
|
||||
request,
|
||||
ngettext_lazy(
|
||||
"%(count)s transaction updated successfully",
|
||||
"%(count)s transactions updated successfully",
|
||||
count,
|
||||
)
|
||||
% {"count": count},
|
||||
)
|
||||
return HttpResponse(status=204, headers={"HX-Trigger": "updated"})
|
||||
|
||||
|
||||
@only_htmx
|
||||
@login_required
|
||||
def bulk_change_month(request, change_type):
|
||||
months = {"previous": -1, "next": 1}.get(change_type)
|
||||
if months is None:
|
||||
return HttpResponse(status=400)
|
||||
|
||||
def change(transaction):
|
||||
transaction.reference_date += relativedelta(months=months)
|
||||
|
||||
return _bulk_update(
|
||||
request,
|
||||
Transaction.objects.filter(id__in=request.GET.getlist("transactions")),
|
||||
change,
|
||||
)
|
||||
|
||||
|
||||
@only_htmx
|
||||
@login_required
|
||||
def bulk_move_to_today(request):
|
||||
today = timezone.localdate(timezone.now())
|
||||
|
||||
def change(transaction):
|
||||
transaction.date = today
|
||||
|
||||
return _bulk_update(
|
||||
request,
|
||||
Transaction.objects.filter(id__in=request.GET.getlist("transactions")),
|
||||
change,
|
||||
)
|
||||
|
||||
|
||||
@only_htmx
|
||||
@login_required
|
||||
def bulk_mute(request):
|
||||
# Visibility controlled by the account or category can't be changed here.
|
||||
transactions = Transaction.objects.filter(
|
||||
id__in=request.GET.getlist("transactions"), mute=False
|
||||
).exclude(Q(account__untracked_by=request.user) | Q(category__mute=True))
|
||||
|
||||
def change(transaction):
|
||||
transaction.mute = True
|
||||
|
||||
return _bulk_update(request, transactions, change)
|
||||
|
||||
|
||||
@only_htmx
|
||||
@login_required
|
||||
def bulk_clone_transactions(request):
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class="border-s-4 border-e-0 border-t-0
|
||||
hover:bg-base-200 p-2 {% if transaction.account.is_asset %}border-dashed{% else %}border-solid{% endif %}
|
||||
{% if is_transfer %}border-s-info{% elif transaction.type == "EX" %}border-s-error{% else %}border-s-success{% endif %} relative
|
||||
w-full transaction-item bg-base-100 rounded">
|
||||
w-full min-w-0 transaction-item bg-base-100 rounded">
|
||||
<div class="flex flex-wrap lg:flex-nowrap font-mono text-sm items-center">
|
||||
<div class="lg:w-auto w-full flex items-center text-2xl lg:text-xl lg:text-center text-center p-0 cursor-pointer">
|
||||
{% if not transaction.deleted %}
|
||||
|
||||
@@ -17,38 +17,38 @@
|
||||
end
|
||||
end">
|
||||
<div class="card bg-base-300 shadow slide-in-bottom-short max-w-[90vw] card-border mt-5">
|
||||
<div class="card-body flex-row p-2 flex justify-between items-center gap-3 overflow-x-auto">
|
||||
<div class="card-body flex-row p-2 flex justify-between items-center gap-2 sm:gap-3 overflow-x-auto">
|
||||
{% spaceless %}
|
||||
<div class="font-bold text-md ms-2" id="selected-count">0</div>
|
||||
<div class="divider divider-horizontal m-0"></div>
|
||||
<div>
|
||||
<button role="button" class="btn btn-secondary btn-sm" type="button" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<i class="fa-regular fa-square-check fa-fw"></i>
|
||||
<i class="fa-solid fa-chevron-down fa-xs"></i>
|
||||
<div class="divider divider-horizontal m-0 max-sm:hidden"></div>
|
||||
<div class="join">
|
||||
<button class="btn btn-secondary btn-sm join-item" type="button" data-tippy-content="{% translate 'Unselect All' %}"
|
||||
aria-label="{% translate 'Unselect All' %}"
|
||||
_="on click set <#transactions-list input[type='checkbox']/>'s checked to false then call me.blur() then trigger change">
|
||||
<i class="fa-solid fa-xmark fa-fw"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu menu">
|
||||
<li>
|
||||
<a class="cursor-pointer"
|
||||
_="on click set <#transactions-list .transaction:not([style*='display: none']) input[type='checkbox']/>'s checked to true then call me.blur() then trigger change">
|
||||
<i class="fa-regular fa-square-check text-success me-3"></i>{% translate 'Select All' %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="cursor-pointer"
|
||||
_="on click set <#transactions-list input[type='checkbox']/>'s checked to false then call me.blur() then trigger change">
|
||||
<i class="fa-regular fa-square text-error me-3"></i>{% translate 'Unselect All' %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="cursor-pointer"
|
||||
_="on click for checkbox in <#transactions-list input[type='checkbox']/> set checkbox.checked to (not checkbox.checked) end then call me.blur() then trigger change">
|
||||
<i class="fa-solid fa-arrow-right-arrow-left text-info me-3"></i>{% translate 'Invert election' %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div>
|
||||
<button role="button" class="btn btn-secondary btn-sm join-item" type="button" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<i class="fa-solid fa-chevron-down fa-xs"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu menu">
|
||||
<li>
|
||||
<a class="cursor-pointer"
|
||||
_="on click set <#transactions-list .transaction:not([style*='display: none']) input[type='checkbox']/>'s checked to true then call me.blur() then trigger change">
|
||||
<i class="fa-regular fa-square-check text-success me-3"></i>{% translate 'Select All' %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="cursor-pointer"
|
||||
_="on click for checkbox in <#transactions-list input[type='checkbox']/> set checkbox.checked to (not checkbox.checked) end then call me.blur() then trigger change">
|
||||
<i class="fa-solid fa-arrow-right-arrow-left text-info me-3"></i>{% translate 'Invert selection' %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider divider-horizontal m-0"></div>
|
||||
<div class="divider divider-horizontal m-0 max-sm:hidden"></div>
|
||||
<button class="btn btn-secondary btn-sm" hx-get="{% url 'transactions_bulk_undelete' %}" hx-include=".transaction"
|
||||
data-tippy-content="{% translate 'Restore' %}">
|
||||
<i class="fa-solid fa-trash-arrow-up fa-fw"></i>
|
||||
@@ -59,7 +59,7 @@
|
||||
data-confirm-text="{% translate "Yes, delete them!" %}" _="install prompt_swal">
|
||||
<i class="fa-solid fa-trash text-error"></i>
|
||||
</button>
|
||||
<div class="divider divider-horizontal m-0"></div>
|
||||
<div class="divider divider-horizontal m-0 max-sm:hidden"></div>
|
||||
<div class="join" _="on selected_transactions_updated from #actions-bar
|
||||
set realTotal to math.bignumber(0)
|
||||
set flatTotal to math.bignumber(0)
|
||||
@@ -102,8 +102,8 @@
|
||||
writeText(original_value) on navigator.clipboard
|
||||
put '{% translate "copied!" %}' into #real-total-front's innerText wait 1s put original_value
|
||||
into #real-total-front's innerText end">
|
||||
<i class="fa-solid fa-plus fa-fw me-md-2"></i>
|
||||
<span class="hidden md:inline-block" id="real-total-front">0</span>
|
||||
<i class="fa-solid fa-plus fa-fw sm:me-2"></i>
|
||||
<span class="hidden sm:inline-block" id="real-total-front">0</span>
|
||||
</button>
|
||||
<div>
|
||||
<button class="join-item btn btn-sm btn-secondary" type="button" data-bs-toggle="dropdown"
|
||||
|
||||
@@ -17,74 +17,99 @@
|
||||
end
|
||||
end">
|
||||
<div class="card bg-base-300 shadow slide-in-bottom-short max-w-[90vw] card-border mt-5">
|
||||
<div class="card-body flex-row p-2 flex justify-between items-center gap-3 overflow-x-auto">
|
||||
<div class="card-body flex-row p-2 flex justify-between items-center gap-2 sm:gap-3 overflow-x-auto">
|
||||
{% spaceless %}
|
||||
<div class="font-bold text-md ms-2" id="selected-count">0</div>
|
||||
<div class="divider divider-horizontal m-0"></div>
|
||||
<div>
|
||||
<button role="button" class="btn btn-secondary btn-sm" type="button" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<i class="fa-regular fa-square-check fa-fw"></i>
|
||||
<i class="fa-solid fa-chevron-down fa-xs"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu menu">
|
||||
<li>
|
||||
<a class="cursor-pointer"
|
||||
_="on click set <#transactions-list .transaction:not([style*='display: none']) input[type='checkbox']/>'s checked to true then call me.blur() then trigger change">
|
||||
<i class="fa-regular fa-square-check text-success me-3"></i>{% translate 'Select All' %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="cursor-pointer"
|
||||
_="on click set <#transactions-list input[type='checkbox']/>'s checked to false then call me.blur() then trigger change">
|
||||
<i class="fa-regular fa-square text-error me-3"></i>{% translate 'Unselect All' %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="cursor-pointer"
|
||||
_="on click for checkbox in <#transactions-list input[type='checkbox']/> set checkbox.checked to (not checkbox.checked) end then call me.blur() then trigger change">
|
||||
<i class="fa-solid fa-arrow-right-arrow-left text-info me-3"></i>{% translate 'Invert selection' %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="divider divider-horizontal m-0"></div>
|
||||
<div class="divider divider-horizontal m-0 max-sm:hidden"></div>
|
||||
<div class="join">
|
||||
<button class="btn btn-secondary join-item btn-sm" hx-get="{% url 'transactions_bulk_edit' %}"
|
||||
hx-target="#generic-offcanvas" hx-include=".transaction" data-tippy-content="{% translate 'Edit' %}">
|
||||
<i class="fa-solid fa-pencil"></i>
|
||||
<button class="btn btn-secondary btn-sm join-item" type="button" data-tippy-content="{% translate 'Unselect All' %}"
|
||||
aria-label="{% translate 'Unselect All' %}"
|
||||
_="on click set <#transactions-list input[type='checkbox']/>'s checked to false then call me.blur() then trigger change">
|
||||
<i class="fa-solid fa-xmark fa-fw"></i>
|
||||
</button>
|
||||
<div>
|
||||
<button type="button" role="button" class="join-item btn btn-sm btn-secondary" data-bs-toggle="dropdown"
|
||||
<button role="button" class="btn btn-secondary btn-sm join-item" type="button" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<i class="fa-solid fa-chevron-down fa-xs"></i>
|
||||
</button>
|
||||
|
||||
<ul class="dropdown-menu menu">
|
||||
<li>
|
||||
<a class="cursor-pointer" hx-get="{% url 'transactions_bulk_unpay' %}" hx-include=".transaction">
|
||||
<i class="fa-regular fa-circle text-red-400 fa-fw me-3"></i>{% translate 'Mark as unpaid' %}
|
||||
<a class="cursor-pointer"
|
||||
_="on click set <#transactions-list .transaction:not([style*='display: none']) input[type='checkbox']/>'s checked to true then call me.blur() then trigger change">
|
||||
<i class="fa-regular fa-square-check text-success me-3"></i>{% translate 'Select All' %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="cursor-pointer" hx-get="{% url 'transactions_bulk_pay' %}" hx-include=".transaction">
|
||||
<i class="fa-regular fa-circle-check text-green-400 fa-fw me-3"></i>{% translate 'Mark as paid' %}
|
||||
<a class="cursor-pointer"
|
||||
_="on click for checkbox in <#transactions-list input[type='checkbox']/> set checkbox.checked to (not checkbox.checked) end then call me.blur() then trigger change">
|
||||
<i class="fa-solid fa-arrow-right-arrow-left text-info me-3"></i>{% translate 'Invert selection' %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-secondary btn-sm" hx-get="{% url 'transactions_bulk_clone' %}" hx-include=".transaction"
|
||||
data-tippy-content="{% translate 'Duplicate' %}">
|
||||
<i class="fa-solid fa-clone fa-fw"></i>
|
||||
</button>
|
||||
<button class="btn btn-error btn-sm" hx-get="{% url 'transactions_bulk_delete' %}" hx-include=".transaction"
|
||||
hx-trigger="confirmed" data-tippy-content="{% translate 'Delete' %}" data-bypass-on-ctrl="true"
|
||||
data-title="{% translate "Are you sure?" %}" data-text="{% translate "You won't be able to revert this!" %}"
|
||||
data-confirm-text="{% translate "Yes, delete them!" %}" _="install prompt_swal">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
</button>
|
||||
<div class="divider divider-horizontal m-0"></div>
|
||||
<div class="divider divider-horizontal m-0 max-sm:hidden"></div>
|
||||
{# Below md every action folds into a single menu so the bar doesn't overflow #}
|
||||
<div class="hidden md:flex items-center gap-3">
|
||||
<div class="join">
|
||||
<button class="btn btn-secondary join-item btn-sm" hx-get="{% url 'transactions_bulk_edit' %}"
|
||||
hx-target="#generic-offcanvas" hx-include=".transaction" data-tippy-content="{% translate 'Edit' %}">
|
||||
<i class="fa-solid fa-pencil"></i>
|
||||
</button>
|
||||
<div>
|
||||
<button type="button" role="button" class="join-item btn btn-sm btn-secondary" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<i class="fa-solid fa-chevron-down fa-xs"></i>
|
||||
</button>
|
||||
|
||||
<ul class="dropdown-menu menu">
|
||||
{% include 'includes/transactions_bulk_actions.html' %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-secondary btn-sm" hx-get="{% url 'transactions_bulk_clone' %}" hx-include=".transaction"
|
||||
data-tippy-content="{% translate 'Duplicate' %}">
|
||||
<i class="fa-solid fa-clone fa-fw"></i>
|
||||
</button>
|
||||
<button class="btn btn-error btn-sm" hx-get="{% url 'transactions_bulk_delete' %}" hx-include=".transaction"
|
||||
hx-trigger="confirmed" data-tippy-content="{% translate 'Delete' %}" data-bypass-on-ctrl="true"
|
||||
data-title="{% translate "Are you sure?" %}" data-text="{% translate "You won't be able to revert this!" %}"
|
||||
data-confirm-text="{% translate "Yes, delete them!" %}" _="install prompt_swal">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="md:hidden">
|
||||
<button type="button" role="button" class="btn btn-secondary btn-sm" data-bs-toggle="dropdown"
|
||||
aria-expanded="false" aria-label="{% translate 'More actions' %}">
|
||||
<i class="fa-solid fa-ellipsis-vertical fa-fw"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu menu">
|
||||
<li>
|
||||
<a class="cursor-pointer" hx-get="{% url 'transactions_bulk_edit' %}" hx-target="#generic-offcanvas"
|
||||
hx-include=".transaction">
|
||||
<i class="fa-solid fa-pencil fa-fw me-3"></i>{% translate 'Edit' %}
|
||||
</a>
|
||||
</li>
|
||||
<hr class="my-1 hr">
|
||||
{% include 'includes/transactions_bulk_actions.html' %}
|
||||
<hr class="my-1 hr">
|
||||
<li>
|
||||
<a class="cursor-pointer" hx-get="{% url 'transactions_bulk_clone' %}" hx-include=".transaction">
|
||||
<i class="fa-solid fa-clone fa-fw me-3"></i>{% translate 'Duplicate' %}
|
||||
</a>
|
||||
</li>
|
||||
<hr class="my-1 hr">
|
||||
<li>
|
||||
<a class="cursor-pointer text-error" hx-get="{% url 'transactions_bulk_delete' %}" hx-include=".transaction"
|
||||
hx-trigger="confirmed" data-bypass-on-ctrl="true"
|
||||
data-title="{% translate "Are you sure?" %}" data-text="{% translate "You won't be able to revert this!" %}"
|
||||
data-confirm-text="{% translate "Yes, delete them!" %}" _="install prompt_swal">
|
||||
<i class="fa-solid fa-trash fa-fw me-3"></i>{% translate 'Delete' %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="divider divider-horizontal m-0 max-sm:hidden"></div>
|
||||
<div class="join" _="on selected_transactions_updated from #actions-bar
|
||||
set realTotal to math.bignumber(0)
|
||||
set flatTotal to math.bignumber(0)
|
||||
@@ -127,8 +152,8 @@
|
||||
writeText(original_value) on navigator.clipboard
|
||||
put '{% translate "copied!" %}' into #real-total-front's innerText wait 1s put original_value
|
||||
into #real-total-front's innerText end">
|
||||
<i class="fa-solid fa-plus fa-fw me-md-2"></i>
|
||||
<span class="hidden md:inline-block" id="real-total-front">0</span>
|
||||
<i class="fa-solid fa-plus fa-fw sm:me-2"></i>
|
||||
<span class="hidden sm:inline-block" id="real-total-front">0</span>
|
||||
</button>
|
||||
<div>
|
||||
<button class="join-item btn btn-sm btn-secondary" type="button" data-bs-toggle="dropdown"
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
{% load i18n %}
|
||||
<li>
|
||||
<a class="cursor-pointer" hx-get="{% url 'transactions_bulk_unpay' %}" hx-include=".transaction">
|
||||
<i class="fa-regular fa-circle text-red-400 fa-fw me-3"></i>{% translate 'Mark as unpaid' %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="cursor-pointer" hx-get="{% url 'transactions_bulk_pay' %}" hx-include=".transaction">
|
||||
<i class="fa-regular fa-circle-check text-green-400 fa-fw me-3"></i>{% translate 'Mark as paid' %}
|
||||
</a>
|
||||
</li>
|
||||
<hr class="my-1 hr">
|
||||
<li>
|
||||
<a class="cursor-pointer" hx-get="{% url 'transactions_bulk_mute' %}" hx-include=".transaction">
|
||||
<i class="fa-solid fa-eye-slash fa-fw me-3"></i>{% translate 'Hide from summaries' %}
|
||||
</a>
|
||||
</li>
|
||||
<hr class="my-1 hr">
|
||||
<li>
|
||||
<a class="cursor-pointer" hx-get="{% url 'transactions_bulk_change_month' change_type='previous' %}"
|
||||
hx-include=".transaction">
|
||||
<i class="fa-solid fa-calendar-minus fa-fw me-3"></i>{% translate 'Move to previous month' %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="cursor-pointer" hx-get="{% url 'transactions_bulk_change_month' change_type='next' %}"
|
||||
hx-include=".transaction">
|
||||
<i class="fa-solid fa-calendar-plus fa-fw me-3"></i>{% translate 'Move to next month' %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="cursor-pointer" hx-get="{% url 'transactions_bulk_move_to_today' %}" hx-include=".transaction">
|
||||
<i class="fa-solid fa-calendar-day fa-fw me-3"></i>{% translate 'Move to today' %}
|
||||
</a>
|
||||
</li>
|
||||
Reference in new issue
Block a user