mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-03-25 19:01:24 +01:00
feat: fixes
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row gap-3">
|
||||
<div class="row g-3">
|
||||
<div class="col-12 lg:col-6">
|
||||
<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">
|
||||
|
||||
@@ -24,23 +24,23 @@
|
||||
|
||||
<label class="tab">
|
||||
<input type="radio"
|
||||
name="view_type"
|
||||
class="tab"
|
||||
aria-label="{% trans "Current" %}"
|
||||
value="current"
|
||||
{% if type == "current" %}checked{% endif %} />
|
||||
<i class="fa-solid fa-sack-dollar fa-fw me-2"></i>
|
||||
{% trans "Current" %}
|
||||
name="view_type"
|
||||
class="tab"
|
||||
aria-label="{% trans "Current" %}"
|
||||
value="current"
|
||||
{% if type == "current" %}checked{% endif %}/>
|
||||
<i class="fa-solid fa-sack-dollar fa-fw me-2"></i>
|
||||
{% trans "Current" %}
|
||||
</label>
|
||||
<label class="tab">
|
||||
<input type="radio"
|
||||
name="view_type"
|
||||
class="tab"
|
||||
aria-label="{% trans "Projected" %}"
|
||||
value="projected"
|
||||
{% if type == "projected" %}checked{% endif %} />
|
||||
<i class="fa-solid fa-rocket fa-fw me-2"></i>
|
||||
{% trans "Projected" %}
|
||||
name="view_type"
|
||||
class="tab"
|
||||
aria-label="{% trans "Projected" %}"
|
||||
value="projected"
|
||||
{% if type == "projected" %}checked{% endif %}/>
|
||||
<i class="fa-solid fa-rocket fa-fw me-2"></i>
|
||||
{% trans "Projected" %}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -49,54 +49,77 @@
|
||||
<div class="row gap-y-3">
|
||||
<div class="col lg:col-5">
|
||||
<div>
|
||||
<c-ui.info-card color="yellow" icon="fa-solid fa-coins" title="{% trans "By currency" %}" title_css_classes="cursor-pointer" _="on click showAllDatasetsCurrency()">
|
||||
<ul class="menu bg-base-100 w-full rounded-box">
|
||||
{% for currency in currency_net_worth.values %}
|
||||
<li>
|
||||
{% if currency.consolidated and currency.consolidated.total_final != currency.total_final %}
|
||||
<a class="cursor-pointer select-auto flex justify-between items-center w-full"
|
||||
_="on click showOnlyCurrencyDataset('{{ currency.currency.name }}')">
|
||||
<span class="currency-name text-start font-mono shrink text-ellipsis">{{ currency.currency.name }}</span>
|
||||
<span class="text-end shrink-0">
|
||||
<c-ui.info-card color="yellow" icon="fa-solid fa-coins" title="{% trans "By currency" %}"
|
||||
title_css_classes="cursor-pointer" _="on click showAllDatasetsCurrency()">
|
||||
<ul class="menu bg-base-100 w-full rounded-box">
|
||||
{% for currency in currency_net_worth.values %}
|
||||
<li>
|
||||
{% if currency.consolidated and currency.consolidated.total_final != currency.total_final %}
|
||||
<a class="cursor-pointer select-auto flex justify-between items-center w-full"
|
||||
_="on click showOnlyCurrencyDataset('{{ currency.currency.name }}')">
|
||||
<span
|
||||
class="currency-name text-start font-mono shrink text-ellipsis">{{ currency.currency.name }}</span>
|
||||
<span class="text-end shrink-0">
|
||||
<div>
|
||||
<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 %}green{% elif currency.total_final < 0 %}red{% endif %}" text-end></c-amount.display>
|
||||
<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 %}green{% elif currency.total_final < 0 %}red{% endif %}"
|
||||
text-end></c-amount.display>
|
||||
</div>
|
||||
{% if currency.exchanged and currency.exchanged.total_final %}
|
||||
<div>
|
||||
<c-amount.display :amount="currency.exchanged.total_final" :prefix="currency.exchanged.currency.prefix" :suffix="currency.exchanged.currency.suffix" :decimal_places="currency.exchanged.currency.decimal_places" text-end color="grey"></c-amount.display>
|
||||
{% if currency.exchanged and currency.exchanged.total_final %}
|
||||
<div>
|
||||
<c-amount.display :amount="currency.exchanged.total_final"
|
||||
:prefix="currency.exchanged.currency.prefix"
|
||||
:suffix="currency.exchanged.currency.suffix"
|
||||
:decimal_places="currency.exchanged.currency.decimal_places" text-end
|
||||
color="grey"></c-amount.display>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</span>
|
||||
</a>
|
||||
<ul>
|
||||
<li>
|
||||
<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-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>
|
||||
</a>
|
||||
<ul>
|
||||
<li>
|
||||
<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-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>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
<a class="cursor-pointer select-auto flex justify-between items-center w-full"
|
||||
_="on click showOnlyCurrencyDataset('{{ currency.currency.name }}')">
|
||||
<span class="currency-name text-start font-mono shrink">{{ currency.currency.name }}</span>
|
||||
<span class="text-end shrink-0">
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
<a class="cursor-pointer select-auto flex justify-between items-center w-full"
|
||||
_="on click showOnlyCurrencyDataset('{{ currency.currency.name }}')">
|
||||
<span class="currency-name text-start font-mono shrink">{{ currency.currency.name }}</span>
|
||||
<span class="text-end shrink-0">
|
||||
<div>
|
||||
<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 %}green{% elif currency.total_final < 0 %}red{% endif %}" text-end></c-amount.display>
|
||||
<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 %}green{% elif currency.total_final < 0 %}red{% endif %}"
|
||||
text-end></c-amount.display>
|
||||
</div>
|
||||
{% if currency.exchanged and currency.exchanged.total_final %}
|
||||
<div>
|
||||
<c-amount.display :amount="currency.exchanged.total_final" :prefix="currency.exchanged.currency.prefix" :suffix="currency.exchanged.currency.suffix" :decimal_places="currency.exchanged.currency.decimal_places" text-end color="grey"></c-amount.display>
|
||||
{% if currency.exchanged and currency.exchanged.total_final %}
|
||||
<div>
|
||||
<c-amount.display :amount="currency.exchanged.total_final"
|
||||
:prefix="currency.exchanged.currency.prefix"
|
||||
:suffix="currency.exchanged.currency.suffix"
|
||||
:decimal_places="currency.exchanged.currency.decimal_places" text-end
|
||||
color="grey"></c-amount.display>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</c-ui.info-card>
|
||||
</div>
|
||||
</div>
|
||||
@@ -110,7 +133,7 @@
|
||||
class="tab"
|
||||
aria-label="{% trans 'Evolution' %}"
|
||||
id="tab-evolution"
|
||||
checked="checked" />
|
||||
checked="checked"/>
|
||||
<div role="tabpanel" class="tab-content p-4" id="evolution-tab-pane">
|
||||
<div class="chart-container relative min-h-[80vh] md:min-h-[40vh] h-full w-full">
|
||||
<canvas id="currencyBalanceChart"></canvas>
|
||||
@@ -121,7 +144,7 @@
|
||||
role="tab"
|
||||
class="tab"
|
||||
aria-label="{% trans 'Difference' %}"
|
||||
id="tab-diff" />
|
||||
id="tab-diff"/>
|
||||
<div role="tabpanel" class="tab-content p-4" id="diff-tab-pane">
|
||||
<div class="chart-container relative min-h-[80vh] md:min-h-[40vh] h-full w-full">
|
||||
<canvas id="monthlyDifferenceChart"></canvas>
|
||||
@@ -132,64 +155,80 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="hr my-6" />
|
||||
<hr class="hr my-6"/>
|
||||
<div class="row gap-y-3">
|
||||
<div class="col lg:col-5">
|
||||
<div>
|
||||
<c-ui.info-card color="blue" icon="fa-solid fa-wallet" title="{% trans "By account" %}" title_css_classes="cursor-pointer" _="on click showAllDatasetsAccount()">
|
||||
<ul class="menu bg-base-100 w-full rounded-box">
|
||||
{% regroup account_net_worth.values by account.group as account_data %}
|
||||
{% for data in account_data %}
|
||||
{% if data.grouper %}
|
||||
<li>
|
||||
<details open>
|
||||
<summary class="select-auto">
|
||||
<span class="badge badge-primary">{{ data.grouper }}</span>
|
||||
</summary>
|
||||
<ul>
|
||||
{% for account in data.list %}
|
||||
<li>
|
||||
<a class="cursor-pointer select-auto flex justify-between items-center w-full"
|
||||
_="on click showOnlyAccountDataset('{{ account.account.name }}')">
|
||||
<span class="account-name text-start font-mono shrink text-ellipsis">{{ account.account.name }}</span>
|
||||
<span class="text-end shrink-0">
|
||||
<div>
|
||||
<c-amount.display :amount="account.total_final" :prefix="account.currency.prefix" :suffix="account.currency.suffix" :decimal_places="account.currency.decimal_places" color="{% if account.total_final > 0 %}green{% elif account.total_final < 0 %}red{% endif %}"></c-amount.display>
|
||||
</div>
|
||||
{% if account.exchanged and account.exchanged.total_final %}
|
||||
<div>
|
||||
<c-amount.display :amount="account.exchanged.total_final" :prefix="account.exchanged.currency.prefix" :suffix="account.exchanged.currency.suffix" :decimal_places="account.exchanged.currency.decimal_places" color="grey" text-end></c-amount.display>
|
||||
</div>
|
||||
{% endif %}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</details>
|
||||
</li>
|
||||
{% else %}
|
||||
{% for account in data.list %}
|
||||
<c-ui.info-card color="blue" icon="fa-solid fa-wallet" title="{% trans "By account" %}"
|
||||
title_css_classes="cursor-pointer" _="on click showAllDatasetsAccount()">
|
||||
<ul class="menu bg-base-100 w-full rounded-box">
|
||||
{% regroup account_net_worth.values by account.group as account_data %}
|
||||
{% for data in account_data %}
|
||||
{% if data.grouper %}
|
||||
<li>
|
||||
<a class="cursor-pointer flex select-auto justify-between items-center w-full"
|
||||
_="on click showOnlyAccountDataset('{{ account.account.name }}')">
|
||||
<span class="account-name text-start font-mono shrink">{{ account.account.name }}</span>
|
||||
<span class="text-end shrink-0">
|
||||
<div>
|
||||
<c-amount.display :amount="account.total_final" :prefix="account.currency.prefix" :suffix="account.currency.suffix" :decimal_places="account.currency.decimal_places" color="{% if account.total_final > 0 %}green{% elif account.total_final < 0 %}red{% endif %}"></c-amount.display>
|
||||
</div>
|
||||
{% if account.exchanged and account.exchanged.total_final %}
|
||||
<div>
|
||||
<c-amount.display :amount="account.exchanged.total_final" :prefix="account.exchanged.currency.prefix" :suffix="account.exchanged.currency.suffix" :decimal_places="account.exchanged.currency.decimal_places" color="grey" text-end></c-amount.display>
|
||||
</div>
|
||||
{% endif %}
|
||||
</span>
|
||||
</a>
|
||||
<details open>
|
||||
<summary class="select-auto">
|
||||
<span class="badge badge-primary">{{ data.grouper }}</span>
|
||||
</summary>
|
||||
<ul>
|
||||
{% for account in data.list %}
|
||||
<li>
|
||||
<a class="cursor-pointer select-auto flex justify-between items-center w-full"
|
||||
_="on click showOnlyAccountDataset('{{ account.account.name }}')">
|
||||
<span
|
||||
class="account-name text-start font-mono shrink text-ellipsis">{{ account.account.name }}</span>
|
||||
<span class="text-end shrink-0">
|
||||
<div>
|
||||
<c-amount.display :amount="account.total_final" :prefix="account.currency.prefix"
|
||||
:suffix="account.currency.suffix"
|
||||
:decimal_places="account.currency.decimal_places"
|
||||
color="{% if account.total_final > 0 %}green{% elif account.total_final < 0 %}red{% endif %}"></c-amount.display>
|
||||
</div>
|
||||
{% if account.exchanged and account.exchanged.total_final %}
|
||||
<div>
|
||||
<c-amount.display :amount="account.exchanged.total_final"
|
||||
:prefix="account.exchanged.currency.prefix"
|
||||
:suffix="account.exchanged.currency.suffix"
|
||||
:decimal_places="account.exchanged.currency.decimal_places"
|
||||
color="grey" text-end></c-amount.display>
|
||||
</div>
|
||||
{% endif %}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</details>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
{% for account in data.list %}
|
||||
<li>
|
||||
<a class="cursor-pointer flex select-auto justify-between items-center w-full"
|
||||
_="on click showOnlyAccountDataset('{{ account.account.name }}')">
|
||||
<span class="account-name text-start font-mono shrink">{{ account.account.name }}</span>
|
||||
<span class="text-end shrink-0">
|
||||
<div>
|
||||
<c-amount.display :amount="account.total_final" :prefix="account.currency.prefix"
|
||||
:suffix="account.currency.suffix"
|
||||
:decimal_places="account.currency.decimal_places"
|
||||
color="{% if account.total_final > 0 %}green{% elif account.total_final < 0 %}red{% endif %}"></c-amount.display>
|
||||
</div>
|
||||
{% if account.exchanged and account.exchanged.total_final %}
|
||||
<div>
|
||||
<c-amount.display :amount="account.exchanged.total_final"
|
||||
:prefix="account.exchanged.currency.prefix"
|
||||
:suffix="account.exchanged.currency.suffix"
|
||||
:decimal_places="account.exchanged.currency.decimal_places" color="grey"
|
||||
text-end></c-amount.display>
|
||||
</div>
|
||||
{% endif %}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</c-ui.info-card>
|
||||
</div>
|
||||
</div>
|
||||
@@ -249,6 +288,7 @@
|
||||
display: true,
|
||||
grid: {
|
||||
drawOnChartArea: i === 0,
|
||||
drawTicks: false,
|
||||
},
|
||||
ticks: {
|
||||
display: false,
|
||||
@@ -313,6 +353,7 @@
|
||||
position: i % 2 === 0 ? 'left' : 'right',
|
||||
grid: {
|
||||
drawOnChartArea: i === 0,
|
||||
drawTicks: false,
|
||||
},
|
||||
ticks: {
|
||||
display: false,
|
||||
@@ -365,6 +406,12 @@
|
||||
},
|
||||
y: {
|
||||
stacked: true,
|
||||
border: {
|
||||
display: true,
|
||||
},
|
||||
grid: {
|
||||
drawTicks: false,
|
||||
},
|
||||
ticks: {
|
||||
display: false,
|
||||
format: {
|
||||
@@ -372,6 +419,20 @@
|
||||
minimumFractionDigits: 0
|
||||
}
|
||||
},
|
||||
},
|
||||
y1: {
|
||||
position: 'right',
|
||||
display: true,
|
||||
grid: {
|
||||
drawOnChartArea: false,
|
||||
drawTicks: false,
|
||||
},
|
||||
border: {
|
||||
display: true,
|
||||
},
|
||||
ticks: {
|
||||
display: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user