Files
WYGIWYH/app/templates/recurring_transactions/fragments/list.html
2024-10-17 00:38:12 -03:00

75 lines
3.6 KiB
HTML

{% load i18n %}
<div class="container px-md-3 py-3 column-gap-5">
<div class="tw-text-3xl fw-bold font-monospace tw-w-full mb-3">
{% spaceless %}
<div>{% translate 'Recurring Transactions' %}<span>
<a class="text-decoration-none tw-text-2xl p-1 category-action"
role="button"
data-bs-toggle="tooltip"
data-bs-title="{% translate "Add" %}"
hx-get="{% url 'recurring_transaction_add' %}"
hx-target="#generic-offcanvas"
_="">
<i class="fa-solid fa-circle-plus fa-fw"></i></a>
</span></div>
{% endspaceless %}
</div>
<div class="border p-3 rounded-3 table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th scope="col" class="col-auto"></th>
<th scope="col" class="col">{% translate 'Name' %}</th>
</tr>
</thead>
<tbody>
{% for recurring_transaction in recurring_transactions %}
<tr class="recurring_transaction">
<td class="col-auto text-center">
<a class="text-decoration-none tw-text-gray-400 p-1 category-action"
role="button"
data-bs-toggle="tooltip"
data-bs-title="{% translate "Edit" %}"
hx-get="{% url 'recurring_transaction_edit' recurring_transaction_id=recurring_transaction.id %}"
hx-target="#generic-offcanvas">
<i class="fa-solid fa-pencil fa-fw"></i></a>
<a class="text-decoration-none tw-text-gray-400 p-1 category-action"
role="button"
data-bs-toggle="tooltip"
data-bs-title="{% translate "Transactions" %}"
hx-get="{% url 'recurring_transaction_transactions' recurring_transaction_id=recurring_transaction.id %}"
hx-target="#persistent-generic-offcanvas-left">
<i class="fa-solid fa-eye fa-fw"></i></a>
{# <a class="text-decoration-none text-info p-1 category-action"#}
{# role="button"#}
{# data-bs-toggle="tooltip"#}
{# data-bs-title="{% translate "Refresh" %}"#}
{# hx-get="{% url 'installment_plan_refresh' installment_plan_id=installment_plan.id %}"#}
{# hx-target="#generic-offcanvas"#}
{# hx-trigger='confirmed'#}
{# data-bypass-on-ctrl="true"#}
{# data-title="{% translate "Are you sure?" %}"#}
{# data-text="{% translate "This will update all transactions associated with this plan and recreate missing ones" %}"#}
{# data-confirm-text="{% translate "Yes, refresh it!" %}"#}
{# _="install prompt_swal">#}
{# <i class="fa-solid fa-arrows-rotate fa-fw"></i></a>#}
<a class="text-danger text-decoration-none p-1 category-action"
role="button"
data-bs-toggle="tooltip"
data-bs-title="{% translate "Delete" %}"
hx-delete="{% url 'recurring_transaction_delete' recurring_transaction_id=recurring_transaction.id %}"
hx-trigger='confirmed'
data-bypass-on-ctrl="true"
data-title="{% translate "Are you sure?" %}"
data-text="{% translate "This will delete the recurrence and all transactions associated with it" %}"
data-confirm-text="{% translate "Yes, delete it!" %}"
_="install prompt_swal"><i class="fa-solid fa-trash fa-fw"></i></a></td>
<td class="col">{{ recurring_transaction.description }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>