mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-24 01:28:42 +02:00
feat: add late section to monthly and all views (w/ default ordering)
This commit is contained in:
@@ -3,6 +3,31 @@
|
||||
{% regroup transactions by date|customnaturaldate as transactions_by_date %}
|
||||
|
||||
<div id="transactions-list">
|
||||
{% if late_transactions %}
|
||||
<div id="late-transactions" class="transactions-divider"
|
||||
x-data="{ open: sessionStorage.getItem('late-transactions') !== 'false' }"
|
||||
x-init="if (sessionStorage.getItem('late-transactions') === null) sessionStorage.setItem('late-transactions', 'true')">
|
||||
<div class="mt-3 mb-1 w-full border-b border-b-error/50 transactions-divider-title cursor-pointer">
|
||||
<a class="no-underline inline-block w-full text-error font-semibold"
|
||||
role="button"
|
||||
@click="open = !open; sessionStorage.setItem('late-transactions', open)"
|
||||
:aria-expanded="open">
|
||||
<i class="fa-solid fa-circle-exclamation me-1"></i>{% translate "late" %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="transactions-divider-collapse overflow-visible isolation-auto"
|
||||
x-show="open"
|
||||
x-collapse>
|
||||
<div class="flex flex-col">
|
||||
{% for transaction in late_transactions %}
|
||||
<c-transaction.item
|
||||
:transaction="transaction"></c-transaction.item>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% for x in transactions_by_date %}
|
||||
<div id="{{ x.grouper|slugify }}" class="transactions-divider"
|
||||
x-data="{ open: sessionStorage.getItem('{{ x.grouper|slugify }}') !== 'false' }"
|
||||
@@ -28,10 +53,13 @@
|
||||
</div>
|
||||
|
||||
{% empty %}
|
||||
{% if not late_transactions %}
|
||||
<c-msg.empty
|
||||
title="{% translate 'No transactions this month' %}"
|
||||
subtitle="{% translate "Try adding one" %}"></c-msg.empty>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{# Floating bar #}
|
||||
<c-ui.transactions-action-bar></c-ui.transactions-action-bar>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,6 +3,31 @@
|
||||
{% regroup page_obj by date|customnaturaldate as transactions_by_date %}
|
||||
|
||||
<div id="transactions-list" class="show-loading">
|
||||
{% if late_transactions %}
|
||||
<div id="late-transactions" class="transactions-divider"
|
||||
x-data="{ open: sessionStorage.getItem('late-transactions') !== 'false' }"
|
||||
x-init="if (sessionStorage.getItem('late-transactions') === null) sessionStorage.setItem('late-transactions', 'true')">
|
||||
<div class="mt-3 mb-1 w-full border-b border-b-error/50 transactions-divider-title cursor-pointer">
|
||||
<a class="no-underline inline-block w-full text-error font-semibold"
|
||||
role="button"
|
||||
@click="open = !open; sessionStorage.setItem('late-transactions', open)"
|
||||
:aria-expanded="open">
|
||||
<i class="fa-solid fa-circle-exclamation me-1"></i>{% translate "late" %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="transactions-divider-collapse overflow-visible isolation-auto"
|
||||
x-show="open"
|
||||
x-collapse>
|
||||
<div class="flex flex-col">
|
||||
{% for transaction in late_transactions %}
|
||||
<c-transaction.item
|
||||
:transaction="transaction"></c-transaction.item>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% for x in transactions_by_date %}
|
||||
<div id="{{ x.grouper|slugify }}" class="transactions-divider"
|
||||
x-data="{ open: sessionStorage.getItem('{{ x.grouper|slugify }}') !== 'false' }"
|
||||
@@ -28,9 +53,11 @@
|
||||
</div>
|
||||
|
||||
{% empty %}
|
||||
{% if not late_transactions %}
|
||||
<c-msg.empty
|
||||
title="{% translate "No transactions found" %}"
|
||||
subtitle="{% translate "Try adding one" %}"></c-msg.empty>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{# Floating bar #}
|
||||
|
||||
Reference in New Issue
Block a user