mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-25 01:58:54 +02:00
feat: automated replacement
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
{% load currency_display %}
|
||||
|
||||
{% if not divless %}
|
||||
<div class="{% if text_end %}text-end{% elif text_start %}text-start{% endif %}">
|
||||
<div class="{% if text_end %}tw:text-end{% elif text_start %}tw:text-start{% endif %}">
|
||||
{% endif %}
|
||||
<span class="amount{% if color == 'grey' or color == "gray" %} tw:text-gray-500{% elif color == 'green' %} tw:text-green-400{% elif color == 'red' %} tw:text-red-400{% endif %} {{ custom_class }}"
|
||||
<span class="amount{% if color == 'grey' or color == "gray" %} tw:text-base-content/70{% elif color == 'green' %} tw:dark:text-green-400 tw:text-green-600 {% elif color == 'red' %} tw:dark:text-red-400 tw:text-red-600{% endif %} {{ custom_class }}"
|
||||
data-original-value="{% currency_display amount=amount prefix=prefix suffix=suffix decimal_places=decimal_places %}"
|
||||
data-amount="{{ amount|floatformat:"-40u" }}">
|
||||
</span><span>{{ slot }}</span>
|
||||
|
||||
@@ -1,33 +1,14 @@
|
||||
<div class="tw:min-h-16">
|
||||
<div
|
||||
id="fab-wrapper"
|
||||
class="tw:fixed tw:bottom-5 tw:right-5 tw:ml-auto tw:w-max tw:flex tw:flex-col tw:items-end mt-5 tw:z-20">
|
||||
<div
|
||||
id="menu"
|
||||
class="tw:flex tw:flex-col tw:items-end tw:space-y-6 tw:transition-all tw:duration-300 tw:ease-in-out tw:opacity-0 tw:invisible tw:hidden tw:mb-2">
|
||||
{% load i18n%}
|
||||
|
||||
{{ slot }}
|
||||
<div class="tw:fab">
|
||||
<div tabindex="0" role="button" class="tw:btn tw:btn-lg tw:btn-circle tw:btn-primary">
|
||||
<i class="fa-solid fa-plus tw:text-2xl fa-fw"></i>
|
||||
</div>
|
||||
|
||||
<button
|
||||
class="btn btn-primary rounded-circle p-0 tw:w-12 tw:h-12 tw:flex tw:items-center tw:justify-center tw:shadow-lg tw:hover:shadow-xl tw:focus:shadow-xl tw:transition-all tw:duration-300 tw:ease-in-out"
|
||||
_="
|
||||
on click or focusout
|
||||
if #menu.classList.contains('tw:invisible') and event.type === 'click'
|
||||
add .{'tw:rotate-45'} to #fab-icon
|
||||
remove .{'tw:invisible'} from #menu
|
||||
remove .{'tw:hidden'} from #menu
|
||||
remove .{'tw:opacity-0'} from #menu
|
||||
else
|
||||
wait 0.2s
|
||||
remove .{'tw:rotate-45'} from #fab-icon
|
||||
add .{'tw:invisible'} to #menu
|
||||
add .{'tw:hidden'} to #menu
|
||||
add .{'tw:opacity-0'} to #menu
|
||||
end
|
||||
"
|
||||
>
|
||||
<i id="fab-icon" class="fa-solid fa-plus tw:text-3xl tw:transition-transform tw:duration-300 tw:ease-in-out"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tw:fab-close">
|
||||
{% trans 'Close' %} <span class="tw:btn tw:btn-circle tw:btn-lg tw:btn-error"><i class="fa-solid fa-xmark tw:text-2xl fa-fw"></i></span>
|
||||
</div>
|
||||
|
||||
{{ slot }}
|
||||
|
||||
</div>
|
||||
@@ -1,11 +1,6 @@
|
||||
{% load i18n %}
|
||||
<div class="tw:relative fab-item">
|
||||
<button class="btn btn-sm btn-{{ color }}"
|
||||
hx-get="{{ url }}"
|
||||
hx-trigger="{{ hx_trigger }}"
|
||||
hx-target="{{ hx_target }}"
|
||||
hx-vals='{{ hx_vals }}'>
|
||||
<i class="{{ icon }} me-2"></i>
|
||||
{{ title }}
|
||||
</button>
|
||||
</div>
|
||||
<div hx-get="{{ url }}"
|
||||
hx-trigger="{{ hx_trigger }}"
|
||||
hx-target="{{ hx_target }}"
|
||||
hx-vals='{{ hx_vals }}'>
|
||||
{{ title }}
|
||||
<button class="tw:btn tw:btn-lg tw:btn-circle tw:btn-{{color}}"><i class="{{ icon }} fa-fw"></i></button></div>
|
||||
@@ -1,12 +1,12 @@
|
||||
<li class="tw:lg:hidden tw:lg:group-hover:block">
|
||||
<div class="d-flex align-items-center" data-bs-toggle="collapse" href="#{{ title|slugify }}" role="button"
|
||||
<div class="tw:flex tw:items-center" data-bs-toggle="collapse" href="#{{ title|slugify }}" role="button"
|
||||
aria-expanded="false" aria-controls="{{ title|slugify }}">
|
||||
<span
|
||||
class="text-muted small fw-bold text-uppercase tw:lg:hidden tw:lg:group-hover:inline me-2">{{ title }}</span>
|
||||
<hr class="flex-grow-1"/>
|
||||
<i class="fas fa-chevron-down text-muted tw:lg:before:hidden tw:lg:group-hover:before:inline tw:ml-2 tw:lg:ml-0 tw:lg:group-hover:ml-2"></i>
|
||||
class="tw:text-base-content/60 tw:text-sm tw:font-bold tw:uppercase tw:lg:hidden tw:lg:group-hover:inline tw:me-2">{{ title }}</span>
|
||||
<hr class="tw:flex-grow"/>
|
||||
<i class="fas fa-chevron-down tw:text-base-content/60 tw:lg:before:hidden tw:lg:group-hover:before:inline tw:ml-2 tw:lg:ml-0 tw:lg:group-hover:ml-2"></i>
|
||||
</div>
|
||||
</li>
|
||||
<div class="collapse tw:lg:hidden tw:lg:group-hover:block" id="{{ title|slugify }}">
|
||||
<div class="tw:collapse tw:lg:hidden tw:lg:group-hover:block" id="{{ title|slugify }}">
|
||||
{{ slot }}
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<li>
|
||||
<div class="d-flex align-items-center">
|
||||
<span class="sidebar-menu-header text-muted small fw-bold text-uppercase me-2">{{ title }}</span>
|
||||
<hr class="flex-grow-1"/>
|
||||
<div class="tw:flex tw:items-center">
|
||||
<span class="sidebar-menu-header tw:text-base-content/60 tw:text-sm tw:font-bold tw:uppercase tw:mr-3">{{ title }}</span>
|
||||
<hr class="tw:text-base-content/60 tw:flex-grow"/>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% load active_link %}
|
||||
<li>
|
||||
<a href="{% url url %}"
|
||||
class="tw:lg:text-sm d-flex align-items-center text-decoration-none p-2 rounded-3 sidebar-item {% active_link views=active css_class="sidebar-active" %}"
|
||||
class="tw:lg:text-sm tw:flex tw:items-center tw:no-underline tw:p-2 tw:rounded-3xl sidebar-item {% active_link views=active css_class="sidebar-active" %}"
|
||||
{% if tooltip %}
|
||||
data-bs-placement="right"
|
||||
data-bs-toggle="tooltip"
|
||||
@@ -9,6 +9,6 @@
|
||||
{% endif %}>
|
||||
<i class="{{ icon }} fa-fw"></i>
|
||||
<span
|
||||
class="ms-3 fw-medium tw:lg:group-hover:truncate tw:lg:group-focus:truncate tw:lg:group-hover:text-ellipsis tw:lg:group-focus:text-ellipsis">{{ title }}</span>
|
||||
class="tw:ms-3 tw:font-medium tw:lg:group-hover:truncate tw:lg:group-focus:truncate tw:lg:group-hover:text-ellipsis tw:lg:group-focus:text-ellipsis">{{ title }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<li>
|
||||
<a href="{{ url }}"
|
||||
hx-boost="false"
|
||||
class="tw:lg:text-sm d-flex align-items-center text-decoration-none p-2 rounded-3 sidebar-item {% active_link views=active css_class="sidebar-active" %}"
|
||||
class="tw:lg:text-sm tw:flex tw:items-center tw:no-underline tw:p-2 tw:rounded-3xl sidebar-item {% active_link views=active css_class="sidebar-active" %}"
|
||||
{% if tooltip %}
|
||||
data-bs-placement="right"
|
||||
data-bs-toggle="tooltip"
|
||||
@@ -11,6 +11,6 @@
|
||||
|
||||
<i class="{{ icon }} fa-fw"></i>
|
||||
<span
|
||||
class="ms-3 fw-medium tw:lg:group-hover:truncate tw:lg:group-focus:truncate tw:lg:group-hover:text-ellipsis tw:lg:group-focus:text-ellipsis">{{ title }}</span>
|
||||
class="tw:ms-3 tw:font-medium tw:lg:group-hover:truncate tw:lg:group-focus:truncate tw:lg:group-hover:text-ellipsis tw:lg:group-focus:text-ellipsis">{{ title }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{% load i18n %}
|
||||
<div id="search" class="mb-3">
|
||||
<label class="w-100">
|
||||
<div id="search" class="tw:mb-3">
|
||||
<label class="tw:w-full">
|
||||
<input type="search"
|
||||
class="form-control"
|
||||
class="tw:input tw:input-bordered tw:w-full"
|
||||
placeholder="{% translate 'Search' %}"
|
||||
_="on input or search
|
||||
show < tbody>tr /> in <table/>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<div class="row {% if not remove_padding %}p-5{% endif %}">
|
||||
<div class="col {% if not remove_padding %}p-5{% endif %}">
|
||||
<div class="text-center">
|
||||
<div class="tw:grid tw:grid-cols-1 {% if not remove_padding %}tw:p-5{% endif %}">
|
||||
<div class="{% if not remove_padding %}tw:p-5{% endif %}">
|
||||
<div class="tw:text-center">
|
||||
<i class="{% if icon %}{{ icon }}{% else %}fa-solid fa-circle-xmark{% endif %} tw:text-6xl"></i>
|
||||
<p class="lead mt-4 mb-0">{{ title }}</p>
|
||||
<p class="tw:text-lg tw:mt-4 tw:mb-0">{{ title }}</p>
|
||||
<p class="tw:text-gray-500">{{ subtitle }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,22 +2,21 @@
|
||||
{% load i18n %}
|
||||
<div
|
||||
class="transaction {% if transaction.type == "EX" %}expense{% else %}income{% endif %} tw:group/transaction tw:relative tw:hover:z-10">
|
||||
<div class="d-flex my-1">
|
||||
<div class="tw:flex tw:my-1">
|
||||
{% if not disable_selection or not dummy %}
|
||||
<label class="px-3 d-flex align-items-center justify-content-center">
|
||||
<input class="form-check-input" type="checkbox" name="transactions" value="{{ transaction.id }}"
|
||||
<label class="tw:px-3 tw:flex! tw:items-center tw:justify-center">
|
||||
<input class="tw:checkbox" type="checkbox" name="transactions" value="{{ transaction.id }}"
|
||||
id="check-{{ transaction.id }}" aria-label="{% translate 'Select' %}" hx-preserve>
|
||||
</label>
|
||||
{% endif %}
|
||||
<div class="tw:border-s-4 tw:border-e-0 tw:border-t-0 tw:border-b-0 border-bottom
|
||||
tw:hover:bg-zinc-900 p-2 {% if transaction.account.is_asset %}tw:border-dashed{% else %}tw:border-solid{% endif %}
|
||||
{% if transaction.type == "EX" %}tw:border-red-500{% else %}tw:border-green-500{% endif %} tw:relative
|
||||
w-100 transaction-item">
|
||||
<div class="row font-monospace tw:text-sm align-items-center">
|
||||
<div
|
||||
class="col-lg-auto col-12 d-flex align-items-center tw:text-2xl tw:lg:text-xl text-lg-center text-center p-0 ps-1">
|
||||
<div class="tw:border-s-4 tw:border-e-0 tw:border-t-0
|
||||
tw:hover:bg-neutral-500/20 tw:p-2 {% if transaction.account.is_asset %}tw:border-l-dashed{% else %}tw:border-solid{% endif %}
|
||||
{% if transaction.type == "EX" %}tw:border-l-red-500{% else %}tw:border-l-green-500{% endif %} tw:relative
|
||||
tw:w-full transaction-item tw:bg-base-200 tw:rounded">
|
||||
<div class="tw:flex tw:flex-wrap tw:font-mono tw:text-sm tw:items-center">
|
||||
<div class="tw:lg:w-auto tw:w-full tw:flex tw:items-center tw:text-2xl tw:lg:text-xl tw:lg:text-center tw:text-center tw:p-0 tw:cursor-pointer">
|
||||
{% if not transaction.deleted %}
|
||||
<a class="text-decoration-none p-3 tw:text-gray-500!"
|
||||
<a class="tw:no-underline tw:p-3 tw:text-gray-500!"
|
||||
title="{% if transaction.is_paid %}{% trans 'Paid' %}{% else %}{% trans 'Projected' %}{% endif %}"
|
||||
role="button"
|
||||
{% if not dummy %}
|
||||
@@ -28,7 +27,7 @@
|
||||
class="fa-regular fa-circle"></i>{% endif %}
|
||||
</a>
|
||||
{% else %}
|
||||
<div class="text-decoration-none p-3 tw:text-gray-500!"
|
||||
<div class="tw:no-underline tw:p-3 tw:text-gray-500!"
|
||||
title="{% if transaction.is_paid %}{% trans 'Paid' %}{% else %}{% trans 'Projected' %}{% endif %}">
|
||||
{% if transaction.is_paid %}<i class="fa-regular fa-circle-check"></i>{% else %}<i
|
||||
class="fa-regular fa-circle"></i>{% endif %}
|
||||
@@ -36,79 +35,79 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
<div
|
||||
class="col-lg col-12 {% if transaction.account.is_untracked_by or transaction.category.mute or transaction.mute %}tw:brightness-80{% endif %}">
|
||||
class="tw:lg:flex-1 tw:w-full {% if transaction.account.is_untracked_by or transaction.category.mute or transaction.mute %}tw:brightness-80{% endif %}">
|
||||
{# Date#}
|
||||
<div class="row mb-2 mb-lg-1 tw:text-gray-400">
|
||||
<div class="col-auto pe-1"><i class="fa-solid fa-calendar fa-fw me-1 fa-xs"></i></div>
|
||||
<div class="tw:flex tw:flex-wrap tw:mb-2 tw:lg:mb-1 tw:text-base-content/70">
|
||||
<div class="tw:w-auto tw:pe-1"><i class="fa-solid fa-calendar fa-fw tw:mr-1 fa-xs"></i></div>
|
||||
<div
|
||||
class="col ps-0">{{ transaction.date|date:"SHORT_DATE_FORMAT" }} • {{ transaction.reference_date|date:"b/Y" }}</div>
|
||||
class="tw:flex-1 tw:ps-0">{{ transaction.date|date:"SHORT_DATE_FORMAT" }} • {{ transaction.reference_date|date:"b/Y" }}</div>
|
||||
</div>
|
||||
{# Description#}
|
||||
<div class="mb-2 mb-lg-1 text-body tw:text-base">
|
||||
<div class="tw:mb-2 tw:lg:mb-1 tw:text-base-content tw:text-base">
|
||||
{% spaceless %}
|
||||
<span class="{% if transaction.description %}me-2{% endif %}">{{ transaction.description }}</span>
|
||||
<span class="{% if transaction.description %}tw:mr-2{% endif %}">{{ transaction.description }}</span>
|
||||
{% if transaction.installment_plan and transaction.installment_id %}
|
||||
<span
|
||||
class="badge text-bg-secondary mx-1">{{ transaction.installment_id }}/{{ transaction.installment_plan.installment_total_number }}</span>
|
||||
class="tw:badge tw:badge-neutral tw:mx-1">{{ transaction.installment_id }}/{{ transaction.installment_plan.installment_total_number }}</span>
|
||||
{% endif %}
|
||||
{% if transaction.recurring_transaction %}
|
||||
<span class="text-primary tw:text-xs mx-1"><i class="fa-solid fa-arrows-rotate fa-fw"></i></span>
|
||||
<span class="tw:text-primary tw:text-xs tw:mx-1"><i class="fa-solid fa-arrows-rotate fa-fw"></i></span>
|
||||
{% endif %}
|
||||
{% if transaction.dca_expense_entries.all or transaction.dca_income_entries.all %}
|
||||
<span class="badge text-bg-secondary mx-1">{% trans 'DCA' %}</span>
|
||||
<span class="tw:badge tw:badge-neutral tw:mx-1">{% trans 'DCA' %}</span>
|
||||
{% endif %}
|
||||
{% endspaceless %}
|
||||
</div>
|
||||
<div class="tw:text-gray-400 tw:text-sm">
|
||||
<div class="tw:text-base-content/70 tw:text-sm">
|
||||
{# Entities #}
|
||||
{% comment %} First, check for the highest priority: a valid 'overriden_entities' list. {% endcomment %}
|
||||
{% if overriden_entities %}
|
||||
<div class="row mb-2 mb-lg-1 tw:text-gray-400">
|
||||
<div class="col-auto pe-1"><i class="fa-solid fa-user-group fa-fw me-1 fa-xs"></i></div>
|
||||
<div class="col ps-0">{{ overriden_entities|join:", " }}</div>
|
||||
<div class="tw:flex tw:flex-wrap tw:mb-2 tw:lg:mb-1 tw:text-base-content/70">
|
||||
<div class="tw:w-auto tw:pe-1"><i class="fa-solid fa-user-group fa-fw tw:mr-1 fa-xs"></i></div>
|
||||
<div class="tw:flex-1 tw:ps-0">{{ overriden_entities|join:", " }}</div>
|
||||
</div>
|
||||
|
||||
{% comment %} If no override, fall back to transaction entities, but ONLY if the transaction has an ID. {% endcomment %}
|
||||
{% elif transaction.id and transaction.entities.all %}
|
||||
<div class="row mb-2 mb-lg-1 tw:text-gray-400">
|
||||
<div class="col-auto pe-1"><i class="fa-solid fa-user-group fa-fw me-1 fa-xs"></i></div>
|
||||
<div class="col ps-0">{{ transaction.entities.all|join:", " }}</div>
|
||||
<div class="tw:flex tw:flex-wrap tw:mb-2 tw:lg:mb-1 tw:text-base-content/70">
|
||||
<div class="tw:w-auto tw:pe-1"><i class="fa-solid fa-user-group fa-fw tw:mr-1 fa-xs"></i></div>
|
||||
<div class="tw:flex-1 tw:ps-0">{{ transaction.entities.all|join:", " }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{# Notes#}
|
||||
{% if transaction.notes %}
|
||||
<div class="row mb-2 mb-lg-1 tw:text-gray-400">
|
||||
<div class="col-auto pe-1"><i class="fa-solid fa-align-left fa-fw me-1 fa-xs"></i></div>
|
||||
<div class="col ps-0">{{ transaction.notes | limited_markdown | linebreaksbr }}</div>
|
||||
<div class="tw:flex tw:flex-wrap tw:mb-2 tw:lg:mb-1 tw:text-base-content/70">
|
||||
<div class="tw:w-auto tw:pe-1"><i class="fa-solid fa-align-left fa-fw tw:mr-1 fa-xs"></i></div>
|
||||
<div class="tw:flex-1 tw:ps-0">{{ transaction.notes | limited_markdown | linebreaksbr }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{# Category#}
|
||||
{% if transaction.category %}
|
||||
<div class="row mb-2 mb-lg-1 tw:text-gray-400">
|
||||
<div class="col-auto pe-1"><i class="fa-solid fa-icons fa-fw me-1 fa-xs"></i></div>
|
||||
<div class="col ps-0">{{ transaction.category.name }}</div>
|
||||
<div class="tw:flex tw:flex-wrap tw:mb-2 tw:lg:mb-1 tw:text-base-content/70">
|
||||
<div class="tw:w-auto tw:pe-1"><i class="fa-solid fa-icons fa-fw tw:mr-1 fa-xs"></i></div>
|
||||
<div class="tw:flex-1 tw:ps-0">{{ transaction.category.name }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{# Tags#}
|
||||
{% comment %} First, check for the highest priority: a valid 'overriden_tags' list. {% endcomment %}
|
||||
{% if overriden_tags %}
|
||||
<div class="row mb-2 mb-lg-1 tw:text-gray-400">
|
||||
<div class="col-auto pe-1"><i class="fa-solid fa-hashtag fa-fw me-1 fa-xs"></i></div>
|
||||
<div class="col ps-0">{{ overriden_tags|join:", " }}</div>
|
||||
<div class="tw:flex tw:flex-wrap tw:mb-2 tw:lg:mb-1 tw:text-base-content/70">
|
||||
<div class="tw:w-auto tw:pe-1"><i class="fa-solid fa-hashtag fa-fw tw:mr-1 fa-xs"></i></div>
|
||||
<div class="tw:flex-1 tw:ps-0">{{ overriden_tags|join:", " }}</div>
|
||||
</div>
|
||||
|
||||
{% comment %} If no override, fall back to transaction tags, but ONLY if the transaction has an ID. {% endcomment %}
|
||||
{% elif transaction.id and transaction.tags.all %}
|
||||
<div class="row mb-2 mb-lg-1 tw:text-gray-400">
|
||||
<div class="col-auto pe-1"><i class="fa-solid fa-hashtag fa-fw me-1 fa-xs"></i></div>
|
||||
<div class="col ps-0">{{ transaction.tags.all|join:", " }}</div>
|
||||
<div class="tw:flex tw:flex-wrap tw:mb-2 tw:lg:mb-1 tw:text-base-content/70">
|
||||
<div class="tw:w-auto tw:pe-1"><i class="fa-solid fa-hashtag fa-fw tw:mr-1 fa-xs"></i></div>
|
||||
<div class="tw:flex-1 tw:ps-0">{{ transaction.tags.all|join:", " }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="col-lg-auto col-12 text-lg-end align-self-end {% if transaction.account.is_untracked_by or transaction.category.mute or transaction.mute %}tw:brightness-80{% endif %}">
|
||||
<div class="main-amount mb-2 mb-lg-0">
|
||||
class="tw:lg:w-auto tw:w-full tw:lg:text-right tw:self-end {% if transaction.account.is_untracked_by or transaction.category.mute or transaction.mute %}tw:brightness-80{% endif %}">
|
||||
<div class="main-amount tw:mb-2 tw:lg:mb-0">
|
||||
<c-amount.display
|
||||
:amount="transaction.amount"
|
||||
:prefix="transaction.account.currency.prefix"
|
||||
@@ -120,7 +119,7 @@
|
||||
{% if not dummy %}
|
||||
{% with exchanged=transaction.exchanged_amount %}
|
||||
{% if exchanged %}
|
||||
<div class="exchanged-amount mb-2 mb-lg-0">
|
||||
<div class="exchanged-amount tw:mb-2 tw:lg:mb-0">
|
||||
<c-amount.display
|
||||
:amount="exchanged.amount"
|
||||
:prefix="exchanged.prefix"
|
||||
@@ -139,109 +138,106 @@
|
||||
<div>
|
||||
{# Item actions#}
|
||||
<div
|
||||
class="transaction-actions tw:absolute! tw:left-1/2 tw:top-0 tw:-translate-x-1/2 tw:-translate-y-1/2 tw:invisible tw:group-hover/transaction:visible d-flex flex-row card">
|
||||
<div class="card-body p-1 shadow-lg d-flex flex-row gap-1">
|
||||
class="transaction-actions tw:absolute! tw:left-1/2 tw:top-0 tw:-translate-x-1/2 tw:-translate-y-1/2 tw:invisible tw:group-hover/transaction:visible tw:flex tw:flex-row tw:card tw:bg-base-300">
|
||||
<div class="tw:card-body tw:p-1 tw:shadow-lg tw:flex tw:flex-row tw:gap-1">
|
||||
{% if not transaction.deleted %}
|
||||
<a class="btn btn-secondary btn-sm transaction-action"
|
||||
role="button"
|
||||
data-bs-toggle="tooltip"
|
||||
data-bs-title="{% translate "Edit" %}"
|
||||
hx-get="{% url 'transaction_edit' transaction_id=transaction.id %}"
|
||||
hx-target="#generic-offcanvas" hx-swap="innerHTML">
|
||||
<i class="fa-solid fa-pencil fa-fw"></i></a>
|
||||
<a class="btn btn-secondary btn-sm transaction-action"
|
||||
role="button"
|
||||
data-bs-toggle="tooltip"
|
||||
data-bs-title="{% translate "Delete" %}"
|
||||
hx-delete="{% url 'transaction_delete' transaction_id=transaction.id %}"
|
||||
hx-trigger='confirmed'
|
||||
data-bypass-on-ctrl="true"
|
||||
data-title="{% translate "Are you sure?" %}"
|
||||
data-text="{% translate "You won't be able to revert this!" %}"
|
||||
data-confirm-text="{% translate "Yes, delete it!" %}"
|
||||
_="install prompt_swal"><i class="fa-solid fa-trash fa-fw text-danger"></i>
|
||||
</a>
|
||||
<button class="btn btn-secondary btn-sm transaction-action" type="button" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<i class="fa-solid fa-ellipsis fa-fw"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-md-start">
|
||||
{% if transaction.account.is_untracked_by %}
|
||||
<li>
|
||||
<a class="dropdown-item disabled d-flex align-items-center" aria-disabled="true">
|
||||
<i class="fa-solid fa-eye fa-fw me-2"></i>
|
||||
<div>
|
||||
{% translate 'Show on summaries' %}
|
||||
<div
|
||||
class="d-block text-body-secondary tw:text-xs tw:font-medium">{% translate 'Controlled by account' %}</div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="tw:tooltip" data-tip="{% translate "Edit" %}">
|
||||
<a class="tw:btn btn-neutral tw:btn-sm transaction-action"
|
||||
role="button"
|
||||
hx-get="{% url 'transaction_edit' transaction_id=transaction.id %}"
|
||||
hx-target="#generic-offcanvas" hx-swap="innerHTML">
|
||||
<i class="fa-solid fa-pencil fa-fw"></i></a>
|
||||
</div>
|
||||
<div class="tw:tooltip" data-tip="{% translate "Delete" %}">
|
||||
<a class="tw:btn btn-neutral tw:btn-sm transaction-action"
|
||||
role="button"
|
||||
hx-delete="{% url 'transaction_delete' transaction_id=transaction.id %}"
|
||||
hx-trigger='confirmed'
|
||||
data-bypass-on-ctrl="true"
|
||||
data-title="{% translate "Are you sure?" %}"
|
||||
data-text="{% translate "You won't be able to revert this!" %}"
|
||||
data-confirm-text="{% translate "Yes, delete it!" %}"
|
||||
_="install prompt_swal"><i class="fa-solid fa-trash fa-fw tw:text-red-500"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="tw:dropdown tw:dropdown-end">
|
||||
<button type="button" tabindex="0" role="button" class="tw:btn btn-neutral tw:btn-sm transaction-action">
|
||||
<i class="fa-solid fa-ellipsis fa-fw"></i>
|
||||
</button>
|
||||
<ul tabindex="0" class="tw:dropdown-content tw:menu tw:p-2 tw:shadow tw:bg-base-200 tw:rounded-box tw:w-72 z-[1]">
|
||||
{% if transaction.account.is_untracked_by %}
|
||||
<li>
|
||||
<a class="tw:disabled tw:flex tw:items-center" aria-disabled="true">
|
||||
<i class="fa-solid fa-eye fa-fw tw:mr-2"></i>
|
||||
<div>
|
||||
{% translate 'Show on summaries' %}
|
||||
<div
|
||||
class="tw:block tw:text-gray-500 tw:text-xs tw:font-medium">{% translate 'Controlled by account' %}</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
{% elif transaction.category.mute %}
|
||||
<li>
|
||||
<a class="tw:disabled tw:flex tw:items-center" aria-disabled="true">
|
||||
<i class="fa-solid fa-eye fa-fw tw:mr-2"></i>
|
||||
<div>
|
||||
{% translate 'Show on summaries' %}
|
||||
<div
|
||||
class="tw:block tw:text-gray-500 tw:text-xs tw:font-medium">{% translate 'Controlled by category' %}</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
{% elif transaction.mute %}
|
||||
<li><a href="#"
|
||||
hx-get="{% url 'transaction_mute' transaction_id=transaction.id %}"
|
||||
hx-target="closest .transaction" hx-swap="outerHTML"><i
|
||||
class="fa-solid fa-eye fa-fw tw:mr-2"></i>{% translate 'Show on summaries' %}</a></li>
|
||||
{% else %}
|
||||
<li><a href="#"
|
||||
hx-get="{% url 'transaction_mute' transaction_id=transaction.id %}"
|
||||
hx-target="closest .transaction" hx-swap="outerHTML"><i
|
||||
class="fa-solid fa-eye-slash fa-fw tw:mr-2"></i>{% translate 'Hide from summaries' %}</a></li>
|
||||
{% endif %}
|
||||
<li><a href="#"
|
||||
hx-get="{% url 'quick_transaction_add_as_quick_transaction' transaction_id=transaction.id %}"><i
|
||||
class="fa-solid fa-person-running fa-fw tw:mr-2"></i>{% translate 'Add as quick transaction' %}</a>
|
||||
</li>
|
||||
{% elif transaction.category.mute %}
|
||||
<li>
|
||||
<a class="dropdown-item disabled d-flex align-items-center" aria-disabled="true">
|
||||
<i class="fa-solid fa-eye fa-fw me-2"></i>
|
||||
<div>
|
||||
{% translate 'Show on summaries' %}
|
||||
<div
|
||||
class="d-block text-body-secondary tw:text-xs tw:font-medium">{% translate 'Controlled by category' %}</div>
|
||||
</div>
|
||||
</a>
|
||||
<hr class="tw:my-1 tw:text-base-content/60">
|
||||
<li><a href="#"
|
||||
hx-get="{% url 'transaction_change_month' transaction_id=transaction.id change_type='previous' %}"><i
|
||||
class="fa-solid fa-calendar-minus fa-fw tw:mr-2"></i>{% translate 'Move to previous month' %}</a>
|
||||
</li>
|
||||
{% elif transaction.mute %}
|
||||
<li><a class="dropdown-item" href="#"
|
||||
hx-get="{% url 'transaction_mute' transaction_id=transaction.id %}"
|
||||
hx-target="closest .transaction" hx-swap="outerHTML"><i
|
||||
class="fa-solid fa-eye fa-fw me-2"></i>{% translate 'Show on summaries' %}</a></li>
|
||||
{% else %}
|
||||
<li><a class="dropdown-item" href="#"
|
||||
hx-get="{% url 'transaction_mute' transaction_id=transaction.id %}"
|
||||
hx-target="closest .transaction" hx-swap="outerHTML"><i
|
||||
class="fa-solid fa-eye-slash fa-fw me-2"></i>{% translate 'Hide from summaries' %}</a></li>
|
||||
{% endif %}
|
||||
<li><a class="dropdown-item" href="#"
|
||||
hx-get="{% url 'quick_transaction_add_as_quick_transaction' transaction_id=transaction.id %}"><i
|
||||
class="fa-solid fa-person-running fa-fw me-2"></i>{% translate 'Add as quick transaction' %}</a>
|
||||
</li>
|
||||
<li>
|
||||
<hr class="dropdown-divider">
|
||||
</li>
|
||||
<li><a class="dropdown-item" href="#"
|
||||
hx-get="{% url 'transaction_change_month' transaction_id=transaction.id change_type='previous' %}"><i
|
||||
class="fa-solid fa-calendar-minus fa-fw me-2"></i>{% translate 'Move to previous month' %}</a>
|
||||
</li>
|
||||
<li><a class="dropdown-item" href="#"
|
||||
hx-get="{% url 'transaction_change_month' transaction_id=transaction.id change_type='next' %}"><i
|
||||
class="fa-solid fa-calendar-plus fa-fw me-2"></i>{% translate 'Move to next month' %}</a></li>
|
||||
<li><a class="dropdown-item" href="#"
|
||||
hx-get="{% url 'transaction_move_to_today' transaction_id=transaction.id %}"><i
|
||||
class="fa-solid fa-calendar-day fa-fw me-2"></i>{% translate 'Move to today' %}</a></li>
|
||||
<li>
|
||||
<hr class="dropdown-divider">
|
||||
</li>
|
||||
<li><a class="dropdown-item" href="#"
|
||||
hx-get="{% url 'transaction_clone' transaction_id=transaction.id %}"><i
|
||||
class="fa-solid fa-clone fa-fw me-2"></i>{% translate 'Duplicate' %}</a></li>
|
||||
</ul>
|
||||
<li><a href="#"
|
||||
hx-get="{% url 'transaction_change_month' transaction_id=transaction.id change_type='next' %}"><i
|
||||
class="fa-solid fa-calendar-plus fa-fw tw:mr-2"></i>{% translate 'Move to next month' %}</a></li>
|
||||
<li><a href="#"
|
||||
hx-get="{% url 'transaction_move_to_today' transaction_id=transaction.id %}"><i
|
||||
class="fa-solid fa-calendar-day fa-fw tw:mr-2"></i>{% translate 'Move to today' %}</a></li>
|
||||
<hr class="tw:my-1 tw:text-base-content/60">
|
||||
<li><a href="#"
|
||||
hx-get="{% url 'transaction_clone' transaction_id=transaction.id %}"><i
|
||||
class="fa-solid fa-clone fa-fw tw:mr-2"></i>{% translate 'Duplicate' %}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<a class="btn btn-secondary btn-sm transaction-action"
|
||||
role="button"
|
||||
data-bs-toggle="tooltip"
|
||||
data-bs-title="{% translate "Restore" %}"
|
||||
hx-get="{% url 'transaction_undelete' transaction_id=transaction.id %}"><i
|
||||
class="fa-solid fa-trash-arrow-up"></i></a>
|
||||
<a class="btn btn-secondary btn-sm transaction-action"
|
||||
role="button"
|
||||
data-bs-toggle="tooltip"
|
||||
data-bs-title="{% translate "Delete" %}"
|
||||
hx-delete="{% url 'transaction_delete' transaction_id=transaction.id %}"
|
||||
hx-trigger='confirmed'
|
||||
data-bypass-on-ctrl="true"
|
||||
data-title="{% translate "Are you sure?" %}"
|
||||
data-text="{% translate "You won't be able to revert this!" %}"
|
||||
data-confirm-text="{% translate "Yes, delete it!" %}"
|
||||
_="install prompt_swal"><i class="fa-solid fa-trash fa-fw text-danger"></i>
|
||||
</a>
|
||||
<div class="tw:tooltip" data-tip="{% translate "Restore" %}">
|
||||
<a class="tw:btn tw:btn-secondary tw:btn-sm transaction-action"
|
||||
role="button"
|
||||
hx-get="{% url 'transaction_undelete' transaction_id=transaction.id %}"><i
|
||||
class="fa-solid fa-trash-arrow-up"></i></a>
|
||||
</div>
|
||||
<div class="tw:tooltip" data-tip="{% translate "Delete" %}">
|
||||
<a class="tw:btn tw:btn-secondary tw:btn-sm transaction-action"
|
||||
role="button"
|
||||
hx-delete="{% url 'transaction_delete' transaction_id=transaction.id %}"
|
||||
hx-trigger='confirmed'
|
||||
data-bypass-on-ctrl="true"
|
||||
data-title="{% translate "Are you sure?" %}"
|
||||
data-text="{% translate "You won't be able to revert this!" %}"
|
||||
data-confirm-text="{% translate "Yes, delete it!" %}"
|
||||
_="install prompt_swal"><i class="fa-solid fa-trash fa-fw tw:text-red-500"></i>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<div class="card mb-2 transaction-item">
|
||||
<div class="card-body p-2 tw:flex tw:items-center tw:gap-3" data-bs-toggle="collapse" data-bs-target="#{{ transaction.id }}" role="button" aria-expanded="false" aria-controls="{{ transaction.id }}">
|
||||
<div class="tw:card tw:bg-base-100 tw:shadow-xl tw:mb-2 transaction-item">
|
||||
<div class="tw:card-body tw:p-2 tw:flex tw:items-center tw:gap-3" data-bs-toggle="collapse" data-bs-target="#{{ transaction.id }}" role="button" aria-expanded="false" aria-controls="{{ transaction.id }}">
|
||||
<!-- Main visible content -->
|
||||
<div class="tw:flex flex-lg-row flex-column tw:lg:items-center tw:w-full tw:gap-3">
|
||||
<div class="tw:flex tw:flex-col tw:lg:flex-row tw:lg:items-center tw:w-full tw:gap-3">
|
||||
<!-- Type indicator -->
|
||||
<div class="tw:w-8">
|
||||
{% if transaction.type == 'IN' %}
|
||||
<span class="badge bg-success">↑</span>
|
||||
<span class="tw:badge tw:badge-success">↑</span>
|
||||
{% else %}
|
||||
<span class="badge bg-danger">↓</span>
|
||||
<span class="tw:badge tw:badge-error">↓</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Payment status -->
|
||||
<div class="tw:w-8">
|
||||
{% if transaction.is_paid %}
|
||||
<span class="badge bg-success">✓</span>
|
||||
<span class="tw:badge tw:badge-success">✓</span>
|
||||
{% else %}
|
||||
<span class="badge bg-warning">○</span>
|
||||
<span class="tw:badge tw:badge-warning">○</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</span>
|
||||
{% if transaction.exchanged_amount %}
|
||||
<br>
|
||||
<small class="text-muted">
|
||||
<small class="tw:text-base-content/60">
|
||||
{{ transaction.exchanged_amount.prefix }}{{ transaction.exchanged_amount.amount }}{{ transaction.exchanged_amount.suffix }}
|
||||
</small>
|
||||
{% endif %}
|
||||
@@ -41,50 +41,50 @@
|
||||
</div>
|
||||
|
||||
<!-- Expandable details -->
|
||||
<div class="collapse" id="{{ transaction.id }}">
|
||||
<div class="card-body p-3 transaction-details">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<dl class="row">
|
||||
<dt class="col-sm-4">Date</dt>
|
||||
<dd class="col-sm-8">{{ transaction.date|date:"Y-m-d" }}</dd>
|
||||
<div class="tw:collapse" id="{{ transaction.id }}">
|
||||
<div class="tw:card-body tw:p-3 transaction-details">
|
||||
<div class="tw:grid tw:grid-cols-1 tw:md:grid-cols-2">
|
||||
<div>
|
||||
<dl class="tw:grid tw:grid-cols-3">
|
||||
<dt class="tw:col-span-1">Date</dt>
|
||||
<dd class="tw:col-span-2">{{ transaction.date|date:"Y-m-d" }}</dd>
|
||||
|
||||
<dt class="col-sm-4">Reference Date</dt>
|
||||
<dd class="col-sm-8">{{ transaction.reference_date|date:"Y-m" }}</dd>
|
||||
<dt class="tw:col-span-1">Reference Date</dt>
|
||||
<dd class="tw:col-span-2">{{ transaction.reference_date|date:"Y-m" }}</dd>
|
||||
|
||||
<dt class="col-sm-4">Account</dt>
|
||||
<dd class="col-sm-8">{{ transaction.account.name }}</dd>
|
||||
<dt class="tw:col-span-1">Account</dt>
|
||||
<dd class="tw:col-span-2">{{ transaction.account.name }}</dd>
|
||||
|
||||
<dt class="col-sm-4">Category</dt>
|
||||
<dd class="col-sm-8">{{ transaction.category|default:"-" }}</dd>
|
||||
<dt class="tw:col-span-1">Category</dt>
|
||||
<dd class="tw:col-span-2">{{ transaction.category|default:"-" }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<dl class="row">
|
||||
<div>
|
||||
<dl class="tw:grid tw:grid-cols-3">
|
||||
{% if transaction.tags.exists %}
|
||||
<dt class="col-sm-4">Tags</dt>
|
||||
<dd class="col-sm-8">
|
||||
<dt class="tw:col-span-1">Tags</dt>
|
||||
<dd class="tw:col-span-2">
|
||||
{% for tag in transaction.tags.all %}
|
||||
<span class="badge bg-secondary">{{ tag.name }}</span>
|
||||
<span class="tw:badge tw:badge-secondary">{{ tag.name }}</span>
|
||||
{% endfor %}
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if transaction.installment_plan %}
|
||||
<dt class="col-sm-4">Installment</dt>
|
||||
<dd class="col-sm-8">
|
||||
<dt class="tw:col-span-1">Installment</dt>
|
||||
<dd class="tw:col-span-2">
|
||||
{{ transaction.installment_id }} of {{ transaction.installment_plan.total_installments }}
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if transaction.recurring_transaction %}
|
||||
<dt class="col-sm-4">Recurring</dt>
|
||||
<dd class="col-sm-8">Yes</dd>
|
||||
<dt class="tw:col-span-1">Recurring</dt>
|
||||
<dd class="tw:col-span-2">Yes</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if transaction.notes %}
|
||||
<dt class="col-sm-4">Notes</dt>
|
||||
<dd class="col-sm-8">{{ transaction.notes }}</dd>
|
||||
<dt class="tw:col-span-1">Notes</dt>
|
||||
<dd class="tw:col-span-2">{{ transaction.notes }}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
@@ -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"}'
|
||||
|
||||
Reference in New Issue
Block a user