feat: more changes and fixes

This commit is contained in:
Herculino Trotta
2025-11-09 15:31:50 -03:00
parent 2afb6b1f5f
commit 7e37948616
41 changed files with 480 additions and 432 deletions
@@ -1,28 +1,28 @@
{% load i18n %}
<c-ui.fab-single-action
url="{% url 'installment_plan_add' %}"
hx_target="#generic-offcanvas">
</c-ui.fab-single-action>
<div class="container px-md-3 py-3 column-gap-5">
<div class="text-3xl font-bold font-mono w-full mb-3">
{% spaceless %}
<div>{% translate 'Installment Plans' %}<span>
<a class="no-underline text-2xl p-1 category-action"
role="button"
data-tippy-content="{% translate "Add" %}"
hx-get="{% url 'installment_plan_add' %}"
hx-target="#generic-offcanvas">
<i class="fa-solid fa-circle-plus fa-fw"></i></a>
</span></div>
<div>{% translate 'Installment Plans' %}</div>
{% endspaceless %}
</div>
<div class="card bg-base-100 shadow-xl">
<div class="card-header bg-base-200 p-4">
<div role="tablist" class="tabs tabs-lifted">
<button class="tab tab-active" data-bs-toggle="tab" type="button" role="tab" aria-selected="true" hx-get="{% url 'active_installment_plans_list' %}" hx-trigger="load, click" hx-target="#installment-plans-table">{% translate 'All' %}</button>
<button class="tab" hx-get="{% url 'finished_installment_plans_list' %}" hx-target="#installment-plans-table" data-bs-toggle="tab" type="button" role="tab" aria-selected="false">{% translate 'Finished' %}</button>
<div class="card-header bg-base-200 p-4 rounded-box">
<div role="tablist" class="tabs tabs-border">
<input type="radio" name="installment_plan_tabs" class="tab" aria-label="{% translate 'Active' %}" checked="checked"
hx-get="{% url 'active_installment_plans_list' %}" hx-trigger="load, click" hx-target="#installment-plans-table"
hx-indicator="#installment-plans-table" />
<input type="radio" name="installment_plan_tabs" class="tab" aria-label="{% translate 'Finished' %}"
hx-get="{% url 'finished_installment_plans_list' %}" hx-trigger="click" hx-target="#installment-plans-table" hx-indicator="#installment-plans-table" />
</div>
</div>
<div class="card-body">
<div id="installment-plans-table"></div>
<div id="installment-plans-table" class="show-loading"></div>
</div>
</div>
@@ -12,7 +12,7 @@
<table class="table table-zebra">
<thead>
<tr>
<th scope="col" class="w-auto"></th>
<th scope="col" class="table-col-auto"></th>
<th scope="col">{% translate 'Name' %}</th>
<th scope="col">{% translate 'Account' %}</th>
<th scope="col">{% translate 'Amount' %}</th>
@@ -21,7 +21,7 @@
<tbody>
{% for installment_plan in installment_plans %}
<tr class="installment-plan">
<td class="w-auto text-center">
<td class="table-col-auto text-center">
<div class="join" role="group" aria-label="{% translate 'Actions' %}">
<a class="btn btn-secondary btn-sm join-item"
role="button"
@@ -37,7 +37,7 @@
hx-swap="innerHTML"
hx-target="#persistent-generic-offcanvas-left">
<i class="fa-solid fa-eye fa-fw"></i></a>
<a class="btn btn-secondary btn-sm join-item text-info"
<a class="btn btn-secondary btn-sm join-item"
role="button"
data-tippy-content="{% translate "Refresh" %}"
hx-get="{% url 'installment_plan_refresh' installment_plan_id=installment_plan.id %}"
@@ -49,7 +49,7 @@
data-confirm-text="{% translate "Yes, refresh it!" %}"
_="install prompt_swal">
<i class="fa-solid fa-arrows-rotate fa-fw"></i></a>
<a class="btn btn-secondary btn-sm join-item text-error"
<a class="btn btn-error btn-sm join-item"
role="button"
data-tippy-content="{% translate "Delete" %}"
hx-delete="{% url 'installment_plan_delete' installment_plan_id=installment_plan.id %}"
@@ -62,7 +62,7 @@
</div>
</td>
<td>
<div class="{% if installment_plan.type == 'EX' %}text-red-400{% else %}text-green-400{% endif %}">
<div class="{% if installment_plan.type == 'EX' %}text-error{% else %}text-success{% endif %}">
{{ installment_plan.description }}
</div>
<div class="text-sm text-base-content/60">{{ installment_plan.notes|linebreaksbr }}</div>