feat: automated replacement

This commit is contained in:
Herculino Trotta
2025-10-28 14:13:30 -03:00
parent dd82289488
commit e600d87968
167 changed files with 4442 additions and 2503 deletions
+47 -47
View File
@@ -1,22 +1,22 @@
{% load tools %}
{% load i18n %}
<div class="col card shadow">
<div class="card-body">
<div class="col tw:card tw:bg-base-100 tw:shadow-xl">
<div class="tw:card-body">
{% if account.account.group %}
<div class="tw:text-sm mb-2">
<span class="badge text-bg-primary ">{{ account.account.group }}</span>
<div class="tw:text-sm tw:mb-2">
<span class="tw:badge tw:badge-primary">{{ account.account.group }}</span>
</div>
{% endif %}
<h5 class="card-title">
<h5 class="tw:card-title">
{{ account.account.name }}
</h5>
<div class="d-flex justify-content-between align-items-baseline mt-2">
<div class="text-end font-monospace">
<div class="tw:flex tw:justify-between tw:items-baseline tw:mt-2">
<div class="tw:text-end tw:font-mono">
<div class="tw:text-gray-400">{% translate 'projected income' %}</div>
</div>
<div class="dotted-line flex-grow-1"></div>
<div class="dotted-line tw:flex-grow"></div>
{% if account.income_projected != 0 %}
<div class="text-end font-monospace tw:text-green-400">
<div class="tw:text-end tw:font-mono tw:text-green-400">
<c-amount.display
:amount="account.income_projected"
:prefix="account.currency.prefix"
@@ -24,11 +24,11 @@
:decimal_places="account.currency.decimal_places"></c-amount.display>
</div>
{% else %}
<div class="text-end font-monospace">-</div>
<div class="tw:text-end tw:font-mono">-</div>
{% endif %}
</div>
{% if account.exchanged and account.exchanged.income_projected %}
<div class="text-end font-monospace tw:text-gray-500">
<div class="tw:text-end tw:font-mono tw:text-gray-500">
<c-amount.display
:amount="account.exchanged.income_projected"
:prefix="account.exchanged.currency.prefix"
@@ -36,14 +36,14 @@
:decimal_places="account.exchanged.currency.decimal_places"></c-amount.display>
</div>
{% endif %}
<div class="d-flex justify-content-between align-items-baseline mt-2">
<div class="text-end font-monospace">
<div class="tw:flex tw:justify-between tw:items-baseline tw:mt-2">
<div class="tw:text-end tw:font-mono">
<div class="tw:text-gray-400">{% translate 'projected expenses' %}</div>
</div>
<div class="dotted-line flex-grow-1"></div>
<div class="dotted-line tw:flex-grow"></div>
<div>
{% if account.expense_projected != 0 %}
<div class="text-end font-monospace tw:text-red-400">
<div class="tw:text-end tw:font-mono tw:text-red-400">
<c-amount.display
:amount="account.expense_projected"
:prefix="account.currency.prefix"
@@ -51,12 +51,12 @@
:decimal_places="account.currency.decimal_places"></c-amount.display>
</div>
{% else %}
<div class="text-end font-monospace">-</div>
<div class="tw:text-end tw:font-mono">-</div>
{% endif %}
</div>
</div>
{% if account.exchanged and account.exchanged.expense_projected %}
<div class="text-end font-monospace tw:text-gray-500">
<div class="tw:text-end tw:font-mono tw:text-gray-500">
<c-amount.display
:amount="account.exchanged.expense_projected"
:prefix="account.exchanged.currency.prefix"
@@ -64,13 +64,13 @@
:decimal_places="account.exchanged.currency.decimal_places"></c-amount.display>
</div>
{% endif %}
<div class="d-flex justify-content-between align-items-baseline mt-2">
<div class="text-end font-monospace">
<div class="tw:flex tw:justify-between tw:items-baseline tw:mt-2">
<div class="tw:text-end tw:font-mono">
<div class="tw:text-gray-400">{% translate 'projected total' %}</div>
</div>
<div class="dotted-line flex-grow-1"></div>
<div class="dotted-line tw:flex-grow"></div>
<div
class="text-end font-monospace">
class="tw:text-end tw:font-mono">
<c-amount.display
:amount="account.total_projected"
:prefix="account.currency.prefix"
@@ -80,7 +80,7 @@
</div>
</div>
{% if account.exchanged.total_projected and account.exchanged.total_projected %}
<div class="text-end font-monospace tw:text-gray-500">
<div class="tw:text-end tw:font-mono tw:text-gray-500">
<c-amount.display
:amount="account.exchanged.total_projected"
:prefix="account.exchanged.currency.prefix"
@@ -88,14 +88,14 @@
:decimal_places="account.exchanged.currency.decimal_places"></c-amount.display>
</div>
{% endif %}
<hr class="my-3">
<div class="d-flex justify-content-between align-items-baseline mt-2">
<div class="text-end font-monospace">
<hr class="tw:my-3">
<div class="tw:flex tw:justify-between tw:items-baseline tw:mt-2">
<div class="tw:text-end tw:font-mono">
<div class="tw:text-gray-400">{% translate 'current income' %}</div>
</div>
<div class="dotted-line flex-grow-1"></div>
<div class="dotted-line tw:flex-grow"></div>
{% if account.income_current != 0 %}
<div class="text-end font-monospace tw:text-green-400">
<div class="tw:text-end tw:font-mono tw:text-green-400">
<c-amount.display
:amount="account.income_current"
:prefix="account.currency.prefix"
@@ -103,11 +103,11 @@
:decimal_places="account.currency.decimal_places"></c-amount.display>
</div>
{% else %}
<div class="text-end font-monospace">-</div>
<div class="tw:text-end tw:font-mono">-</div>
{% endif %}
</div>
{% if account.exchanged and account.exchanged.income_current %}
<div class="text-end font-monospace tw:text-gray-500">
<div class="tw:text-end tw:font-mono tw:text-gray-500">
<c-amount.display
:amount="account.exchanged.income_current"
:prefix="account.exchanged.currency.prefix"
@@ -115,13 +115,13 @@
:decimal_places="account.exchanged.currency.decimal_places"></c-amount.display>
</div>
{% endif %}
<div class="d-flex justify-content-between align-items-baseline mt-2">
<div class="text-end font-monospace">
<div class="tw:flex tw:justify-between tw:items-baseline tw:mt-2">
<div class="tw:text-end tw:font-mono">
<div class="tw:text-gray-400">{% translate 'current expenses' %}</div>
</div>
<div class="dotted-line flex-grow-1"></div>
<div class="dotted-line tw:flex-grow"></div>
{% if account.expense_current != 0 %}
<div class="text-end font-monospace tw:text-red-400">
<div class="tw:text-end tw:font-mono tw:text-red-400">
<c-amount.display
:amount="account.expense_current"
:prefix="account.currency.prefix"
@@ -129,11 +129,11 @@
:decimal_places="account.currency.decimal_places"></c-amount.display>
</div>
{% else %}
<div class="text-end font-monospace">-</div>
<div class="tw:text-end tw:font-mono">-</div>
{% endif %}
</div>
{% if account.exchanged and account.exchanged.expense_current %}
<div class="text-end font-monospace tw:text-gray-500">
<div class="tw:text-end tw:font-mono tw:text-gray-500">
<c-amount.display
:amount="account.exchanged.expense_current"
:prefix="account.exchanged.currency.prefix"
@@ -141,12 +141,12 @@
:decimal_places="account.exchanged.currency.decimal_places"></c-amount.display>
</div>
{% endif %}
<div class="d-flex justify-content-between align-items-baseline mt-2">
<div class="text-end font-monospace">
<div class="tw:flex tw:justify-between tw:items-baseline tw:mt-2">
<div class="tw:text-end tw:font-mono">
<div class="tw:text-gray-400">{% translate 'current total' %}</div>
</div>
<div class="dotted-line flex-grow-1"></div>
<div class="text-end font-monospace">
<div class="dotted-line tw:flex-grow"></div>
<div class="tw:text-end tw:font-mono">
<c-amount.display
:amount="account.total_current"
:prefix="account.currency.prefix"
@@ -156,7 +156,7 @@
</div>
</div>
{% if account.exchanged and account.exchanged.total_current %}
<div class="text-end font-monospace tw:text-gray-500">
<div class="tw:text-end tw:font-mono tw:text-gray-500">
<c-amount.display
:amount="account.exchanged.total_current"
:prefix="account.exchanged.currency.prefix"
@@ -165,13 +165,13 @@
</div>
{% endif %}
<div>
<hr class="my-3">
<div class="d-flex justify-content-between align-items-baseline mt-2">
<div class="text-end font-monospace">
<hr class="tw:my-3">
<div class="tw:flex tw:justify-between tw:items-baseline tw:mt-2">
<div class="tw:text-end tw:font-mono">
<div class="tw:text-gray-400">{% translate 'final total' %}</div>
</div>
<div class="dotted-line flex-grow-1"></div>
<div class="text-end font-monospace">
<div class="dotted-line tw:flex-grow"></div>
<div class="tw:text-end tw:font-mono">
<c-amount.display
:amount="account.total_final"
:prefix="account.currency.prefix"
@@ -181,7 +181,7 @@
</div>
</div>
{% if account.exchanged and account.exchanged.total_final %}
<div class="text-end font-monospace tw:text-gray-500">
<div class="tw:text-end tw:font-mono tw:text-gray-500">
<c-amount.display
:amount="account.exchanged.total_final"
:prefix="account.exchanged.currency.prefix"
@@ -191,7 +191,7 @@
{% endif %}
</div>
{% with p=percentages|get_dict_item:account_id %}
<div class="my-3">
<div class="tw:my-3">
<c-ui.percentage-distribution :percentage="p"></c-ui.percentage-distribution>
</div>
{% endwith %}
+2 -2
View File
@@ -1,5 +1,5 @@
<div class="card tw:relative h-100 shadow">
<div class="card-body">
<div class="tw:card tw:bg-base-100 tw:shadow-xl tw:relative tw:h-full">
<div class="tw:card-body">
{{ slot }}
</div>
</div>
+45 -45
View File
@@ -1,17 +1,17 @@
{% load tools %}
{% load i18n %}
<div class="col card shadow">
<div class="card-body">
<h5 class="card-title">
<div class="col tw:card tw:bg-base-100 tw:shadow-xl">
<div class="tw:card-body">
<h5 class="tw:card-title">
{{ currency.currency.name }}
</h5>
<div class="d-flex justify-content-between align-items-baseline mt-2">
<div class="text-end font-monospace">
<div class="tw:flex tw:justify-between tw:items-baseline tw:mt-2">
<div class="tw:text-end tw:font-mono">
<div class="tw:text-gray-400">{% translate 'projected income' %}</div>
</div>
<div class="dotted-line flex-grow-1"></div>
<div class="dotted-line tw:flex-grow"></div>
{% if currency.income_projected != 0 %}
<div class="text-end font-monospace tw:text-green-400">
<div class="tw:text-end tw:font-mono tw:text-green-400">
<c-amount.display
:amount="currency.income_projected"
:prefix="currency.currency.prefix"
@@ -19,11 +19,11 @@
:decimal_places="currency.currency.decimal_places"></c-amount.display>
</div>
{% else %}
<div class="text-end font-monospace">-</div>
<div class="tw:text-end tw:font-mono">-</div>
{% endif %}
</div>
{% if currency.exchanged and currency.exchanged.income_projected %}
<div class="text-end font-monospace tw:text-gray-500">
<div class="tw:text-end tw:font-mono tw:text-gray-500">
<c-amount.display
:amount="currency.exchanged.income_projected"
:prefix="currency.exchanged.currency.prefix"
@@ -31,14 +31,14 @@
:decimal_places="currency.exchanged.currency.decimal_places"></c-amount.display>
</div>
{% endif %}
<div class="d-flex justify-content-between align-items-baseline mt-2">
<div class="text-end font-monospace">
<div class="tw:flex tw:justify-between tw:items-baseline tw:mt-2">
<div class="tw:text-end tw:font-mono">
<div class="tw:text-gray-400">{% translate 'projected expenses' %}</div>
</div>
<div class="dotted-line flex-grow-1"></div>
<div class="dotted-line tw:flex-grow"></div>
<div>
{% if currency.expense_projected != 0 %}
<div class="text-end font-monospace tw:text-red-400">
<div class="tw:text-end tw:font-mono tw:text-red-400">
<c-amount.display
:amount="currency.expense_projected"
:prefix="currency.currency.prefix"
@@ -46,12 +46,12 @@
:decimal_places="currency.currency.decimal_places"></c-amount.display>
</div>
{% else %}
<div class="text-end font-monospace">-</div>
<div class="tw:text-end tw:font-mono">-</div>
{% endif %}
</div>
</div>
{% if currency.exchanged and currency.exchanged.expense_projected %}
<div class="text-end font-monospace tw:text-gray-500">
<div class="tw:text-end tw:font-mono tw:text-gray-500">
<c-amount.display
:amount="currency.exchanged.expense_projected"
:prefix="currency.exchanged.currency.prefix"
@@ -59,12 +59,12 @@
:decimal_places="currency.exchanged.currency.decimal_places"></c-amount.display>
</div>
{% endif %}
<div class="d-flex justify-content-between align-items-baseline mt-2">
<div class="text-end font-monospace">
<div class="tw:flex tw:justify-between tw:items-baseline tw:mt-2">
<div class="tw:text-end tw:font-mono">
<div class="tw:text-gray-400">{% translate 'projected total' %}</div>
</div>
<div class="dotted-line flex-grow-1"></div>
<div class="text-end font-monospace">
<div class="dotted-line tw:flex-grow"></div>
<div class="tw:text-end tw:font-mono">
<c-amount.display
:amount="currency.total_projected"
:prefix="currency.currency.prefix"
@@ -74,7 +74,7 @@
</div>
</div>
{% if currency.exchanged.total_projected and currency.exchanged.total_projected %}
<div class="text-end font-monospace tw:text-gray-500">
<div class="tw:text-end tw:font-mono tw:text-gray-500">
<c-amount.display
:amount="currency.exchanged.total_projected"
:prefix="currency.exchanged.currency.prefix"
@@ -82,14 +82,14 @@
:decimal_places="currency.exchanged.currency.decimal_places"></c-amount.display>
</div>
{% endif %}
<hr class="my-3">
<div class="d-flex justify-content-between align-items-baseline mt-2">
<div class="text-end font-monospace">
<hr class="tw:my-3">
<div class="tw:flex tw:justify-between tw:items-baseline tw:mt-2">
<div class="tw:text-end tw:font-mono">
<div class="tw:text-gray-400">{% translate 'current income' %}</div>
</div>
<div class="dotted-line flex-grow-1"></div>
<div class="dotted-line tw:flex-grow"></div>
{% if currency.income_current != 0 %}
<div class="text-end font-monospace tw:text-green-400">
<div class="tw:text-end tw:font-mono tw:text-green-400">
<c-amount.display
:amount="currency.income_current"
:prefix="currency.currency.prefix"
@@ -97,11 +97,11 @@
:decimal_places="currency.currency.decimal_places"></c-amount.display>
</div>
{% else %}
<div class="text-end font-monospace">-</div>
<div class="tw:text-end tw:font-mono">-</div>
{% endif %}
</div>
{% if currency.exchanged and currency.exchanged.income_current %}
<div class="text-end font-monospace tw:text-gray-500">
<div class="tw:text-end tw:font-mono tw:text-gray-500">
<c-amount.display
:amount="currency.exchanged.income_current"
:prefix="currency.exchanged.currency.prefix"
@@ -109,13 +109,13 @@
:decimal_places="currency.exchanged.currency.decimal_places"></c-amount.display>
</div>
{% endif %}
<div class="d-flex justify-content-between align-items-baseline mt-2">
<div class="text-end font-monospace">
<div class="tw:flex tw:justify-between tw:items-baseline tw:mt-2">
<div class="tw:text-end tw:font-mono">
<div class="tw:text-gray-400">{% translate 'current expenses' %}</div>
</div>
<div class="dotted-line flex-grow-1"></div>
<div class="dotted-line tw:flex-grow"></div>
{% if currency.expense_current != 0 %}
<div class="text-end font-monospace tw:text-red-400">
<div class="tw:text-end tw:font-mono tw:text-red-400">
<c-amount.display
:amount="currency.expense_current"
:prefix="currency.currency.prefix"
@@ -123,11 +123,11 @@
:decimal_places="currency.currency.decimal_places"></c-amount.display>
</div>
{% else %}
<div class="text-end font-monospace">-</div>
<div class="tw:text-end tw:font-mono">-</div>
{% endif %}
</div>
{% if currency.exchanged and currency.exchanged.expense_current %}
<div class="text-end font-monospace tw:text-gray-500">
<div class="tw:text-end tw:font-mono tw:text-gray-500">
<c-amount.display
:amount="currency.exchanged.expense_current"
:prefix="currency.exchanged.currency.prefix"
@@ -135,12 +135,12 @@
:decimal_places="currency.exchanged.currency.decimal_places"></c-amount.display>
</div>
{% endif %}
<div class="d-flex justify-content-between align-items-baseline mt-2">
<div class="text-end font-monospace">
<div class="tw:flex tw:justify-between tw:items-baseline tw:mt-2">
<div class="tw:text-end tw:font-mono">
<div class="tw:text-gray-400">{% translate 'current total' %}</div>
</div>
<div class="dotted-line flex-grow-1"></div>
<div class="text-end font-monospace">
<div class="dotted-line tw:flex-grow"></div>
<div class="tw:text-end tw:font-mono">
<c-amount.display
:amount="currency.total_current"
:prefix="currency.currency.prefix"
@@ -150,7 +150,7 @@
</div>
</div>
{% if currency.exchanged and currency.exchanged.total_current %}
<div class="text-end font-monospace tw:text-gray-500">
<div class="tw:text-end tw:font-mono tw:text-gray-500">
<c-amount.display
:amount="currency.exchanged.total_current"
:prefix="currency.exchanged.currency.prefix"
@@ -159,13 +159,13 @@
</div>
{% endif %}
<div>
<hr class="my-3">
<div class="d-flex justify-content-between align-items-baseline mt-2">
<div class="text-end font-monospace">
<hr class="tw:my-3">
<div class="tw:flex tw:justify-between tw:items-baseline tw:mt-2">
<div class="tw:text-end tw:font-mono">
<div class="tw:text-gray-400">{% translate 'final total' %}</div>
</div>
<div class="dotted-line flex-grow-1"></div>
<div class="text-end font-monospace">
<div class="dotted-line tw:flex-grow"></div>
<div class="tw:text-end tw:font-mono">
<c-amount.display
:amount="currency.total_final"
:prefix="currency.currency.prefix"
@@ -175,7 +175,7 @@
</div>
</div>
{% if currency.exchanged and currency.exchanged.total_final %}
<div class="text-end font-monospace tw:text-gray-500">
<div class="tw:text-end tw:font-mono tw:text-gray-500">
<c-amount.display
:amount="currency.exchanged.total_final"
:prefix="currency.exchanged.currency.prefix"
@@ -185,7 +185,7 @@
{% endif %}
</div>
{% with p=percentages|get_dict_item:currency_id %}
<div class="my-3">
<div class="tw:my-3">
<c-ui.percentage-distribution :percentage="p"></c-ui.percentage-distribution>
</div>
{% endwith %}
@@ -1,5 +1,5 @@
{% load i18n %}
<div class="tw:sticky tw:bottom-4 tw:left-0 tw:right-0 tw:z-50 tw:hidden mx-auto tw:w-fit" id="actions-bar"
<div class="tw:sticky tw:bottom-4 tw:left-0 tw:right-0 tw:z-50 tw:hidden tw:mx-auto tw:w-fit" id="actions-bar"
_="on change from #transactions-list or htmx:afterSettle from window
if #actions-bar then
if no <input[type='checkbox']:checked/> in #transactions-list
@@ -16,38 +16,38 @@
end
end
end">
<div class="card slide-in-bottom">
<div class="card-body p-2 d-flex justify-content-between align-items-center gap-3">
<div class="tw:card tw:bg-base-100 tw:shadow slide-in-bottom">
<div class="tw:card-body tw:p-2 tw:flex tw:justify-between tw:items-center tw:gap-3">
{% spaceless %}
<div class="dropdown">
<button class="btn btn-secondary btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown"
aria-expanded="false">
<div class="tw:dropdown">
<button tabindex="0" role="button" class="tw:btn tw:btn-secondary tw:btn-sm" type="button">
<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">
<ul tabindex="0" class="tw:dropdown-content tw:menu tw:bg-base-100 tw:rounded-box tw:z-[1] tw:w-52 tw:p-2 tw:shadow">
<li>
<div class="dropdown-item px-3 tw:cursor-pointer"
<a class="tw:cursor-pointer"
_="on click set <#transactions-list input[type='checkbox']/>'s checked to true then call me.blur() then trigger change">
<i class="fa-regular fa-square-check tw:text-green-400 me-3"></i>{% translate 'Select All' %}
</div>
<i class="fa-regular fa-square-check tw:text-green-400 tw:me-3"></i>{% translate 'Select All' %}
</a>
</li>
<li>
<div class="dropdown-item px-3 tw:cursor-pointer"
<a class="tw: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 tw:text-red-400 me-3"></i>{% translate 'Unselect All' %}
</div>
<i class="fa-regular fa-square tw:text-red-400 tw:me-3"></i>{% translate 'Unselect All' %}
</a>
</li>
</ul>
</div>
<div class="vr tw:align-middle"></div>
<button class="btn btn-secondary btn-sm"
<div class="tw:divider tw:divider-horizontal tw:m-0"></div>
<button class="tw:btn tw:btn-secondary tw:btn-sm"
hx-get="{% url 'transactions_bulk_undelete' %}"
hx-include=".transaction"
data-bs-toggle="tooltip"
data-bs-title="{% translate 'Restore' %}">
<i class="fa-solid fa-trash-arrow-up fa-fw"></i>
</button>
<button class="btn btn-secondary btn-sm"
<button class="tw:btn tw:btn-secondary tw:btn-sm"
hx-get="{% url 'transactions_bulk_delete' %}"
hx-include=".transaction"
hx-trigger="confirmed"
@@ -58,10 +58,10 @@
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 text-danger"></i>
<i class="fa-solid fa-trash tw:text-error"></i>
</button>
<div class="vr tw:align-middle"></div>
<div class="btn-group"
<div class="tw:divider tw:divider-horizontal tw:m-0"></div>
<div class="tw:dropdown tw:dropdown-end"
_="on selected_transactions_updated from #actions-bar
set realTotal to math.bignumber(0)
set flatTotal to math.bignumber(0)
@@ -99,29 +99,28 @@
put mean.toLocaleString(undefined, {minimumFractionDigits: 0, maximumFractionDigits: 40}) into #calc-menu-mean's innerText
put flatAmountValues.length.toLocaleString(undefined, {minimumFractionDigits: 0, maximumFractionDigits: 40}) into #calc-menu-count's innerText
end">
<button class="btn btn-secondary btn-sm" _="on click
<button class="tw:btn tw:btn-secondary tw:btn-sm" _="on click
set original_value to #real-total-front's innerText
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 text-primary"></i>
<span class="d-none d-md-inline-block" id="real-total-front">0</span>
<i class="fa-solid fa-plus fa-fw tw:me-md-2 tw:text-primary"></i>
<span class="tw:hidden tw:md:inline-block" id="real-total-front">0</span>
</button>
<button type="button" class="btn btn-sm btn-secondary dropdown-toggle dropdown-toggle-split"
data-bs-toggle="dropdown" aria-expanded="false" data-bs-auto-close="outside">
<span class="visually-hidden">{% trans "Toggle Dropdown" %}</span>
<button type="button" tabindex="0" role="button" class="tw:btn tw:btn-sm tw:btn-secondary">
<i class="fa-solid fa-chevron-down fa-xs"></i>
</button>
<ul class="dropdown-menu">
<ul tabindex="0" class="tw:dropdown-content tw:menu tw:bg-base-100 tw:rounded-box tw:z-[1] tw:w-52 tw:shadow">
<li>
<div class="dropdown-item-text p-0">
<div class="tw:p-0">
<div>
<div class="text-body-secondary tw:text-xs tw:font-medium px-3">
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
{% trans "Flat Total" %}
</div>
<div class="dropdown-item px-3 tw:cursor-pointer"
<a class="tw:px-3 tw:cursor-pointer"
id="calc-menu-flat-total"
_="on click
set original_value to my innerText
@@ -131,17 +130,17 @@
put original_value into me
end">
0
</div>
</a>
</div>
</div>
</li>
<li>
<div class="dropdown-item-text p-0">
<div class="tw:p-0">
<div>
<div class="text-body-secondary tw:text-xs tw:font-medium px-3">
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
{% trans "Real Total" %}
</div>
<div class="dropdown-item px-3 tw:cursor-pointer"
<a class="tw:px-3 tw:cursor-pointer"
id="calc-menu-real-total"
_="on click
set original_value to my innerText
@@ -151,17 +150,17 @@
put original_value into me
end">
0
</div>
</a>
</div>
</div>
</li>
<li>
<div class="dropdown-item-text p-0">
<div class="tw:p-0">
<div>
<div class="text-body-secondary tw:text-xs tw:font-medium px-3">
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
{% trans "Mean" %}
</div>
<div class="dropdown-item px-3 tw:cursor-pointer"
<a class="tw:px-3 tw:cursor-pointer"
id="calc-menu-mean"
_="on click
set original_value to my innerText
@@ -171,17 +170,17 @@
put original_value into me
end">
0
</div>
</a>
</div>
</div>
</li>
<li>
<div class="dropdown-item-text p-0">
<div class="tw:p-0">
<div>
<div class="text-body-secondary tw:text-xs tw:font-medium px-3">
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
{% trans "Max" %}
</div>
<div class="dropdown-item px-3 tw:cursor-pointer"
<a class="tw:px-3 tw:cursor-pointer"
id="calc-menu-max"
_="on click
set original_value to my innerText
@@ -191,17 +190,17 @@
put original_value into me
end">
0
</div>
</a>
</div>
</div>
</li>
<li>
<div class="dropdown-item-text p-0">
<div class="tw:p-0">
<div>
<div class="text-body-secondary tw:text-xs tw:font-medium px-3">
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
{% trans "Min" %}
</div>
<div class="dropdown-item px-3 tw:cursor-pointer"
<a class="tw:px-3 tw:cursor-pointer"
id="calc-menu-min"
_="on click
set original_value to my innerText
@@ -211,17 +210,17 @@
put original_value into me
end">
0
</div>
</a>
</div>
</div>
</li>
<li>
<div class="dropdown-item-text p-0">
<div class="tw:p-0">
<div>
<div class="text-body-secondary tw:text-xs tw:font-medium px-3">
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
{% trans "Count" %}
</div>
<div class="dropdown-item px-3 tw:cursor-pointer"
<a class="tw:px-3 tw:cursor-pointer"
id="calc-menu-count"
_="on click
set original_value to my innerText
@@ -231,7 +230,7 @@
put original_value into me
end">
0
</div>
</a>
</div>
</div>
</li>
+3 -3
View File
@@ -1,8 +1,8 @@
{% spaceless %}
{% load i18n %}
<span class="tw:text-xs text-white-50 mx-1"
data-bs-toggle="tooltip"
data-bs-title="{{ content }}">
<div class="tw:tooltip" data-tip="{{ content }}">
<span class="tw:text-xs tw:text-base-content/50 tw:mx-3">
<i class="{% if not icon %}fa-solid fa-circle-question{% else %}{{ icon }}{% endif %} fa-fw"></i>
</span>
</div>
{% endspaceless %}
+5 -5
View File
@@ -1,9 +1,9 @@
<div class="card tw:relative h-100 shadow">
<div class="tw:absolute tw:h-8 tw:w-8 tw:right-2 tw:top-2 tw:bg-{{ color }}-300 tw:text-{{ color }}-800 text-center align-items-center d-flex justify-content-center rounded-2">
{% if icon %}<i class="{{ icon }}"></i>{% else %}<span class="fw-bold">{{ title.0 }}</span>{% endif %}
<div class="tw:card tw:relative tw:h-full tw:shadow tw:bg-base-300">
<div class="tw:absolute tw:h-8 tw:w-8 tw:right-2 tw:top-2 tw:bg-{{ color }}-300 tw:text-{{ color }}-800 tw:text-center tw:flex tw:items-center tw:justify-center tw:rounded-lg">
{% if icon %}<i class="{{ icon }}"></i>{% else %}<span class="tw:font-bold">{{ title.0 }}</span>{% endif %}
</div>
<div class="card-body">
<h5 class="tw:text-{{ color }}-400 fw-bold tw:mr-[50px] {{ title_css_classes }}" {{ attrs }}>{{ title }}{% if help_text %}<c-ui.help-icon :content="help_text" icon=""></c-ui.help-icon>{% endif %}</h5>
<div class="tw:card-body">
<h5 class="tw:text-{{ color }}-400 tw:font-bold tw:mr-[50px] {{ title_css_classes }}" {{ attrs }}>{{ title }}{% if help_text %}<c-ui.help-icon :content="help_text" icon=""></c-ui.help-icon>{% endif %}</h5>
{{ slot }}
</div>
</div>
@@ -1,31 +1,35 @@
{% load i18n %}
<div class="progress-stacked">
<div class="progress position-relative" role="progressbar" aria-label="{% trans 'Projected Income' %} ({{ percentage.percentages.income_projected|floatformat:2 }}%)" aria-valuenow="{{ percentage.percentages.expense_projected|floatformat:0 }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ percentage.percentages.income_projected|floatformat:"2u" }}%">
<div class="progress-bar progress-bar-striped tw:bg-green-300!"
<div class="tw:flex tw:flex-col">
<div class="tw:flex tw:relative" role="progressbar" aria-label="{% trans 'Projected Income' %} ({{ percentage.percentages.income_projected|floatformat:2 }}%)" aria-valuenow="{{ percentage.percentages.expense_projected|floatformat:0 }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ percentage.percentages.income_projected|floatformat:"2u" }}%">
<div class="tw:h-6 tw:bg-green-300 tw:bg-striped"
data-bs-toggle="tooltip"
data-bs-placement="top"
title="{% trans 'Projected Income' %} ({{ percentage.percentages.income_projected|floatformat:2 }}%)">
title="{% trans 'Projected Income' %} ({{ percentage.percentages.income_projected|floatformat:2 }}%)"
style="width: 100%">
</div>
</div>
<div class="progress position-relative" role="progressbar" aria-label="{% trans 'Current Income' %} ({{ percentage.percentages.income_current|floatformat:2 }}%)" aria-valuenow="{{ percentage.percentages.expense_projected|floatformat:0 }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ percentage.percentages.income_current|floatformat:"2u" }}%">
<div class="progress-bar tw:bg-green-400!"
<div class="tw:flex tw:relative" role="progressbar" aria-label="{% trans 'Current Income' %} ({{ percentage.percentages.income_current|floatformat:2 }}%)" aria-valuenow="{{ percentage.percentages.expense_projected|floatformat:0 }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ percentage.percentages.income_current|floatformat:"2u" }}%">
<div class="tw:h-6 tw:bg-green-400"
data-bs-toggle="tooltip"
data-bs-placement="top"
title="{% trans 'Current Income' %} ({{ p.percentages.income_current|floatformat:2 }}%)">
title="{% trans 'Current Income' %} ({{ p.percentages.income_current|floatformat:2 }}%)"
style="width: 100%">
</div>
</div>
<div class="progress position-relative" role="progressbar" aria-label="{% trans 'Projected Expenses' %} ({{ percentage.percentages.expense_projected|floatformat:2 }}%)" aria-valuenow="{{ percentage.percentages.expense_projected|floatformat:0 }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ percentage.percentages.expense_projected|floatformat:"2u" }}%">
<div class="progress-bar progress-bar-striped tw:bg-red-300!"
<div class="tw:flex tw:relative" role="progressbar" aria-label="{% trans 'Projected Expenses' %} ({{ percentage.percentages.expense_projected|floatformat:2 }}%)" aria-valuenow="{{ percentage.percentages.expense_projected|floatformat:0 }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ percentage.percentages.expense_projected|floatformat:"2u" }}%">
<div class="tw:h-6 tw:bg-red-300 tw:bg-striped"
data-bs-toggle="tooltip"
data-bs-placement="top"
title="{% trans 'Projected Expenses' %} ({{ percentage.percentages.expense_projected|floatformat:2 }}%)">
title="{% trans 'Projected Expenses' %} ({{ percentage.percentages.expense_projected|floatformat:2 }}%)"
style="width: 100%">
</div>
</div>
<div class="progress position-relative" role="progressbar" aria-label="{% trans 'Current Expenses' %} ({{ percentage.percentages.expense_current|floatformat:2 }}%)" aria-valuenow="{{ percentage.percentages.expense_projected|floatformat:0 }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ percentage.percentages.expense_current|floatformat:"2u" }}%">
<div class="progress-bar tw:bg-red-400!"
<div class="tw:flex tw:relative" role="progressbar" aria-label="{% trans 'Current Expenses' %} ({{ percentage.percentages.expense_current|floatformat:2 }}%)" aria-valuenow="{{ percentage.percentages.expense_projected|floatformat:0 }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ percentage.percentages.expense_current|floatformat:"2u" }}%">
<div class="tw:h-6 tw:bg-red-400"
data-bs-toggle="tooltip"
data-bs-placement="top"
title="{% trans 'Current Expenses' %} ({{ percentage.percentages.expense_current|floatformat:2 }}%)">
title="{% trans 'Current Expenses' %} ({{ percentage.percentages.expense_current|floatformat:2 }}%)"
style="width: 100%">
</div>
</div>
</div>
@@ -1,49 +1,49 @@
{% load i18n %}
<div class="d-grid gap-2 d-xl-flex justify-content-xl-end">
<div class="d-grid gap-2 d-xl-flex flex-wrap justify-content-xl-center">
<button class="btn btn-sm btn-outline-success"
<div class="tw:grid tw:gap-2 tw:grid-cols-1 tw:xl:flex tw:xl:justify-end">
<div class="tw:grid tw:gap-2 tw:xl:flex tw:flex-wrap tw:xl:justify-center">
<button class="tw:btn tw:btn-sm tw:btn-outline tw:btn-success"
hx-get="{% url 'transaction_add' %}"
hx-target="#generic-offcanvas"
hx-trigger="click, add_income from:window"
hx-vals='{"year": {{ year }}, {% if month %}"month": {{ month }},{% endif %} "type": "IN"}'>
<i class="fa-solid fa-arrow-right-to-bracket me-2"></i>
<i class="fa-solid fa-arrow-right-to-bracket tw:me-2"></i>
{% translate "Income" %}
</button>
<button class="btn btn-sm btn-outline-danger"
<button class="tw:btn tw:btn-sm tw:btn-outline tw:btn-error"
hx-get="{% url 'transaction_add' %}"
hx-target="#generic-offcanvas"
hx-trigger="click, add_expense from:window"
hx-vals='{"year": {{ year }}, {% if month %}"month": {{ month }},{% endif %} "type": "EX"}'>
<i class="fa-solid fa-arrow-right-from-bracket me-2"></i>
<i class="fa-solid fa-arrow-right-from-bracket tw:me-2"></i>
{% translate "Expense" %}
</button>
<button class="btn btn-sm btn-outline-warning"
<button class="tw:btn tw:btn-sm tw:btn-outline tw:btn-warning"
hx-get="{% url 'installment_plan_add' %}"
hx-trigger="click, installment from:window"
hx-target="#generic-offcanvas">
<i class="fa-solid fa-divide me-2"></i>
<i class="fa-solid fa-divide tw:me-2"></i>
{% translate "Installment" %}
</button>
<button class="btn btn-sm btn-outline-warning"
<button class="tw:btn tw:btn-sm tw:btn-outline tw:btn-warning"
hx-get="{% url 'recurring_transaction_add' %}"
hx-trigger="click, balance from:window"
hx-target="#generic-offcanvas">
<i class="fa-solid fa-repeat me-2"></i>
<i class="fa-solid fa-repeat tw:me-2"></i>
{% translate "Recurring" %}
</button>
<button class="btn btn-sm btn-outline-info"
<button class="tw:btn tw:btn-sm tw:btn-outline tw:btn-info"
hx-get="{% url 'transactions_transfer' %}"
hx-target="#generic-offcanvas"
hx-trigger="click, add_transfer from:window"
hx-vals='{"year": {{ year }} {% if month %}, "month": {{ month }}{% endif %}}'>
<i class="fa-solid fa-money-bill-transfer me-2"></i>
<i class="fa-solid fa-money-bill-transfer tw:me-2"></i>
{% translate "Transfer" %}
</button>
<button class="btn btn-sm btn-outline-info"
<button class="tw:btn tw:btn-sm tw:btn-outline tw:btn-info"
hx-get="{% url 'account_reconciliation' %}"
hx-trigger="click, balance from:window"
hx-target="#generic-offcanvas">
<i class="fa-solid fa-scale-balanced me-2"></i>
<i class="fa-solid fa-scale-balanced tw:me-2"></i>
{% translate "Balance" %}
</button>
</div>
@@ -1,5 +1,5 @@
{% load i18n %}
<div class="tw:sticky tw:bottom-4 tw:left-0 tw:right-0 tw:z-50 tw:hidden mx-auto tw:w-fit" id="actions-bar"
<div class="tw:sticky tw:bottom-4 tw:left-0 tw:right-0 tw:z-50 tw:hidden tw:mx-auto tw:w-fit" id="actions-bar"
_="on change from #transactions-list or htmx:afterSettle from window
if #actions-bar then
if no <input[type='checkbox']:checked/> in #transactions-list
@@ -17,34 +17,34 @@
end
end
end">
<div class="card slide-in-bottom tw:max-w-[90vw]">
<div class="card-body p-2 d-flex justify-content-between align-items-center gap-3 tw:overflow-x-auto">
<div class="tw:card tw:bg-base-300 tw:shadow slide-in-bottom tw:max-w-[90vw] tw:card-border">
<div class="tw:card-body tw:flex-row tw:p-2 tw:flex tw:justify-between tw:items-center tw:gap-3 tw:overflow-x-auto">
{% spaceless %}
<div class="tw:font-bold tw:text-md ms-2" id="selected-count">0</div>
<div class="vr tw:align-middle"></div>
<div class="dropdown">
<button class="btn btn-secondary btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown"
aria-expanded="false" data-bs-popper-config='{"strategy":"fixed"}'>
<div class="tw:font-bold tw:text-md tw:ms-2" id="selected-count">0</div>
<div class="tw:divider tw:divider-horizontal tw:m-0"></div>
<div class="tw:dropdown tw:dropdown-top tw:dropdown-end">
<button tabindex="0" role="button" class="tw:btn tw:btn-secondary tw:btn-sm" type="button">
<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">
<ul tabindex="0" class="tw:dropdown-content tw:menu tw:bg-base-300 tw:rounded-box tw:z-[1] tw:w-full tw:p-2 tw:shadow tw:fixed!">
<li>
<div class="dropdown-item px-3 tw:cursor-pointer"
<a class="tw: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 tw:text-green-400 me-3"></i>{% translate 'Select All' %}
</div>
<i class="fa-regular fa-square-check tw:text-green-400 tw:me-3"></i>{% translate 'Select All' %}
</a>
</li>
<li>
<div class="dropdown-item px-3 tw:cursor-pointer"
<a class="tw: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 tw:text-red-400 me-3"></i>{% translate 'Unselect All' %}
</div>
<i class="fa-regular fa-square tw:text-red-400 tw:me-3"></i>{% translate 'Unselect All' %}
</a>
</li>
</ul>
</div>
<div class="vr tw:align-middle"></div>
<div class="btn-group">
<button class="btn btn-secondary btn-sm"
<div class="tw:divider tw:divider-horizontal tw:m-0"></div>
<div class="tw:join">
<button class="tw:btn tw:btn-secondary tw:join-item tw:btn-sm"
hx-get="{% url 'transactions_bulk_edit' %}"
hx-target="#generic-offcanvas"
hx-include=".transaction"
@@ -52,37 +52,37 @@
data-bs-title="{% translate 'Edit' %}">
<i class="fa-solid fa-pencil"></i>
</button>
<button type="button" class="btn btn-sm btn-secondary dropdown-toggle dropdown-toggle-split"
data-bs-toggle="dropdown" data-bs-popper-config='{"strategy":"fixed"}' aria-expanded="false"
data-bs-auto-close="outside">
<span class="visually-hidden">{% trans "Toggle Dropdown" %}</span>
</button>
<div class="tw:dropdown tw:dropdown-top tw:dropdown-end">
<button type="button" tabindex="0" role="button" class="tw:join-item tw:btn tw:btn-sm tw:btn-secondary">
<i class="fa-solid fa-chevron-down fa-xs"></i>
</button>
<ul class="dropdown-menu">
<li>
<div class="dropdown-item px-3 tw:cursor-pointer"
hx-get="{% url 'transactions_bulk_unpay' %}"
hx-include=".transaction">
<i class="fa-regular fa-circle tw:text-red-400 fa-fw me-3"></i>{% translate 'Mark as unpaid' %}
</div>
</li>
<li>
<div class="dropdown-item px-3 tw:cursor-pointer"
hx-get="{% url 'transactions_bulk_pay' %}"
hx-include=".transaction">
<i class="fa-regular fa-circle-check tw:text-green-400 fa-fw me-3"></i>{% translate 'Mark as paid' %}
</div>
</li>
</ul>
<ul tabindex="0" class="tw:dropdown-content tw:fixed! tw:menu tw:bg-base-300 tw:rounded-box tw:z-[1] tw:w-full tw:p-2 tw:shadow">
<li>
<a class="tw:cursor-pointer"
hx-get="{% url 'transactions_bulk_unpay' %}"
hx-include=".transaction">
<i class="fa-regular fa-circle tw:text-red-400 fa-fw tw:me-3"></i>{% translate 'Mark as unpaid' %}
</a>
</li>
<li>
<a class="tw:cursor-pointer"
hx-get="{% url 'transactions_bulk_pay' %}"
hx-include=".transaction">
<i class="fa-regular fa-circle-check tw:text-green-400 fa-fw tw:me-3"></i>{% translate 'Mark as paid' %}
</a>
</li>
</ul>
</div>
</div>
<button class="btn btn-secondary btn-sm"
<button class="tw:btn tw:btn-secondary tw:btn-sm"
hx-get="{% url 'transactions_bulk_clone' %}"
hx-include=".transaction"
data-bs-toggle="tooltip"
data-bs-title="{% translate 'Duplicate' %}">
<i class="fa-solid fa-clone fa-fw"></i>
</button>
<button class="btn btn-secondary btn-sm"
<button class="tw:btn tw:btn-secondary tw:btn-sm"
hx-get="{% url 'transactions_bulk_delete' %}"
hx-include=".transaction"
hx-trigger="confirmed"
@@ -93,10 +93,10 @@
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 text-danger"></i>
<i class="fa-solid fa-trash tw:text-error"></i>
</button>
<div class="vr tw:align-middle"></div>
<div class="btn-group"
<div class="tw:divider tw:divider-horizontal tw:m-0"></div>
<div class="tw:join"
_="on selected_transactions_updated from #actions-bar
set realTotal to math.bignumber(0)
set flatTotal to math.bignumber(0)
@@ -134,144 +134,145 @@
put mean.toLocaleString(undefined, {minimumFractionDigits: 0, maximumFractionDigits: 40}) into #calc-menu-mean's innerText
put flatAmountValues.length.toLocaleString(undefined, {minimumFractionDigits: 0, maximumFractionDigits: 40}) into #calc-menu-count's innerText
end">
<button class="btn btn-secondary btn-sm" _="on click
<button class="tw:btn tw:btn-secondary tw:btn-sm tw:join-item"
_="on click
set original_value to #real-total-front's innerText
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 text-primary"></i>
<span class="d-none d-md-inline-block" id="real-total-front">0</span>
</button>
<button type="button" class="btn btn-sm btn-secondary dropdown-toggle dropdown-toggle-split"
data-bs-toggle="dropdown" aria-expanded="false" data-bs-auto-close="outside"
data-bs-popper-config='{"strategy":"fixed"}'>
<span class="visually-hidden">{% trans "Toggle Dropdown" %}</span>
<i class="fa-solid fa-plus fa-fw tw:me-md-2 tw:text-primary"></i>
<span class="tw:hidden tw:md:inline-block" id="real-total-front">0</span>
</button>
<div class="tw:dropdown tw:dropdown-end tw:dropdown-top">
<button type="button" tabindex="0" role="button" class="tw:join-item tw:btn tw:btn-sm tw:btn-secondary">
<i class="fa-solid fa-chevron-down fa-xs"></i>
</button>
<ul class="dropdown-menu">
<li>
<div class="dropdown-item-text p-0">
<div>
<div class="text-body-secondary tw:text-xs tw:font-medium px-3">
{% trans "Flat Total" %}
</div>
<div class="dropdown-item px-3 tw:cursor-pointer"
id="calc-menu-flat-total"
_="on click
set original_value to my innerText
writeText(my innerText) on navigator.clipboard
put '{% translate "copied!" %}' into me
wait 1s
put original_value into me
end">
0
<ul tabindex="0" class="tw:dropdown-content tw:menu tw:bg-base-300 tw:rounded-box tw:z-[1] tw:w-full tw:shadow tw:fixed!">
<li class="tw:cursor-pointer"
_="on click
set original_value to #calc-menu-flat-total's innerText
writeText(original_value) on navigator.clipboard
put '{% translate "copied!" %}' into #calc-menu-flat-total
wait 1s
put original_value into #calc-menu-flat-total
end">
<div class="tw:p-0">
<div>
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
{% trans "Flat Total" %}
</div>
<div class="tw:px-3"
id="calc-menu-flat-total">
0
</div>
</div>
</div>
</div>
</li>
<li>
<div class="dropdown-item-text p-0">
<div>
<div class="text-body-secondary tw:text-xs tw:font-medium px-3">
{% trans "Real Total" %}
</div>
<div class="dropdown-item px-3 tw:cursor-pointer"
id="calc-menu-real-total"
_="on click
set original_value to my innerText
writeText(my innerText) on navigator.clipboard
put '{% translate "copied!" %}' into me
wait 1s
put original_value into me
end">
0
</li>
<li class="tw:cursor-pointer"
_="on click
set original_value to #calc-menu-real-total's innerText
writeText(original_value) on navigator.clipboard
put '{% translate "copied!" %}' into #calc-menu-real-total
wait 1s
put original_value into #calc-menu-real-total
end">
<div class="tw:p-0">
<div>
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
{% trans "Real Total" %}
</div>
<div class="tw:px-3"
id="calc-menu-real-total">
0
</div>
</div>
</div>
</div>
</li>
<li>
<div class="dropdown-item-text p-0">
<div>
<div class="text-body-secondary tw:text-xs tw:font-medium px-3">
{% trans "Mean" %}
</div>
<div class="dropdown-item px-3 tw:cursor-pointer"
id="calc-menu-mean"
_="on click
set original_value to my innerText
writeText(my innerText) on navigator.clipboard
put '{% translate "copied!" %}' into me
wait 1s
put original_value into me
end">
0
</li>
<li class="tw:cursor-pointer"
_="on click
set original_value to #calc-menu-mean's innerText
writeText(original_value) on navigator.clipboard
put '{% translate "copied!" %}' into #calc-menu-mean
wait 1s
put original_value into #calc-menu-mean
end">
<div class="tw:p-0">
<div>
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
{% trans "Mean" %}
</div>
<div class="tw:px-3"
id="calc-menu-mean">
0
</div>
</div>
</div>
</div>
</li>
<li>
<div class="dropdown-item-text p-0">
<div>
<div class="text-body-secondary tw:text-xs tw:font-medium px-3">
{% trans "Max" %}
</div>
<div class="dropdown-item px-3 tw:cursor-pointer"
id="calc-menu-max"
_="on click
set original_value to my innerText
writeText(my innerText) on navigator.clipboard
put '{% translate "copied!" %}' into me
wait 1s
put original_value into me
end">
0
</li>
<li class="tw:cursor-pointer"
_="on click
set original_value to #calc-menu-max's innerText
writeText(original_value) on navigator.clipboard
put '{% translate "copied!" %}' into #calc-menu-max
wait 1s
put original_value into #calc-menu-max
end">
<div class="tw:p-0">
<div>
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
{% trans "Max" %}
</div>
<div class="tw:px-3"
id="calc-menu-max">
0
</div>
</div>
</div>
</div>
</li>
<li>
<div class="dropdown-item-text p-0">
<div>
<div class="text-body-secondary tw:text-xs tw:font-medium px-3">
{% trans "Min" %}
</div>
<div class="dropdown-item px-3 tw:cursor-pointer"
id="calc-menu-min"
_="on click
set original_value to my innerText
writeText(my innerText) on navigator.clipboard
put '{% translate "copied!" %}' into me
wait 1s
put original_value into me
end">
0
</li>
<li class="tw:cursor-pointer"
_="on click
set original_value to #calc-menu-min's innerText
writeText(original_value) on navigator.clipboard
put '{% translate "copied!" %}' into #calc-menu-min
wait 1s
put original_value into #calc-menu-min
end">
<div class="tw:p-0">
<div>
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
{% trans "Min" %}
</div>
<div class="tw:px-3"
id="calc-menu-min">
0
</div>
</div>
</div>
</div>
</li>
<li>
<div class="dropdown-item-text p-0">
<div>
<div class="text-body-secondary tw:text-xs tw:font-medium px-3">
{% trans "Count" %}
</div>
<div class="dropdown-item px-3 tw:cursor-pointer"
id="calc-menu-count"
_="on click
set original_value to my innerText
writeText(my innerText) on navigator.clipboard
put '{% translate "copied!" %}' into me
wait 1s
put original_value into me
end">
0
</li>
<li class="tw:cursor-pointer"
_="on click
set original_value to #calc-menu-count's innerText
writeText(original_value) on navigator.clipboard
put '{% translate "copied!" %}' into #calc-menu-count
wait 1s
put original_value into #calc-menu-count
end">
<div class="tw:p-0">
<div>
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
{% trans "Count" %}
</div>
<div class="tw:px-3"
id="calc-menu-count">
0
</div>
</div>
</div>
</div>
</li>
</ul>
</li>
</ul>
</div>
</div>
{% endspaceless %}
</div>
@@ -10,7 +10,7 @@
title="{% translate "Income" %}"></c-components.fab_menu_button>
<c-components.fab_menu_button
color="danger"
color="error"
hx_target="#generic-offcanvas"
hx_trigger="click, add_income from:window"
hx_vals='{"year": {{ year }}, {% if month %}"month": {{ month }},{% endif %} "type": "EX"}'