feat: add ordering selector to monthly_overview and all_transactions

This commit is contained in:
Herculino Trotta
2024-10-28 00:57:54 -03:00
parent 8c628718ff
commit 5aec7b840e
5 changed files with 102 additions and 54 deletions

View File

@@ -28,10 +28,20 @@
</div>
</div>
<div class="col-12 col-xl-8">
<div class="text-end tw-justify-end tw-flex tw-text-sm mb-3">
<div class="tw-content-center" _="on change trigger updated on window">
<label for="order">{% translate "Order by" %}</label>
<select class="tw-border-0 focus-visible:tw-outline-0 w-full pe-2 tw-leading-normal text-bg-tertiary tw-font-medium rounded" name="order" id="order">
<option value="default">Default</option>
<option value="older">Oldest first</option>
<option value="newer">Newest first</option>
</select>
</div>
</div>
<div id="transactions"
class="show-loading"
hx-get="{% url 'transactions_all_list' %}"
hx-trigger="load, updated from:window" hx-include="#filter, #page">
hx-trigger="load, updated from:window" hx-include="#filter, #page, #order">
</div>
</div>
</div>