mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-12 07:42:53 +02:00
feat: first batch of work
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
{% load tools %}
|
||||
{% load i18n %}
|
||||
<div class="col tw:card tw:bg-base-100 tw:shadow-xl">
|
||||
<div class="tw:card-body">
|
||||
<div class="card bg-base-100 shadow-md card-border border-base-300">
|
||||
<div class="card-body">
|
||||
{% if account.account.group %}
|
||||
<div class="tw:text-sm tw:mb-2">
|
||||
<span class="tw:badge tw:badge-primary">{{ account.account.group }}</span>
|
||||
<div class="text-sm mb-2">
|
||||
<span class="badge badge-primary">{{ account.account.group }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
<h5 class="tw:card-title">
|
||||
<h5 class="card-title">
|
||||
{{ account.account.name }}
|
||||
</h5>
|
||||
<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 class="flex justify-between items-baseline mt-2">
|
||||
<div class="text-end font-mono">
|
||||
<div class="text-gray-400">{% translate 'projected income' %}</div>
|
||||
</div>
|
||||
<div class="dotted-line tw:flex-grow"></div>
|
||||
<div class="dotted-line flex-grow"></div>
|
||||
{% if account.income_projected != 0 %}
|
||||
<div class="tw:text-end tw:font-mono tw:text-green-400">
|
||||
<div class="text-end font-mono 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="tw:text-end tw:font-mono">-</div>
|
||||
<div class="text-end font-mono">-</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if account.exchanged and account.exchanged.income_projected %}
|
||||
<div class="tw:text-end tw:font-mono tw:text-gray-500">
|
||||
<div class="text-end font-mono 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="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 class="flex justify-between items-baseline mt-2">
|
||||
<div class="text-end font-mono">
|
||||
<div class="text-gray-400">{% translate 'projected expenses' %}</div>
|
||||
</div>
|
||||
<div class="dotted-line tw:flex-grow"></div>
|
||||
<div class="dotted-line flex-grow"></div>
|
||||
<div>
|
||||
{% if account.expense_projected != 0 %}
|
||||
<div class="tw:text-end tw:font-mono tw:text-red-400">
|
||||
<div class="text-end font-mono 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="tw:text-end tw:font-mono">-</div>
|
||||
<div class="text-end font-mono">-</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if account.exchanged and account.exchanged.expense_projected %}
|
||||
<div class="tw:text-end tw:font-mono tw:text-gray-500">
|
||||
<div class="text-end font-mono 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="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 class="flex justify-between items-baseline mt-2">
|
||||
<div class="text-end font-mono">
|
||||
<div class="text-gray-400">{% translate 'projected total' %}</div>
|
||||
</div>
|
||||
<div class="dotted-line tw:flex-grow"></div>
|
||||
<div class="dotted-line flex-grow"></div>
|
||||
<div
|
||||
class="tw:text-end tw:font-mono">
|
||||
class="text-end 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="tw:text-end tw:font-mono tw:text-gray-500">
|
||||
<div class="text-end font-mono 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="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>
|
||||
<hr class="my-3">
|
||||
<div class="flex justify-between items-baseline mt-2">
|
||||
<div class="text-end font-mono">
|
||||
<div class="text-gray-400">{% translate 'current income' %}</div>
|
||||
</div>
|
||||
<div class="dotted-line tw:flex-grow"></div>
|
||||
<div class="dotted-line flex-grow"></div>
|
||||
{% if account.income_current != 0 %}
|
||||
<div class="tw:text-end tw:font-mono tw:text-green-400">
|
||||
<div class="text-end font-mono 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="tw:text-end tw:font-mono">-</div>
|
||||
<div class="text-end font-mono">-</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if account.exchanged and account.exchanged.income_current %}
|
||||
<div class="tw:text-end tw:font-mono tw:text-gray-500">
|
||||
<div class="text-end font-mono 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="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 class="flex justify-between items-baseline mt-2">
|
||||
<div class="text-end font-mono">
|
||||
<div class="text-gray-400">{% translate 'current expenses' %}</div>
|
||||
</div>
|
||||
<div class="dotted-line tw:flex-grow"></div>
|
||||
<div class="dotted-line flex-grow"></div>
|
||||
{% if account.expense_current != 0 %}
|
||||
<div class="tw:text-end tw:font-mono tw:text-red-400">
|
||||
<div class="text-end font-mono 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="tw:text-end tw:font-mono">-</div>
|
||||
<div class="text-end font-mono">-</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if account.exchanged and account.exchanged.expense_current %}
|
||||
<div class="tw:text-end tw:font-mono tw:text-gray-500">
|
||||
<div class="text-end font-mono 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="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 class="flex justify-between items-baseline mt-2">
|
||||
<div class="text-end font-mono">
|
||||
<div class="text-gray-400">{% translate 'current total' %}</div>
|
||||
</div>
|
||||
<div class="dotted-line tw:flex-grow"></div>
|
||||
<div class="tw:text-end tw:font-mono">
|
||||
<div class="dotted-line flex-grow"></div>
|
||||
<div class="text-end 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="tw:text-end tw:font-mono tw:text-gray-500">
|
||||
<div class="text-end font-mono 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="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>
|
||||
<hr class="my-3">
|
||||
<div class="flex justify-between items-baseline mt-2">
|
||||
<div class="text-end font-mono">
|
||||
<div class="text-gray-400">{% translate 'final total' %}</div>
|
||||
</div>
|
||||
<div class="dotted-line tw:flex-grow"></div>
|
||||
<div class="tw:text-end tw:font-mono">
|
||||
<div class="dotted-line flex-grow"></div>
|
||||
<div class="text-end 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="tw:text-end tw:font-mono tw:text-gray-500">
|
||||
<div class="text-end font-mono 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="tw:my-3">
|
||||
<div class="my-3">
|
||||
<c-ui.percentage-distribution :percentage="p"></c-ui.percentage-distribution>
|
||||
</div>
|
||||
{% endwith %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="tw:card tw:bg-base-100 tw:shadow-xl tw:relative tw:h-full">
|
||||
<div class="tw:card-body">
|
||||
<div class="card bg-base-100 shadow-xl relative h-full">
|
||||
<div class="card-body">
|
||||
{{ slot }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{% load tools %}
|
||||
{% load i18n %}
|
||||
<div class="col tw:card tw:bg-base-100 tw:shadow-xl">
|
||||
<div class="tw:card-body">
|
||||
<h5 class="tw:card-title">
|
||||
<div class="col card bg-base-100 shadow card-border">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">
|
||||
{{ currency.currency.name }}
|
||||
</h5>
|
||||
<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 class="flex justify-between items-baseline mt-2">
|
||||
<div class="text-end font-mono">
|
||||
<div class="text-gray-400">{% translate 'projected income' %}</div>
|
||||
</div>
|
||||
<div class="dotted-line tw:flex-grow"></div>
|
||||
<div class="dotted-line flex-grow"></div>
|
||||
{% if currency.income_projected != 0 %}
|
||||
<div class="tw:text-end tw:font-mono tw:text-green-400">
|
||||
<div class="text-end font-mono 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="tw:text-end tw:font-mono">-</div>
|
||||
<div class="text-end font-mono">-</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if currency.exchanged and currency.exchanged.income_projected %}
|
||||
<div class="tw:text-end tw:font-mono tw:text-gray-500">
|
||||
<div class="text-end font-mono 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="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 class="flex justify-between items-baseline mt-2">
|
||||
<div class="text-end font-mono">
|
||||
<div class="text-gray-400">{% translate 'projected expenses' %}</div>
|
||||
</div>
|
||||
<div class="dotted-line tw:flex-grow"></div>
|
||||
<div class="dotted-line flex-grow"></div>
|
||||
<div>
|
||||
{% if currency.expense_projected != 0 %}
|
||||
<div class="tw:text-end tw:font-mono tw:text-red-400">
|
||||
<div class="text-end font-mono 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="tw:text-end tw:font-mono">-</div>
|
||||
<div class="text-end font-mono">-</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if currency.exchanged and currency.exchanged.expense_projected %}
|
||||
<div class="tw:text-end tw:font-mono tw:text-gray-500">
|
||||
<div class="text-end font-mono 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="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 class="flex justify-between items-baseline mt-2">
|
||||
<div class="text-end font-mono">
|
||||
<div class="text-gray-400">{% translate 'projected total' %}</div>
|
||||
</div>
|
||||
<div class="dotted-line tw:flex-grow"></div>
|
||||
<div class="tw:text-end tw:font-mono">
|
||||
<div class="dotted-line flex-grow"></div>
|
||||
<div class="text-end 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="tw:text-end tw:font-mono tw:text-gray-500">
|
||||
<div class="text-end font-mono 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="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>
|
||||
<hr class="my-3">
|
||||
<div class="flex justify-between items-baseline mt-2">
|
||||
<div class="text-end font-mono">
|
||||
<div class="text-gray-400">{% translate 'current income' %}</div>
|
||||
</div>
|
||||
<div class="dotted-line tw:flex-grow"></div>
|
||||
<div class="dotted-line flex-grow"></div>
|
||||
{% if currency.income_current != 0 %}
|
||||
<div class="tw:text-end tw:font-mono tw:text-green-400">
|
||||
<div class="text-end font-mono 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="tw:text-end tw:font-mono">-</div>
|
||||
<div class="text-end font-mono">-</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if currency.exchanged and currency.exchanged.income_current %}
|
||||
<div class="tw:text-end tw:font-mono tw:text-gray-500">
|
||||
<div class="text-end font-mono 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="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 class="flex justify-between items-baseline mt-2">
|
||||
<div class="text-end font-mono">
|
||||
<div class="text-gray-400">{% translate 'current expenses' %}</div>
|
||||
</div>
|
||||
<div class="dotted-line tw:flex-grow"></div>
|
||||
<div class="dotted-line flex-grow"></div>
|
||||
{% if currency.expense_current != 0 %}
|
||||
<div class="tw:text-end tw:font-mono tw:text-red-400">
|
||||
<div class="text-end font-mono 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="tw:text-end tw:font-mono">-</div>
|
||||
<div class="text-end font-mono">-</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if currency.exchanged and currency.exchanged.expense_current %}
|
||||
<div class="tw:text-end tw:font-mono tw:text-gray-500">
|
||||
<div class="text-end font-mono 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="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 class="flex justify-between items-baseline mt-2">
|
||||
<div class="text-end font-mono">
|
||||
<div class="text-gray-400">{% translate 'current total' %}</div>
|
||||
</div>
|
||||
<div class="dotted-line tw:flex-grow"></div>
|
||||
<div class="tw:text-end tw:font-mono">
|
||||
<div class="dotted-line flex-grow"></div>
|
||||
<div class="text-end 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="tw:text-end tw:font-mono tw:text-gray-500">
|
||||
<div class="text-end font-mono 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="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>
|
||||
<hr class="my-3">
|
||||
<div class="flex justify-between items-baseline mt-2">
|
||||
<div class="text-end font-mono">
|
||||
<div class="text-gray-400">{% translate 'final total' %}</div>
|
||||
</div>
|
||||
<div class="dotted-line tw:flex-grow"></div>
|
||||
<div class="tw:text-end tw:font-mono">
|
||||
<div class="dotted-line flex-grow"></div>
|
||||
<div class="text-end 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="tw:text-end tw:font-mono tw:text-gray-500">
|
||||
<div class="text-end font-mono 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="tw:my-3">
|
||||
<div class="my-3">
|
||||
<c-ui.percentage-distribution :percentage="p"></c-ui.percentage-distribution>
|
||||
</div>
|
||||
{% endwith %}
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
{% load i18n %}
|
||||
<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"
|
||||
<div class="sticky bottom-4 left-0 right-0 z-50 hidden mx-auto 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
|
||||
if #actions-bar
|
||||
add .slide-in-bottom-reverse then settle
|
||||
then add .tw:hidden to #actions-bar
|
||||
then add .hidden to #actions-bar
|
||||
then remove .slide-in-bottom-reverse
|
||||
end
|
||||
else
|
||||
if #actions-bar
|
||||
remove .tw:hidden from #actions-bar
|
||||
remove .hidden from #actions-bar
|
||||
then trigger selected_transactions_updated
|
||||
end
|
||||
end
|
||||
end
|
||||
end">
|
||||
<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">
|
||||
<div class="card bg-base-100 shadow slide-in-bottom">
|
||||
<div class="card-body p-2 flex justify-between items-center gap-3">
|
||||
{% spaceless %}
|
||||
<div class="tw:dropdown">
|
||||
<button tabindex="0" role="button" class="tw:btn tw:btn-secondary tw:btn-sm" type="button">
|
||||
<div class="dropdown">
|
||||
<button tabindex="0" role="button" class="btn btn-secondary 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 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">
|
||||
<ul tabindex="0" class="dropdown-content menu bg-base-100 rounded-box z-[1] w-52 p-2 shadow">
|
||||
<li>
|
||||
<a class="tw:cursor-pointer"
|
||||
<a class="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 tw:me-3"></i>{% translate 'Select All' %}
|
||||
<i class="fa-regular fa-square-check text-green-400 me-3"></i>{% translate 'Select All' %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="tw:cursor-pointer"
|
||||
<a class="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 tw:me-3"></i>{% translate 'Unselect All' %}
|
||||
<i class="fa-regular fa-square text-red-400 me-3"></i>{% translate 'Unselect All' %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tw:divider tw:divider-horizontal tw:m-0"></div>
|
||||
<button class="tw:btn tw:btn-secondary tw:btn-sm"
|
||||
<div class="divider divider-horizontal m-0"></div>
|
||||
<button class="btn btn-secondary 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="tw:btn tw:btn-secondary tw:btn-sm"
|
||||
<button class="btn btn-secondary 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 tw:text-error"></i>
|
||||
<i class="fa-solid fa-trash text-error"></i>
|
||||
</button>
|
||||
<div class="tw:divider tw:divider-horizontal tw:m-0"></div>
|
||||
<div class="tw:dropdown tw:dropdown-end"
|
||||
<div class="divider divider-horizontal m-0"></div>
|
||||
<div class="dropdown dropdown-end"
|
||||
_="on selected_transactions_updated from #actions-bar
|
||||
set realTotal to math.bignumber(0)
|
||||
set flatTotal to math.bignumber(0)
|
||||
@@ -99,28 +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="tw:btn tw:btn-secondary tw:btn-sm" _="on click
|
||||
<button class="btn btn-secondary 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 tw:me-md-2 tw:text-primary"></i>
|
||||
<span class="tw:hidden tw:md:inline-block" id="real-total-front">0</span>
|
||||
<i class="fa-solid fa-plus fa-fw me-md-2 text-primary"></i>
|
||||
<span class="hidden md:inline-block" id="real-total-front">0</span>
|
||||
</button>
|
||||
<button type="button" tabindex="0" role="button" class="tw:btn tw:btn-sm tw:btn-secondary">
|
||||
<button type="button" tabindex="0" role="button" class="btn btn-sm btn-secondary">
|
||||
<i class="fa-solid fa-chevron-down fa-xs"></i>
|
||||
</button>
|
||||
|
||||
<ul tabindex="0" class="tw:dropdown-content tw:menu tw:bg-base-100 tw:rounded-box tw:z-[1] tw:w-52 tw:shadow">
|
||||
<ul tabindex="0" class="dropdown-content menu bg-base-100 rounded-box z-[1] w-52 shadow">
|
||||
<li>
|
||||
<div class="tw:p-0">
|
||||
<div class="p-0">
|
||||
<div>
|
||||
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
|
||||
<div class="text-base-content/60 text-xs font-medium px-3">
|
||||
{% trans "Flat Total" %}
|
||||
</div>
|
||||
<a class="tw:px-3 tw:cursor-pointer"
|
||||
<a class="px-3 cursor-pointer"
|
||||
id="calc-menu-flat-total"
|
||||
_="on click
|
||||
set original_value to my innerText
|
||||
@@ -135,12 +135,12 @@
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="tw:p-0">
|
||||
<div class="p-0">
|
||||
<div>
|
||||
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
|
||||
<div class="text-base-content/60 text-xs font-medium px-3">
|
||||
{% trans "Real Total" %}
|
||||
</div>
|
||||
<a class="tw:px-3 tw:cursor-pointer"
|
||||
<a class="px-3 cursor-pointer"
|
||||
id="calc-menu-real-total"
|
||||
_="on click
|
||||
set original_value to my innerText
|
||||
@@ -155,12 +155,12 @@
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="tw:p-0">
|
||||
<div class="p-0">
|
||||
<div>
|
||||
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
|
||||
<div class="text-base-content/60 text-xs font-medium px-3">
|
||||
{% trans "Mean" %}
|
||||
</div>
|
||||
<a class="tw:px-3 tw:cursor-pointer"
|
||||
<a class="px-3 cursor-pointer"
|
||||
id="calc-menu-mean"
|
||||
_="on click
|
||||
set original_value to my innerText
|
||||
@@ -175,12 +175,12 @@
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="tw:p-0">
|
||||
<div class="p-0">
|
||||
<div>
|
||||
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
|
||||
<div class="text-base-content/60 text-xs font-medium px-3">
|
||||
{% trans "Max" %}
|
||||
</div>
|
||||
<a class="tw:px-3 tw:cursor-pointer"
|
||||
<a class="px-3 cursor-pointer"
|
||||
id="calc-menu-max"
|
||||
_="on click
|
||||
set original_value to my innerText
|
||||
@@ -195,12 +195,12 @@
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="tw:p-0">
|
||||
<div class="p-0">
|
||||
<div>
|
||||
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
|
||||
<div class="text-base-content/60 text-xs font-medium px-3">
|
||||
{% trans "Min" %}
|
||||
</div>
|
||||
<a class="tw:px-3 tw:cursor-pointer"
|
||||
<a class="px-3 cursor-pointer"
|
||||
id="calc-menu-min"
|
||||
_="on click
|
||||
set original_value to my innerText
|
||||
@@ -215,12 +215,12 @@
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="tw:p-0">
|
||||
<div class="p-0">
|
||||
<div>
|
||||
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
|
||||
<div class="text-base-content/60 text-xs font-medium px-3">
|
||||
{% trans "Count" %}
|
||||
</div>
|
||||
<a class="tw:px-3 tw:cursor-pointer"
|
||||
<a class="px-3 cursor-pointer"
|
||||
id="calc-menu-count"
|
||||
_="on click
|
||||
set original_value to my innerText
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% spaceless %}
|
||||
{% load i18n %}
|
||||
<div class="tw:tooltip" data-tip="{{ content }}">
|
||||
<span class="tw:text-xs tw:text-base-content/50 tw:mx-3">
|
||||
<div class="tooltip" data-tip="{{ content }}">
|
||||
<span class="text-xs text-base-content/50 mx-3">
|
||||
<i class="{% if not icon %}fa-solid fa-circle-question{% else %}{{ icon }}{% endif %} fa-fw"></i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<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 class="card card-border border-2 border-base-300 relative h-full shadow bg-base-100">
|
||||
<div class="absolute h-8 w-8 right-2 top-2 bg-{{ color }}-300 text-{{ color }}-800 text-center flex items-center justify-center rounded-lg">
|
||||
{% if icon %}<i class="{{ icon }}"></i>{% else %}<span class="font-bold">{{ title.0 }}</span>{% endif %}
|
||||
</div>
|
||||
<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>
|
||||
<div class="card-body">
|
||||
<h5 class="font-bold mr-[50px] text-xl {{ 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,35 +1,57 @@
|
||||
{% load i18n %}
|
||||
<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 }}%)"
|
||||
style="width: 100%">
|
||||
<div class="flex w-full h-4 rounded-full bg-white"
|
||||
role="group"
|
||||
aria-label="{% trans 'Income and Expense Percentages' %}">
|
||||
|
||||
<!-- Segment 1: Projected Income -->
|
||||
<div class="flex items-center justify-center h-4 bg-success/60 tooltip tooltip-bottom tooltip-success
|
||||
{% if percentage.percentages.income_projected > 0 %}rounded-s-full{% endif %}
|
||||
{% if percentage.percentages.income_projected > 0 and percentage.percentages.income_current <= 0 and percentage.percentages.expense_projected <= 0 and percentage.percentages.expense_current <= 0 %}rounded-e-full{% endif %}"
|
||||
style="width: {{ percentage.percentages.income_projected|floatformat:'2u' }}%"
|
||||
data-tip="{% trans 'Projected Income' %} ({{ percentage.percentages.income_projected|floatformat:2 }}%)"
|
||||
role="progressbar"
|
||||
aria-label="{% trans 'Projected Income' %} ({{ percentage.percentages.income_projected|floatformat:2 }}%)"
|
||||
aria-valuenow="{{ percentage.percentages.income_projected|floatformat:0 }}"
|
||||
aria-valuemin="0"
|
||||
aria-valuemax="100">
|
||||
</div>
|
||||
</div>
|
||||
<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 }}%)"
|
||||
style="width: 100%">
|
||||
|
||||
<!-- Segment 2: Current Income -->
|
||||
<div class="flex items-center justify-center h-4 bg-success tooltip tooltip-bottom tooltip-success
|
||||
{% if percentage.percentages.income_projected <= 0 and percentage.percentages.income_current > 0 %}rounded-s-full{% endif %}
|
||||
{% if percentage.percentages.income_current > 0 and percentage.percentages.expense_projected <= 0 and percentage.percentages.expense_current <= 0 %}rounded-e-full{% endif %}"
|
||||
style="width: {{ percentage.percentages.income_current|floatformat:'2u' }}%"
|
||||
data-tip="{% trans 'Current Income' %} ({{ percentage.percentages.income_current|floatformat:2 }}%)"
|
||||
role="progressbar"
|
||||
aria-label="{% trans 'Current Income' %} ({{ percentage.percentages.income_current|floatformat:2 }}%)"
|
||||
aria-valuenow="{{ percentage.percentages.income_current|floatformat:0 }}"
|
||||
aria-valuemin="0"
|
||||
aria-valuemax="100">
|
||||
</div>
|
||||
</div>
|
||||
<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 }}%)"
|
||||
style="width: 100%">
|
||||
|
||||
<!-- Segment 3: Projected Expenses -->
|
||||
<div class="flex items-center justify-center h-4 bg-error/60 tooltip tooltip-bottom tooltip-error
|
||||
{% if percentage.percentages.income_projected <= 0 and percentage.percentages.income_current <= 0 and percentage.percentages.expense_projected > 0 %}rounded-s-full{% endif %}
|
||||
{% if percentage.percentages.expense_projected > 0 and percentage.percentages.expense_current <= 0 %}rounded-e-full{% endif %}"
|
||||
style="width: {{ percentage.percentages.expense_projected|floatformat:'2u' }}%"
|
||||
data-tip="{% trans 'Projected Expenses' %} ({{ percentage.percentages.expense_projected|floatformat:2 }}%)"
|
||||
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">
|
||||
</div>
|
||||
</div>
|
||||
<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 }}%)"
|
||||
style="width: 100%">
|
||||
|
||||
<!-- Segment 4: Current Expenses -->
|
||||
<div class="flex items-center justify-center h-4 bg-error tooltip tooltip-bottom tooltip-error
|
||||
{% if percentage.percentages.income_projected <= 0 and percentage.percentages.income_current <= 0 and percentage.percentages.expense_projected <= 0 and percentage.percentages.expense_current > 0 %}rounded-s-full{% endif %}
|
||||
{% if percentage.percentages.expense_current > 0 %}rounded-e-full{% endif %}"
|
||||
style="width: {{ percentage.percentages.expense_current|floatformat:'2u' }}%"
|
||||
data-tip="{% trans 'Current Expenses' %} ({{ percentage.percentages.expense_current|floatformat:2 }}%)"
|
||||
role="progressbar"
|
||||
aria-label="{% trans 'Current Expenses' %} ({{ percentage.percentages.expense_current|floatformat:2 }}%)"
|
||||
aria-valuenow="{{ percentage.percentages.expense_current|floatformat:0 }}"
|
||||
aria-valuemin="0"
|
||||
aria-valuemax="100">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,49 +1,49 @@
|
||||
{% load i18n %}
|
||||
<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"
|
||||
<div class="grid gap-2 grid-cols-1 xl:flex xl:justify-end">
|
||||
<div class="grid gap-2 xl:flex flex-wrap xl:justify-center">
|
||||
<button class="btn btn-sm btn-outline 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 tw:me-2"></i>
|
||||
<i class="fa-solid fa-arrow-right-to-bracket me-2"></i>
|
||||
{% translate "Income" %}
|
||||
</button>
|
||||
<button class="tw:btn tw:btn-sm tw:btn-outline tw:btn-error"
|
||||
<button class="btn btn-sm btn-outline 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 tw:me-2"></i>
|
||||
<i class="fa-solid fa-arrow-right-from-bracket me-2"></i>
|
||||
{% translate "Expense" %}
|
||||
</button>
|
||||
<button class="tw:btn tw:btn-sm tw:btn-outline tw:btn-warning"
|
||||
<button class="btn btn-sm btn-outline btn-warning"
|
||||
hx-get="{% url 'installment_plan_add' %}"
|
||||
hx-trigger="click, installment from:window"
|
||||
hx-target="#generic-offcanvas">
|
||||
<i class="fa-solid fa-divide tw:me-2"></i>
|
||||
<i class="fa-solid fa-divide me-2"></i>
|
||||
{% translate "Installment" %}
|
||||
</button>
|
||||
<button class="tw:btn tw:btn-sm tw:btn-outline tw:btn-warning"
|
||||
<button class="btn btn-sm btn-outline btn-warning"
|
||||
hx-get="{% url 'recurring_transaction_add' %}"
|
||||
hx-trigger="click, balance from:window"
|
||||
hx-target="#generic-offcanvas">
|
||||
<i class="fa-solid fa-repeat tw:me-2"></i>
|
||||
<i class="fa-solid fa-repeat me-2"></i>
|
||||
{% translate "Recurring" %}
|
||||
</button>
|
||||
<button class="tw:btn tw:btn-sm tw:btn-outline tw:btn-info"
|
||||
<button class="btn btn-sm btn-outline 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 tw:me-2"></i>
|
||||
<i class="fa-solid fa-money-bill-transfer me-2"></i>
|
||||
{% translate "Transfer" %}
|
||||
</button>
|
||||
<button class="tw:btn tw:btn-sm tw:btn-outline tw:btn-info"
|
||||
<button class="btn btn-sm btn-outline btn-info"
|
||||
hx-get="{% url 'account_reconciliation' %}"
|
||||
hx-trigger="click, balance from:window"
|
||||
hx-target="#generic-offcanvas">
|
||||
<i class="fa-solid fa-scale-balanced tw:me-2"></i>
|
||||
<i class="fa-solid fa-scale-balanced me-2"></i>
|
||||
{% translate "Balance" %}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -1,50 +1,50 @@
|
||||
{% load i18n %}
|
||||
<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"
|
||||
<div class="sticky bottom-4 left-0 right-0 z-50 hidden mx-auto 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
|
||||
if #actions-bar
|
||||
add .slide-in-bottom-reverse then settle
|
||||
then add .tw:hidden to #actions-bar
|
||||
then add .hidden to #actions-bar
|
||||
then remove .slide-in-bottom-reverse
|
||||
end
|
||||
else
|
||||
if #actions-bar
|
||||
set #selected-count's innerHTML to length of <input[type='checkbox']:checked/> in #transactions-list
|
||||
then remove .tw:hidden from #actions-bar
|
||||
then remove .hidden from #actions-bar
|
||||
then trigger selected_transactions_updated
|
||||
end
|
||||
end
|
||||
end
|
||||
end">
|
||||
<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">
|
||||
<div class="card bg-base-300 shadow slide-in-bottom max-w-[90vw] card-border">
|
||||
<div class="card-body flex-row p-2 flex justify-between items-center gap-3 overflow-x-auto">
|
||||
{% spaceless %}
|
||||
<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">
|
||||
<div class="font-bold text-md ms-2" id="selected-count">0</div>
|
||||
<div class="divider divider-horizontal m-0"></div>
|
||||
<div class="dropdown dropdown-top dropdown-end">
|
||||
<button tabindex="0" role="button" class="btn btn-secondary 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 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!">
|
||||
<ul tabindex="0" class="dropdown-content menu bg-base-300 rounded-box z-[1] w-full p-2 shadow fixed!">
|
||||
<li>
|
||||
<a class="tw:cursor-pointer"
|
||||
<a class="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 tw:me-3"></i>{% translate 'Select All' %}
|
||||
<i class="fa-regular fa-square-check text-green-400 me-3"></i>{% translate 'Select All' %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="tw:cursor-pointer"
|
||||
<a class="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 tw:me-3"></i>{% translate 'Unselect All' %}
|
||||
<i class="fa-regular fa-square text-red-400 me-3"></i>{% translate 'Unselect All' %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<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"
|
||||
<div class="divider divider-horizontal m-0"></div>
|
||||
<div class="join">
|
||||
<button class="btn btn-secondary join-item 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>
|
||||
<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">
|
||||
<div class="dropdown dropdown-top dropdown-end">
|
||||
<button type="button" tabindex="0" role="button" class="join-item btn btn-sm btn-secondary">
|
||||
<i class="fa-solid fa-chevron-down fa-xs"></i>
|
||||
</button>
|
||||
|
||||
<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">
|
||||
<ul tabindex="0" class="dropdown-content fixed! menu bg-base-300 rounded-box z-[1] w-full p-2 shadow">
|
||||
<li>
|
||||
<a class="tw:cursor-pointer"
|
||||
<a class="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' %}
|
||||
<i class="fa-regular fa-circle text-red-400 fa-fw me-3"></i>{% translate 'Mark as unpaid' %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="tw:cursor-pointer"
|
||||
<a class="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' %}
|
||||
<i class="fa-regular fa-circle-check text-green-400 fa-fw me-3"></i>{% translate 'Mark as paid' %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<button class="tw:btn tw:btn-secondary tw:btn-sm"
|
||||
<button class="btn btn-secondary 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="tw:btn tw:btn-secondary tw:btn-sm"
|
||||
<button class="btn btn-secondary 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 tw:text-error"></i>
|
||||
<i class="fa-solid fa-trash text-error"></i>
|
||||
</button>
|
||||
<div class="tw:divider tw:divider-horizontal tw:m-0"></div>
|
||||
<div class="tw:join"
|
||||
<div class="divider divider-horizontal m-0"></div>
|
||||
<div class="join"
|
||||
_="on selected_transactions_updated from #actions-bar
|
||||
set realTotal to math.bignumber(0)
|
||||
set flatTotal to math.bignumber(0)
|
||||
@@ -134,7 +134,7 @@
|
||||
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="tw:btn tw:btn-secondary tw:btn-sm tw:join-item"
|
||||
<button class="btn btn-secondary btn-sm join-item"
|
||||
_="on click
|
||||
set original_value to #real-total-front's innerText
|
||||
writeText(original_value) on navigator.clipboard
|
||||
@@ -142,16 +142,16 @@
|
||||
wait 1s
|
||||
put original_value into #real-total-front's innerText
|
||||
end">
|
||||
<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>
|
||||
<i class="fa-solid fa-plus fa-fw me-md-2 text-primary"></i>
|
||||
<span class="hidden 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">
|
||||
<div class="dropdown dropdown-end dropdown-top">
|
||||
<button type="button" tabindex="0" role="button" class="join-item btn btn-sm btn-secondary">
|
||||
<i class="fa-solid fa-chevron-down fa-xs"></i>
|
||||
</button>
|
||||
|
||||
<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"
|
||||
<ul tabindex="0" class="dropdown-content menu bg-base-300 rounded-box z-[1] w-full shadow fixed!">
|
||||
<li class="cursor-pointer"
|
||||
_="on click
|
||||
set original_value to #calc-menu-flat-total's innerText
|
||||
writeText(original_value) on navigator.clipboard
|
||||
@@ -159,19 +159,19 @@
|
||||
wait 1s
|
||||
put original_value into #calc-menu-flat-total
|
||||
end">
|
||||
<div class="tw:p-0">
|
||||
<div class="p-0">
|
||||
<div>
|
||||
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
|
||||
<div class="text-base-content/60 text-xs font-medium px-3">
|
||||
{% trans "Flat Total" %}
|
||||
</div>
|
||||
<div class="tw:px-3"
|
||||
<div class="px-3"
|
||||
id="calc-menu-flat-total">
|
||||
0
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="tw:cursor-pointer"
|
||||
<li class="cursor-pointer"
|
||||
_="on click
|
||||
set original_value to #calc-menu-real-total's innerText
|
||||
writeText(original_value) on navigator.clipboard
|
||||
@@ -179,19 +179,19 @@
|
||||
wait 1s
|
||||
put original_value into #calc-menu-real-total
|
||||
end">
|
||||
<div class="tw:p-0">
|
||||
<div class="p-0">
|
||||
<div>
|
||||
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
|
||||
<div class="text-base-content/60 text-xs font-medium px-3">
|
||||
{% trans "Real Total" %}
|
||||
</div>
|
||||
<div class="tw:px-3"
|
||||
<div class="px-3"
|
||||
id="calc-menu-real-total">
|
||||
0
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="tw:cursor-pointer"
|
||||
<li class="cursor-pointer"
|
||||
_="on click
|
||||
set original_value to #calc-menu-mean's innerText
|
||||
writeText(original_value) on navigator.clipboard
|
||||
@@ -199,19 +199,19 @@
|
||||
wait 1s
|
||||
put original_value into #calc-menu-mean
|
||||
end">
|
||||
<div class="tw:p-0">
|
||||
<div class="p-0">
|
||||
<div>
|
||||
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
|
||||
<div class="text-base-content/60 text-xs font-medium px-3">
|
||||
{% trans "Mean" %}
|
||||
</div>
|
||||
<div class="tw:px-3"
|
||||
<div class="px-3"
|
||||
id="calc-menu-mean">
|
||||
0
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="tw:cursor-pointer"
|
||||
<li class="cursor-pointer"
|
||||
_="on click
|
||||
set original_value to #calc-menu-max's innerText
|
||||
writeText(original_value) on navigator.clipboard
|
||||
@@ -219,19 +219,19 @@
|
||||
wait 1s
|
||||
put original_value into #calc-menu-max
|
||||
end">
|
||||
<div class="tw:p-0">
|
||||
<div class="p-0">
|
||||
<div>
|
||||
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
|
||||
<div class="text-base-content/60 text-xs font-medium px-3">
|
||||
{% trans "Max" %}
|
||||
</div>
|
||||
<div class="tw:px-3"
|
||||
<div class="px-3"
|
||||
id="calc-menu-max">
|
||||
0
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="tw:cursor-pointer"
|
||||
<li class="cursor-pointer"
|
||||
_="on click
|
||||
set original_value to #calc-menu-min's innerText
|
||||
writeText(original_value) on navigator.clipboard
|
||||
@@ -239,19 +239,19 @@
|
||||
wait 1s
|
||||
put original_value into #calc-menu-min
|
||||
end">
|
||||
<div class="tw:p-0">
|
||||
<div class="p-0">
|
||||
<div>
|
||||
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
|
||||
<div class="text-base-content/60 text-xs font-medium px-3">
|
||||
{% trans "Min" %}
|
||||
</div>
|
||||
<div class="tw:px-3"
|
||||
<div class="px-3"
|
||||
id="calc-menu-min">
|
||||
0
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="tw:cursor-pointer"
|
||||
<li class="cursor-pointer"
|
||||
_="on click
|
||||
set original_value to #calc-menu-count's innerText
|
||||
writeText(original_value) on navigator.clipboard
|
||||
@@ -259,12 +259,12 @@
|
||||
wait 1s
|
||||
put original_value into #calc-menu-count
|
||||
end">
|
||||
<div class="tw:p-0">
|
||||
<div class="p-0">
|
||||
<div>
|
||||
<div class="tw:text-base-content/60 tw:text-xs tw:font-medium tw:px-3">
|
||||
<div class="text-base-content/60 text-xs font-medium px-3">
|
||||
{% trans "Count" %}
|
||||
</div>
|
||||
<div class="tw:px-3"
|
||||
<div class="px-3"
|
||||
id="calc-menu-count">
|
||||
0
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user