mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-10 06:42:49 +02:00
feat: changes and fixes
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
url="{% url 'account_add' %}"
|
url="{% url 'account_add' %}"
|
||||||
hx_target="#generic-offcanvas">
|
hx_target="#generic-offcanvas">
|
||||||
</c-ui.fab-single-action>
|
</c-ui.fab-single-action>
|
||||||
<div class="container px-md-3 py-3 column-gap-5">
|
<div class="container">
|
||||||
<div class="text-3xl font-bold font-mono w-full mb-3">
|
<div class="text-3xl font-bold font-mono w-full mb-3">
|
||||||
{% spaceless %}
|
{% spaceless %}
|
||||||
<div>{% translate 'Accounts' %}</div>
|
<div>{% translate 'Accounts' %}</div>
|
||||||
|
|||||||
@@ -12,33 +12,31 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container px-md-3 py-3 gap-x-5 overflow-x-hidden">
|
<div class="container">
|
||||||
<div class="flex flex-wrap mb-4 gap-x-xl-4 gap-y-3">
|
<div class="flex flex-wrap mb-4 gap-x-xl-4 gap-y-3">
|
||||||
{# Date picker#}
|
{# Date picker#}
|
||||||
<div class="w-full xl:w-4/12 flex-row items-center flex">
|
<div class="w-full xl:w-4/12 flex-row items-center flex">
|
||||||
<div class="text-base h-full items-center flex btn btn-ghost">
|
<a role="button"
|
||||||
<a role="button"
|
hx-boost="true"
|
||||||
hx-boost="true"
|
class="btn btn-ghost"
|
||||||
hx-trigger="click, previous_month from:window"
|
hx-trigger="click, previous_month from:window"
|
||||||
href="{% url 'calendar' month=previous_month year=previous_year %}">
|
href="{% url 'calendar' month=previous_month year=previous_year %}">
|
||||||
<i class="fa-solid fa-chevron-left"></i>
|
<i class="fa-solid fa-chevron-left"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
<div class="text-2xl font-bold btn btn-ghost flex-1 text-center whitespace-normal flex-wrap h-auto min-w-0 1flex flex-"
|
||||||
<div class="text-2xl font-bold btn btn-ghost flex-1 text-center whitespace-normal flex-wrap h-auto min-w-0"
|
|
||||||
hx-get="{% url 'month_year_picker' %}"
|
hx-get="{% url 'month_year_picker' %}"
|
||||||
hx-target="#generic-offcanvas-left"
|
hx-target="#generic-offcanvas-left"
|
||||||
hx-trigger="click, date_picker from:window"
|
hx-trigger="click, date_picker from:window"
|
||||||
hx-vals='{"month": {{ month }}, "year": {{ year }}, "for": "calendar", "field": "date"}' role="button">
|
hx-vals='{"month": {{ month }}, "year": {{ year }}, "for": "calendar", "field": "date"}' role="button">
|
||||||
{{ month|month_name }} {{ year }}
|
{{ month|month_name }} {{ year }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-base h-full items-center flex btn btn-ghost">
|
<a role="button"
|
||||||
<a role="button"
|
hx-boost="true"
|
||||||
hx-boost="true"
|
class="btn btn-ghost"
|
||||||
hx-trigger="click, next_month from:window"
|
hx-trigger="click, next_month from:window"
|
||||||
href="{% url 'calendar' month=next_month year=next_year %}">
|
href="{% url 'calendar' month=next_month year=next_year %}">
|
||||||
<i class="fa-solid fa-chevron-right"></i>
|
<i class="fa-solid fa-chevron-right"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-wrap">
|
<div class="flex flex-wrap">
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
url="{% url 'dca_strategy_add' %}"
|
url="{% url 'dca_strategy_add' %}"
|
||||||
hx_target="#generic-offcanvas">
|
hx_target="#generic-offcanvas">
|
||||||
</c-ui.fab-single-action>
|
</c-ui.fab-single-action>
|
||||||
<div class="container px-md-3 py-3 column-gap-5">
|
<div class="container">
|
||||||
<div class="text-3xl font-bold font-mono w-full mb-3">
|
<div class="text-3xl font-bold font-mono w-full mb-3">
|
||||||
{% spaceless %}
|
{% spaceless %}
|
||||||
<div>{% translate 'Dollar Cost Average Strategies' %}</div>
|
<div>{% translate 'Dollar Cost Average Strategies' %}</div>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{% block title %}{% translate 'Export' %}{% endblock %}
|
{% block title %}{% translate 'Export' %}{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="container p-3">
|
<div class="container">
|
||||||
<form hx-post="{% url 'export_form' %}" hx-ext="htmx-download" hx-swap="none" id="export-form" class="show-loading px-1" target="_blank">
|
<form hx-post="{% url 'export_form' %}" hx-ext="htmx-download" hx-swap="none" id="export-form" class="show-loading px-1" target="_blank">
|
||||||
{% crispy form %}
|
{% crispy form %}
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{% block title %}{% translate 'Restore' %}{% endblock %}
|
{% block title %}{% translate 'Restore' %}{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="container p-3">
|
<div class="container">
|
||||||
<form hx-post="{% url 'restore_form' %}"
|
<form hx-post="{% url 'restore_form' %}"
|
||||||
hx-target="#generic-offcanvas"
|
hx-target="#generic-offcanvas"
|
||||||
id="restore-form"
|
id="restore-form"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load active_link %}
|
{% load active_link %}
|
||||||
<nav class="navbar border-b-2 border-base-100 bg-base-200 flex lg:hidden shadow-lg" hx-boost="true">
|
<nav class="navbar border-b-2 border-base-100 bg-base-200 flex lg:hidden shadow-lg" hx-boost="true">
|
||||||
<div class="container mx-auto px-4 flex justify-between items-center w-full">
|
<div class="container flex justify-between items-center w-full">
|
||||||
<a class="text-xl font-bold text-primary" href="{% url 'index' %}">
|
<a class="text-xl font-bold text-primary" href="{% url 'index' %}">
|
||||||
<div class="logo mobile"></div>
|
<div class="logo mobile"></div>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -269,18 +269,19 @@
|
|||||||
</div>
|
</div>
|
||||||
{% get_update_check as update_check %}
|
{% get_update_check as update_check %}
|
||||||
{% if update_check.update_available %}
|
{% if update_check.update_available %}
|
||||||
<div class="my-3">
|
<div class="my-3 sidebar-item">
|
||||||
<a class="btn btn-primary btn-soft btn-sm w-full sidebar-item"
|
<a class="btn btn-primary btn-soft btn-sm w-full !block content-center"
|
||||||
href="https://github.com/eitchtee/WYGIWYH/releases/latest" target="_blank"><i
|
href="https://github.com/eitchtee/WYGIWYH/releases/latest" target="_blank">
|
||||||
class="fa-solid fa-circle-exclamation fa-fw lg:group-hover:me-2"></i><span
|
<i class="fa-solid fa-circle-exclamation fa-fw lg:group-hover:me-2"></i>
|
||||||
class="lg:hidden lg:group-hover:block">v.{{ update_check.latest_version }} {% translate 'is available' %}!</span></a>
|
<span>v.{{ update_check.latest_version }} {% translate 'is available' %}!</span></a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="btn-group w-full sidebar-item" role="group">
|
<div class="w-full sidebar-item" role="group">
|
||||||
<button type="button" class="btn btn-secondary btn-sm w-full" data-tippy-content="{% trans "Calculator" %}"
|
<button type="button" class="btn btn-secondary btn-sm w-full !block content-center"
|
||||||
_="on click trigger show on #calculator">
|
_="on click trigger show on #calculator">
|
||||||
<i class="fa-solid fa-calculator fa-fw"></i>
|
<i class="fa-solid fa-calculator fa-fw lg:group-hover:me-2"></i>
|
||||||
|
<span>{% trans "Calculator" %}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row gap-3">
|
||||||
<div class="col-12 lg:col-6">
|
<div class="col-12 lg:col-6">
|
||||||
<div class="card bg-base-100 shadow-xl h-full">
|
<div class="card bg-base-100 card-border shadow h-full">
|
||||||
<div class="card-header bg-base-200 p-4 font-semibold rounded-box shadow">
|
<div class="card-header bg-base-200 p-4 font-semibold rounded-box shadow">
|
||||||
{% trans "Income/Expense by Account" %}
|
{% trans "Income/Expense by Account" %}
|
||||||
</div>
|
</div>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 lg:col-6">
|
<div class="col-12 lg:col-6">
|
||||||
<div class="card bg-base-100 shadow-xl h-full">
|
<div class="card bg-base-100 card-border shadow h-full">
|
||||||
<div class="card-header bg-base-200 p-4 font-semibold rounded-box shadow">
|
<div class="card-header bg-base-200 p-4 font-semibold rounded-box shadow">
|
||||||
{% trans "Income/Expense by Currency" %}
|
{% trans "Income/Expense by Currency" %}
|
||||||
</div>
|
</div>
|
||||||
@@ -42,4 +42,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,25 +6,25 @@
|
|||||||
<div class="tabs tabs-box mx-auto w-fit" role="group" id="view-type" _="on change trigger updated">
|
<div class="tabs tabs-box mx-auto w-fit" role="group" id="view-type" _="on change trigger updated">
|
||||||
<label class="tab">
|
<label class="tab">
|
||||||
<input type="radio"
|
<input type="radio"
|
||||||
name="view_type"
|
name="view_type"
|
||||||
id="table-view"
|
id="table-view"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
value="table"
|
value="table"
|
||||||
aria-label="{% trans 'Table' %}"
|
aria-label="{% trans 'Table' %}"
|
||||||
{% if view_type == "table" %}checked{% endif %}>
|
{% if view_type == "table" %}checked{% endif %}>
|
||||||
<i class="fa-solid fa-table fa-fw me-2"></i>
|
<i class="fa-solid fa-table fa-fw me-2"></i>
|
||||||
{% trans 'Table' %}
|
{% trans 'Table' %}
|
||||||
</label>
|
</label>
|
||||||
<label class="tab">
|
<label class="tab">
|
||||||
<input type="radio"
|
<input type="radio"
|
||||||
name="view_type"
|
name="view_type"
|
||||||
id="bars-view"
|
id="bars-view"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
value="bars"
|
value="bars"
|
||||||
aria-label="{% trans 'Bars' %}"
|
aria-label="{% trans 'Bars' %}"
|
||||||
{% if view_type == "bars" %}checked{% endif %}>
|
{% if view_type == "bars" %}checked{% endif %}>
|
||||||
<i class="fa-solid fa-chart-bar fa-fw me-2"></i>
|
<i class="fa-solid fa-chart-bar fa-fw me-2"></i>
|
||||||
{% trans 'Bars' %}
|
{% trans 'Bars' %}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -47,7 +47,8 @@
|
|||||||
<div id="show-entities" class="{% if not show_tags %}hidden{% endif %}">
|
<div id="show-entities" class="{% if not show_tags %}hidden{% endif %}">
|
||||||
<label class="label">
|
<label class="label">
|
||||||
<input type="hidden" name="show_entities" value="off">
|
<input type="hidden" name="show_entities" value="off">
|
||||||
<input type="checkbox" class="toggle toggle-primary toggle-sm" id="show-entities-switch" name="show_entities"
|
<input type="checkbox" class="toggle toggle-primary toggle-sm" id="show-entities-switch"
|
||||||
|
name="show_entities"
|
||||||
_="on change trigger updated" {% if show_entities %}checked{% endif %}>
|
_="on change trigger updated" {% if show_entities %}checked{% endif %}>
|
||||||
<span>
|
<span>
|
||||||
{% trans 'Entities' %}
|
{% trans 'Entities' %}
|
||||||
@@ -60,316 +61,321 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="join" role="group" id="showing" _="on change trigger updated">
|
<div class="join" role="group" id="showing" _="on change trigger updated">
|
||||||
<input type="radio" class="join-item btn btn-outline btn-primary btn-sm" name="showing" id="showing-projected" autocomplete="off" aria-label="{% trans 'Projected' %}"
|
<input type="radio" class="join-item btn btn-outline btn-primary btn-sm" name="showing" id="showing-projected"
|
||||||
|
autocomplete="off" aria-label="{% trans 'Projected' %}"
|
||||||
value="projected" {% if showing == 'projected' %}checked{% endif %}>
|
value="projected" {% if showing == 'projected' %}checked{% endif %}>
|
||||||
|
|
||||||
<input type="radio" class="join-item btn btn-outline btn-primary btn-sm" name="showing" id="showing-current" autocomplete="off" value="current" aria-label="{% trans 'Current' %}"
|
<input type="radio" class="join-item btn btn-outline btn-primary btn-sm" name="showing" id="showing-current"
|
||||||
|
autocomplete="off" value="current" aria-label="{% trans 'Current' %}"
|
||||||
{% if showing == 'current' %}checked{% endif %}>
|
{% if showing == 'current' %}checked{% endif %}>
|
||||||
|
|
||||||
<input type="radio" class="join-item btn btn-outline btn-primary btn-sm" name="showing" id="showing-final" autocomplete="off" value="final" aria-label="{% trans 'Final total' %}"
|
<input type="radio" class="join-item btn btn-outline btn-primary btn-sm" name="showing" id="showing-final"
|
||||||
|
autocomplete="off" value="final" aria-label="{% trans 'Final total' %}"
|
||||||
{% if showing == 'final' %}checked{% endif %}>
|
{% if showing == 'final' %}checked{% endif %}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if total_table %}
|
{% if total_table %}
|
||||||
{% if view_type == "table" %}
|
{% if view_type == "table" %}
|
||||||
<div class="card bg-base-100 card-border">
|
<div class="card bg-base-100 card-border">
|
||||||
<c-config.search></c-config.search>
|
<div class="card-body">
|
||||||
<div class="overflow-x-auto">
|
<c-config.search></c-config.search>
|
||||||
<table class="table">
|
<div class="overflow-x-auto">
|
||||||
<thead>
|
<table class="table">
|
||||||
<tr>
|
<thead>
|
||||||
<th scope="col">{% trans 'Category' %}</th>
|
<tr>
|
||||||
<th scope="col">{% trans 'Income' %}</th>
|
<th scope="col">{% trans 'Category' %}</th>
|
||||||
<th scope="col">{% trans 'Expense' %}</th>
|
<th scope="col">{% trans 'Income' %}</th>
|
||||||
<th scope="col">{% trans 'Total' %}</th>
|
<th scope="col">{% trans 'Expense' %}</th>
|
||||||
</tr>
|
<th scope="col">{% trans 'Total' %}</th>
|
||||||
</thead>
|
</tr>
|
||||||
<tbody>
|
</thead>
|
||||||
{% for category in total_table.values %}
|
<tbody>
|
||||||
<!-- Category row -->
|
{% for category in total_table.values %}
|
||||||
<tr class="font-semibold">
|
{# Category row #}
|
||||||
<th>{% if category.name %}{{ category.name }}{% else %}{% trans 'Uncategorized' %}{% endif %}</th>
|
<tr class="font-semibold">
|
||||||
<td> {# income #}
|
<th class="text-nowrap">{% if category.name %}{{ category.name }}{% else %}{% trans 'Uncategorized' %}{% endif %}</th>
|
||||||
{% for currency in category.currencies.values %}
|
<td class="text-nowrap">
|
||||||
{% if showing == 'current' and currency.income_current != 0 %}
|
{% for currency in category.currencies.values %}
|
||||||
<c-amount.display
|
{% if showing == 'current' and currency.income_current != 0 %}
|
||||||
:amount="currency.income_current"
|
<c-amount.display
|
||||||
:prefix="currency.currency.prefix"
|
:amount="currency.income_current"
|
||||||
:suffix="currency.currency.suffix"
|
:prefix="currency.currency.prefix"
|
||||||
:decimal_places="currency.currency.decimal_places"
|
:suffix="currency.currency.suffix"
|
||||||
color="green"></c-amount.display>
|
:decimal_places="currency.currency.decimal_places"
|
||||||
{% elif showing == 'projected' and currency.income_projected != 0 %}
|
color="green"></c-amount.display>
|
||||||
<c-amount.display
|
{% elif showing == 'projected' and currency.income_projected != 0 %}
|
||||||
:amount="currency.income_projected"
|
<c-amount.display
|
||||||
:prefix="currency.currency.prefix"
|
:amount="currency.income_projected"
|
||||||
:suffix="currency.currency.suffix"
|
:prefix="currency.currency.prefix"
|
||||||
:decimal_places="currency.currency.decimal_places"
|
:suffix="currency.currency.suffix"
|
||||||
color="green"></c-amount.display>
|
:decimal_places="currency.currency.decimal_places"
|
||||||
{% elif showing == 'final' and currency.total_income != 0 %}
|
color="green"></c-amount.display>
|
||||||
<c-amount.display
|
{% elif showing == 'final' and currency.total_income != 0 %}
|
||||||
:amount="currency.total_income"
|
<c-amount.display
|
||||||
:prefix="currency.currency.prefix"
|
:amount="currency.total_income"
|
||||||
:suffix="currency.currency.suffix"
|
:prefix="currency.currency.prefix"
|
||||||
:decimal_places="currency.currency.decimal_places"
|
:suffix="currency.currency.suffix"
|
||||||
color="green"></c-amount.display>
|
:decimal_places="currency.currency.decimal_places"
|
||||||
{% else %}
|
color="green"></c-amount.display>
|
||||||
<div>-</div>
|
{% else %}
|
||||||
{% endif %}
|
<div>-</div>
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
<td> {# expenses #}
|
|
||||||
{% for currency in category.currencies.values %}
|
|
||||||
{% if showing == 'current' and currency.expense_current != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.expense_current"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="red"></c-amount.display>
|
|
||||||
{% elif showing == 'projected' and currency.expense_projected != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.expense_projected"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="red"></c-amount.display>
|
|
||||||
{% elif showing == 'final' and currency.total_expense != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.total_expense"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="red"></c-amount.display>
|
|
||||||
{% else %}
|
|
||||||
<div>-</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
<td> {# total #}
|
|
||||||
{% for currency in category.currencies.values %}
|
|
||||||
{% if showing == 'current' and currency.total_current != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.total_current"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
|
||||||
{% elif showing == 'projected' and currency.total_projected != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.total_projected"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
|
||||||
{% elif showing == 'final' and currency.total_final != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.total_final"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
|
||||||
{% else %}
|
|
||||||
<div>-</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<!-- Tag rows -->
|
|
||||||
{% if show_tags %}
|
|
||||||
{% for tag_id, tag in category.tags.items %}
|
|
||||||
{% if tag.name or not tag.name and category.tags.values|length > 1 %}
|
|
||||||
<tr class="bg-base-200">
|
|
||||||
<td class="ps-6">
|
|
||||||
<i class="fa-solid fa-hashtag fa-fw me-2 text-base-content/60"></i>{% if tag.name %}{{ tag.name }}{% else %}{% trans 'Untagged' %}{% endif %}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% for currency in tag.currencies.values %}
|
|
||||||
{% if showing == 'current' and currency.income_current != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.income_current"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="green"></c-amount.display>
|
|
||||||
{% elif showing == 'projected' and currency.income_projected != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.income_projected"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="green"></c-amount.display>
|
|
||||||
{% elif showing == 'final' and currency.total_income != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.total_income"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="green"></c-amount.display>
|
|
||||||
{% else %}
|
|
||||||
<div>-</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% for currency in tag.currencies.values %}
|
|
||||||
{% if showing == 'current' and currency.expense_current != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.expense_current"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="red"></c-amount.display>
|
|
||||||
{% elif showing == 'projected' and currency.expense_projected != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.expense_projected"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="red"></c-amount.display>
|
|
||||||
{% elif showing == 'final' and currency.total_expense != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.total_expense"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="red"></c-amount.display>
|
|
||||||
{% else %}
|
|
||||||
<div>-</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% for currency in tag.currencies.values %}
|
|
||||||
{% if showing == 'current' and currency.total_current != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.total_current"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
|
||||||
{% elif showing == 'projected' and currency.total_projected != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.total_projected"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
|
||||||
{% elif showing == 'final' and currency.total_final != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.total_final"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
|
||||||
{% else %}
|
|
||||||
<div>-</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<!-- Entity rows -->
|
|
||||||
{% if show_entities %}
|
|
||||||
{% for entity_id, entity in tag.entities.items %}
|
|
||||||
{% if entity.name or not entity.name and tag.entities.values|length > 1 %}
|
|
||||||
<tr class="bg-base-300">
|
|
||||||
<td class="ps-10">
|
|
||||||
<i class="fa-solid fa-user-group fa-fw me-2 text-base-content/60"></i>{% if entity.name %}{{ entity.name }}{% else %}{% trans 'No entity' %}{% endif %}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% for currency in entity.currencies.values %}
|
|
||||||
{% if showing == 'current' and currency.income_current != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.income_current"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="green"></c-amount.display>
|
|
||||||
{% elif showing == 'projected' and currency.income_projected != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.income_projected"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="green"></c-amount.display>
|
|
||||||
{% elif showing == 'final' and currency.total_income != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.total_income"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="green"></c-amount.display>
|
|
||||||
{% else %}
|
|
||||||
<div>-</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% for currency in entity.currencies.values %}
|
|
||||||
{% if showing == 'current' and currency.expense_current != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.expense_current"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="red"></c-amount.display>
|
|
||||||
{% elif showing == 'projected' and currency.expense_projected != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.expense_projected"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="red"></c-amount.display>
|
|
||||||
{% elif showing == 'final' and currency.total_expense != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.total_expense"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="red"></c-amount.display>
|
|
||||||
{% else %}
|
|
||||||
<div>-</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% for currency in entity.currencies.values %}
|
|
||||||
{% if showing == 'current' and currency.total_current != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.total_current"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
|
||||||
{% elif showing == 'projected' and currency.total_projected != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.total_projected"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
|
||||||
{% elif showing == 'final' and currency.total_final != 0 %}
|
|
||||||
<c-amount.display
|
|
||||||
:amount="currency.total_final"
|
|
||||||
:prefix="currency.currency.prefix"
|
|
||||||
:suffix="currency.currency.suffix"
|
|
||||||
:decimal_places="currency.currency.decimal_places"
|
|
||||||
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
|
||||||
{% else %}
|
|
||||||
<div>-</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
</td>
|
||||||
|
<td class="text-nowrap">
|
||||||
|
{% for currency in category.currencies.values %}
|
||||||
|
{% if showing == 'current' and currency.expense_current != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.expense_current"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="red"></c-amount.display>
|
||||||
|
{% elif showing == 'projected' and currency.expense_projected != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.expense_projected"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="red"></c-amount.display>
|
||||||
|
{% elif showing == 'final' and currency.total_expense != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.total_expense"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="red"></c-amount.display>
|
||||||
|
{% else %}
|
||||||
|
<div>-</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
<td class="text-nowrap">
|
||||||
|
{% for currency in category.currencies.values %}
|
||||||
|
{% if showing == 'current' and currency.total_current != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.total_current"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
||||||
|
{% elif showing == 'projected' and currency.total_projected != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.total_projected"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
||||||
|
{% elif showing == 'final' and currency.total_final != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.total_final"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
||||||
|
{% else %}
|
||||||
|
<div>-</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- Tag rows -->
|
||||||
|
{% if show_tags %}
|
||||||
|
{% for tag_id, tag in category.tags.items %}
|
||||||
|
{% if tag.name or not tag.name and category.tags.values|length > 1 %}
|
||||||
|
<tr class="bg-base-200">
|
||||||
|
<td class="ps-6 text-nowrap">
|
||||||
|
<i class="fa-solid fa-hashtag fa-fw me-2 text-base-content/60"></i>{% if tag.name %}{{ tag.name }}{% else %}{% trans 'Untagged' %}{% endif %}
|
||||||
|
</td>
|
||||||
|
<td class="text-nowrap">
|
||||||
|
{% for currency in tag.currencies.values %}
|
||||||
|
{% if showing == 'current' and currency.income_current != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.income_current"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="green"></c-amount.display>
|
||||||
|
{% elif showing == 'projected' and currency.income_projected != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.income_projected"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="green"></c-amount.display>
|
||||||
|
{% elif showing == 'final' and currency.total_income != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.total_income"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="green"></c-amount.display>
|
||||||
|
{% else %}
|
||||||
|
<div>-</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
<td class="text-nowrap">
|
||||||
|
{% for currency in tag.currencies.values %}
|
||||||
|
{% if showing == 'current' and currency.expense_current != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.expense_current"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="red"></c-amount.display>
|
||||||
|
{% elif showing == 'projected' and currency.expense_projected != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.expense_projected"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="red"></c-amount.display>
|
||||||
|
{% elif showing == 'final' and currency.total_expense != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.total_expense"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="red"></c-amount.display>
|
||||||
|
{% else %}
|
||||||
|
<div>-</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
<td class="text-nowrap">
|
||||||
|
{% for currency in tag.currencies.values %}
|
||||||
|
{% if showing == 'current' and currency.total_current != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.total_current"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
||||||
|
{% elif showing == 'projected' and currency.total_projected != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.total_projected"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
||||||
|
{% elif showing == 'final' and currency.total_final != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.total_final"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
||||||
|
{% else %}
|
||||||
|
<div>-</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{# Entity rows #}
|
||||||
|
{% if show_entities %}
|
||||||
|
{% for entity_id, entity in tag.entities.items %}
|
||||||
|
{% if entity.name or not entity.name and tag.entities.values|length > 1 %}
|
||||||
|
<tr class="bg-base-300">
|
||||||
|
<td class="ps-10 text-nowrap">
|
||||||
|
<i class="fa-solid fa-user-group fa-fw me-2 text-base-content/60"></i>{% if entity.name %}{{ entity.name }}{% else %}{% trans 'No entity' %}{% endif %}
|
||||||
|
</td>
|
||||||
|
<td class="text-nowrap">
|
||||||
|
{% for currency in entity.currencies.values %}
|
||||||
|
{% if showing == 'current' and currency.income_current != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.income_current"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="green"></c-amount.display>
|
||||||
|
{% elif showing == 'projected' and currency.income_projected != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.income_projected"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="green"></c-amount.display>
|
||||||
|
{% elif showing == 'final' and currency.total_income != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.total_income"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="green"></c-amount.display>
|
||||||
|
{% else %}
|
||||||
|
<div>-</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
<td class="text-nowrap">
|
||||||
|
{% for currency in entity.currencies.values %}
|
||||||
|
{% if showing == 'current' and currency.expense_current != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.expense_current"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="red"></c-amount.display>
|
||||||
|
{% elif showing == 'projected' and currency.expense_projected != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.expense_projected"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="red"></c-amount.display>
|
||||||
|
{% elif showing == 'final' and currency.total_expense != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.total_expense"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="red"></c-amount.display>
|
||||||
|
{% else %}
|
||||||
|
<div>-</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
<td class="text-nowrap">
|
||||||
|
{% for currency in entity.currencies.values %}
|
||||||
|
{% if showing == 'current' and currency.total_current != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.total_current"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
||||||
|
{% elif showing == 'projected' and currency.total_projected != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.total_projected"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
||||||
|
{% elif showing == 'final' and currency.total_final != 0 %}
|
||||||
|
<c-amount.display
|
||||||
|
:amount="currency.total_final"
|
||||||
|
:prefix="currency.currency.prefix"
|
||||||
|
:suffix="currency.currency.suffix"
|
||||||
|
:decimal_places="currency.currency.decimal_places"
|
||||||
|
color="{% if currency.total_final < 0 %}red{% else %}green{% endif %}"></c-amount.display>
|
||||||
|
{% else %}
|
||||||
|
<div>-</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
</tbody>
|
||||||
{% endfor %}
|
</table>
|
||||||
</tbody>
|
</div>
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -73,22 +73,22 @@
|
|||||||
remove .btn-active from <.insights-list button/>
|
remove .btn-active from <.insights-list button/>
|
||||||
add .btn-active to event.target
|
add .btn-active to event.target
|
||||||
set event.target's @aria-selected to 'true'">
|
set event.target's @aria-selected to 'true'">
|
||||||
<button class="btn btn-ghost justify-start text-start"
|
<button class="btn btn-ghost btn-free justify-start text-start"
|
||||||
type="button" role="tab" aria-controls="v-pills-content" aria-selected="false"
|
type="button" role="tab" aria-controls="v-pills-content" aria-selected="false"
|
||||||
hx-get="{% url 'insights_sankey_by_account' %}">
|
hx-get="{% url 'insights_sankey_by_account' %}">
|
||||||
{% trans 'Account Flow' %}
|
{% trans 'Account Flow' %}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-ghost justify-start text-start" data-bs-target="#v-pills-content"
|
<button class="btn btn-ghost btn-free justify-start text-start" data-bs-target="#v-pills-content"
|
||||||
type="button" role="tab" aria-controls="v-pills-content" aria-selected="false"
|
type="button" role="tab" aria-controls="v-pills-content" aria-selected="false"
|
||||||
hx-get="{% url 'insights_sankey_by_currency' %}"
|
hx-get="{% url 'insights_sankey_by_currency' %}"
|
||||||
>{% trans 'Currency Flow' %}
|
>{% trans 'Currency Flow' %}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-ghost justify-start text-start" data-bs-target="#v-pills-content"
|
<button class="btn btn-ghost btn-free justify-start text-start" data-bs-target="#v-pills-content"
|
||||||
type="button" role="tab" aria-controls="v-pills-content" aria-selected="false"
|
type="button" role="tab" aria-controls="v-pills-content" aria-selected="false"
|
||||||
hx-get="{% url 'category_explorer_index' %}">
|
hx-get="{% url 'category_explorer_index' %}">
|
||||||
{% trans 'Category Explorer' %}
|
{% trans 'Category Explorer' %}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-ghost justify-start text-start" data-bs-target="#v-pills-content"
|
<button class="btn btn-ghost btn-free justify-start text-start" data-bs-target="#v-pills-content"
|
||||||
type="button" role="tab" aria-controls="v-pills-content" aria-selected="false"
|
type="button" role="tab" aria-controls="v-pills-content" aria-selected="false"
|
||||||
hx-get="{% url 'category_overview' %}"
|
hx-get="{% url 'category_overview' %}"
|
||||||
>{% trans 'Categories Overview' %}
|
>{% trans 'Categories Overview' %}
|
||||||
@@ -106,17 +106,17 @@
|
|||||||
remove .btn-active from <.insights-list button/>
|
remove .btn-active from <.insights-list button/>
|
||||||
add .btn-active to event.target
|
add .btn-active to event.target
|
||||||
set event.target's @aria-selected to 'true'">
|
set event.target's @aria-selected to 'true'">
|
||||||
<button class="btn btn-ghost justify-start text-start" data-bs-target="#v-pills-content"
|
<button class="btn btn-ghost btn-free justify-start text-start" data-bs-target="#v-pills-content"
|
||||||
type="button" role="tab" aria-controls="v-pills-content" aria-selected="false"
|
type="button" role="tab" aria-controls="v-pills-content" aria-selected="false"
|
||||||
hx-get="{% url 'insights_late_transactions' %}">
|
hx-get="{% url 'insights_late_transactions' %}">
|
||||||
{% trans 'Late Transactions' %}
|
{% trans 'Late Transactions' %}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-ghost justify-start text-start" data-bs-target="#v-pills-content"
|
<button class="btn btn-ghost btn-free justify-start text-start" data-bs-target="#v-pills-content"
|
||||||
type="button" role="tab" aria-controls="v-pills-content" aria-selected="false"
|
type="button" role="tab" aria-controls="v-pills-content" aria-selected="false"
|
||||||
hx-get="{% url 'insights_latest_transactions' %}">
|
hx-get="{% url 'insights_latest_transactions' %}">
|
||||||
{% trans 'Latest Transactions' %}
|
{% trans 'Latest Transactions' %}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-ghost justify-start text-start" data-bs-target="#v-pills-content"
|
<button class="btn btn-ghost btn-free justify-start text-start" data-bs-target="#v-pills-content"
|
||||||
type="button" role="tab" aria-controls="v-pills-content" aria-selected="false"
|
type="button" role="tab" aria-controls="v-pills-content" aria-selected="false"
|
||||||
hx-get="{% url 'insights_emergency_fund' %}">
|
hx-get="{% url 'insights_emergency_fund' %}">
|
||||||
{% trans 'Emergency Fund' %}
|
{% trans 'Emergency Fund' %}
|
||||||
@@ -126,6 +126,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<hr class="xl:hidden hr">
|
||||||
|
|
||||||
<div class="col-12 md:col-9 gy-3">
|
<div class="col-12 md:col-9 gy-3">
|
||||||
<div id="tab-content" class="show-loading"></div>
|
<div id="tab-content" class="show-loading"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -17,13 +17,13 @@
|
|||||||
<div class="col-12 lg:col-4">
|
<div class="col-12 lg:col-4">
|
||||||
{# Date picker#}
|
{# Date picker#}
|
||||||
<div class="flex flex-row items-center">
|
<div class="flex flex-row items-center">
|
||||||
<div class="text-base h-full flex items-center btn btn-ghost">
|
<a role="button"
|
||||||
<a role="button"
|
class="btn btn-ghost"
|
||||||
hx-boost="true"
|
hx-boost="true"
|
||||||
hx-trigger="click, previous_month from:window"
|
hx-trigger="click, previous_month from:window"
|
||||||
href="{% url 'monthly_overview' month=previous_month year=previous_year %}"><i
|
href="{% url 'monthly_overview' month=previous_month year=previous_year %}">
|
||||||
class="fa-solid fa-chevron-left"></i></a>
|
<i class="fa-solid fa-chevron-left"></i>
|
||||||
</div>
|
</a>
|
||||||
<div class="text-2xl font-bold btn btn-ghost flex-1 text-center whitespace-normal flex-wrap h-auto min-w-0"
|
<div class="text-2xl font-bold btn btn-ghost flex-1 text-center whitespace-normal flex-wrap h-auto min-w-0"
|
||||||
hx-get="{% url 'month_year_picker' %}"
|
hx-get="{% url 'month_year_picker' %}"
|
||||||
hx-target="#generic-offcanvas-left"
|
hx-target="#generic-offcanvas-left"
|
||||||
@@ -32,14 +32,13 @@
|
|||||||
role="button">
|
role="button">
|
||||||
{{ month|month_name }} {{ year }}
|
{{ month|month_name }} {{ year }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-base h-full flex items-center btn btn-ghost">
|
<a role="button"
|
||||||
<a role="button"
|
class="btn btn-ghost"
|
||||||
hx-boost="true"
|
hx-boost="true"
|
||||||
hx-trigger="click, next_month from:window"
|
hx-trigger="click, next_month from:window"
|
||||||
href="{% url 'monthly_overview' month=next_month year=next_year %}">
|
href="{% url 'monthly_overview' month=next_month year=next_year %}">
|
||||||
<i class="fa-solid fa-chevron-right"></i>
|
<i class="fa-solid fa-chevron-right"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a class="text-base-content/60 select-auto">
|
<a class="text-base-content/60 select-auto flex justify-between items-center w-full">
|
||||||
<span class="text-start shrink">{% trans "Consolidated" %}</span>
|
<span class="text-start shrink">{% trans "Consolidated" %}</span>
|
||||||
<span class="text-end shrink-0">
|
<span class="text-end shrink-0">
|
||||||
<c-amount.display :amount="currency.consolidated.total_final" :prefix="currency.consolidated.currency.prefix" :suffix="currency.consolidated.currency.suffix" :decimal_places="currency.consolidated.currency.decimal_places" color="{% if currency.consolidated.total_final > 0 %}green{% elif currency.consolidated.total_final < 0 %}red{% endif %}" text-end></c-amount.display>
|
<c-amount.display :amount="currency.consolidated.total_final" :prefix="currency.consolidated.currency.prefix" :suffix="currency.consolidated.currency.suffix" :decimal_places="currency.consolidated.currency.decimal_places" color="{% if currency.consolidated.total_final > 0 %}green{% elif currency.consolidated.total_final < 0 %}red{% endif %}" text-end></c-amount.display>
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
id="tab-evolution"
|
id="tab-evolution"
|
||||||
checked="checked" />
|
checked="checked" />
|
||||||
<div role="tabpanel" class="tab-content p-4" id="evolution-tab-pane">
|
<div role="tabpanel" class="tab-content p-4" id="evolution-tab-pane">
|
||||||
<div class="chart-container relative min-h-[40vh] h-full w-full">
|
<div class="chart-container relative min-h-[80vh] md:min-h-[40vh] h-full w-full">
|
||||||
<canvas id="currencyBalanceChart"></canvas>
|
<canvas id="currencyBalanceChart"></canvas>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
aria-label="{% trans 'Difference' %}"
|
aria-label="{% trans 'Difference' %}"
|
||||||
id="tab-diff" />
|
id="tab-diff" />
|
||||||
<div role="tabpanel" class="tab-content p-4" id="diff-tab-pane">
|
<div role="tabpanel" class="tab-content p-4" id="diff-tab-pane">
|
||||||
<div class="chart-container relative min-h-[40vh] h-full w-full">
|
<div class="chart-container relative min-h-[80vh] md:min-h-[40vh] h-full w-full">
|
||||||
<canvas id="monthlyDifferenceChart"></canvas>
|
<canvas id="monthlyDifferenceChart"></canvas>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -194,7 +194,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col lg:col-7">
|
<div class="col lg:col-7">
|
||||||
<div class="chart-container relative min-h-[40vh] h-full card bg-base-100">
|
<div class="chart-container relative min-h-[80vh] md:min-h-[40vh] h-full card bg-base-100">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<canvas id="accountBalanceChart"></canvas>
|
<canvas id="accountBalanceChart"></canvas>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
{% endspaceless %}
|
{% endspaceless %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card bg-base-100 shadow-xl">
|
<div class="card card-border bg-base-100 shadow w-full">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div id="tags-table">
|
<div id="tags-table">
|
||||||
{% if users %}
|
{% if users %}
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
{% load month_name %}
|
{% load month_name %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
{% block title %}{% translate 'Yearly Overview' %} :: {% block overview_type_title %}{% endblock %} :: {{ year }}{% endblock %}
|
{% block title %}{% translate 'Yearly Overview' %} ::
|
||||||
|
{% block overview_type_title %}{% endblock %} :: {{ year }}{% endblock %}
|
||||||
|
|
||||||
{% block body_hyperscript %}
|
{% block body_hyperscript %}
|
||||||
on keyup[code is 'ArrowLeft' and target.nodeName is 'BODY'] from body trigger 'previous_year' end
|
on keyup[code is 'ArrowLeft' and target.nodeName is 'BODY'] from body trigger 'previous_year' end
|
||||||
@@ -13,31 +14,33 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="h-full text-center mb-4 w-full">
|
<div class="h-full text-center mb-4 w-full">
|
||||||
<div role="tablist" class="tabs tabs-box mx-auto w-fit">
|
<div role="tablist" class="tabs tabs-box mx-auto w-fit">
|
||||||
<a href="{% url 'yearly_overview_currency' year=year %}" class="tab {% if type == 'currency' %}tab-active{% endif %}" hx-boost>
|
<a href="{% url 'yearly_overview_currency' year=year %}"
|
||||||
|
class="tab {% if type == 'currency' %}tab-active{% endif %}" hx-boost>
|
||||||
<i class="fa-solid fa-solid fa-coins fa-fw me-2"></i>{% trans 'Currency' %}
|
<i class="fa-solid fa-solid fa-coins fa-fw me-2"></i>{% trans 'Currency' %}
|
||||||
</a>
|
</a>
|
||||||
<a href="{% url 'yearly_overview_account' year=year %}" class="tab {% if type == 'account' %}tab-active{% endif %}" hx-boost>
|
<a href="{% url 'yearly_overview_account' year=year %}"
|
||||||
|
class="tab {% if type == 'account' %}tab-active{% endif %}" hx-boost>
|
||||||
<i class="fa-solid fa-wallet fa-fw me-2"></i>{% trans 'Account' %}
|
<i class="fa-solid fa-wallet fa-fw me-2"></i>{% trans 'Account' %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="container" id="yearly-content">
|
<div class="container" id="yearly-content">
|
||||||
<div class="flex flex-wrap mb-4 gap-x-xl-4 gap-y-3">
|
<div class="row mt-7 mb-5">
|
||||||
{# Date picker#}
|
{# Date picker #}
|
||||||
<div class="w-full xl:w-auto flex-row items-center flex">
|
<div class="col-12 lg:col-3">
|
||||||
<div class="text-base h-full items-center flex btn btn-ghost">
|
<div class="flex flex-row items-center">
|
||||||
<a role="button"
|
<a role="button"
|
||||||
hx-boost="true"
|
hx-boost="true"
|
||||||
|
class="btn btn-ghost"
|
||||||
hx-trigger="click, previous_year from:window"
|
hx-trigger="click, previous_year from:window"
|
||||||
href="{% block previous_year_url %}{% endblock %}">
|
href="{% block previous_year_url %}{% endblock %}">
|
||||||
<i class="fa-solid fa-chevron-left"></i></a>
|
<i class="fa-solid fa-chevron-left"></i></a>
|
||||||
</div>
|
<div class="text-2xl font-bold flex-1 text-center whitespace-normal flex-wrap h-auto min-w-0">
|
||||||
<div class="text-2xl font-bold flex-1 text-center whitespace-normal flex-wrap h-auto min-w-0">
|
{{ year }}
|
||||||
{{ year }}
|
</div>
|
||||||
</div>
|
|
||||||
<div class="text-base mx-2 h-full items-center flex btn btn-ghost">
|
|
||||||
<a role="button"
|
<a role="button"
|
||||||
hx-boost="true"
|
hx-boost="true"
|
||||||
|
class="btn btn-ghost"
|
||||||
hx-trigger="click, next_year from:window"
|
hx-trigger="click, next_year from:window"
|
||||||
href="{% block next_year_url %}{% endblock %}">
|
href="{% block next_year_url %}{% endblock %}">
|
||||||
<i class="fa-solid fa-chevron-right"></i>
|
<i class="fa-solid fa-chevron-right"></i>
|
||||||
@@ -51,7 +54,7 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<input type="hidden" name="month" value="">
|
<input type="hidden" name="month" value="">
|
||||||
<div class="flex flex-col gap-1 w-full" id="month-pills" role="tablist"
|
<div class="flex flex-col gap-1 w-full" id="month-pills" role="tablist"
|
||||||
hx-indicator="#data-content">
|
hx-indicator="#data-content">
|
||||||
<button class="btn btn-ghost btn-active justify-start w-full"
|
<button class="btn btn-ghost btn-active justify-start w-full"
|
||||||
role="tab"
|
role="tab"
|
||||||
hx-get="{% block data_url %}{% endblock %}"
|
hx-get="{% block data_url %}{% endblock %}"
|
||||||
@@ -93,8 +96,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<hr class="xl:hidden hr">
|
||||||
|
|
||||||
<div class="col-12 xl:col-6">
|
<div class="col-12 xl:col-6">
|
||||||
<hr class="xl:hidden my-3 hr">
|
|
||||||
<div id="data-content"
|
<div id="data-content"
|
||||||
class="show-loading"
|
class="show-loading"
|
||||||
hx-get="{% block content_data_url %}{% endblock %}"
|
hx-get="{% block content_data_url %}{% endblock %}"
|
||||||
|
|||||||
Generated
+917
-19
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,6 @@
|
|||||||
"@alpinejs/mask": "^3.15.1",
|
"@alpinejs/mask": "^3.15.1",
|
||||||
"@fontsource-variable/jetbrains-mono": "^5.2.8",
|
"@fontsource-variable/jetbrains-mono": "^5.2.8",
|
||||||
"@fortawesome/fontawesome-free": "^7.1.0",
|
"@fortawesome/fontawesome-free": "^7.1.0",
|
||||||
"@marcreichel/alpine-autosize": "^1.3.3",
|
|
||||||
"@popperjs/core": "^2.11.8",
|
"@popperjs/core": "^2.11.8",
|
||||||
"@rollup/plugin-commonjs": "^29.0.0",
|
"@rollup/plugin-commonjs": "^29.0.0",
|
||||||
"@tailwindcss/vite": "^4.1.17",
|
"@tailwindcss/vite": "^4.1.17",
|
||||||
@@ -31,10 +30,9 @@
|
|||||||
"bootstrap": "^5.3.8",
|
"bootstrap": "^5.3.8",
|
||||||
"chart.js": "^4.5.1",
|
"chart.js": "^4.5.1",
|
||||||
"chartjs-chart-sankey": "^0.14.0",
|
"chartjs-chart-sankey": "^0.14.0",
|
||||||
"daisyui": "^5.4.7",
|
"daisyui": "^5.5.5",
|
||||||
"htmx.org": "^2.0.8",
|
"htmx.org": "^2.0.8",
|
||||||
"hyperscript.org": "^0.9.14",
|
"hyperscript.org": "^0.9.14",
|
||||||
"jquery": "^3.7.1",
|
|
||||||
"mathjs": "^15.1.0",
|
"mathjs": "^15.1.0",
|
||||||
"postcss": "^8.5.6",
|
"postcss": "^8.5.6",
|
||||||
"sass": "^1.94.0",
|
"sass": "^1.94.0",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ function initiateTooltips() {
|
|||||||
delegate(document.body, {
|
delegate(document.body, {
|
||||||
target: '[data-tippy-content]',
|
target: '[data-tippy-content]',
|
||||||
theme: theme,
|
theme: theme,
|
||||||
zIndex: 1100,
|
zIndex: 1089,
|
||||||
content(reference) {
|
content(reference) {
|
||||||
return reference.getAttribute('data-tippy-content');
|
return reference.getAttribute('data-tippy-content');
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -174,6 +174,11 @@
|
|||||||
.table-col-auto {
|
.table-col-auto {
|
||||||
@apply w-1;
|
@apply w-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn.btn-free {
|
||||||
|
@apply min-h-(--size) py-1;
|
||||||
|
height: unset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user