mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-05-20 14:47:12 +02:00
feat: first batch of work
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
{% for x in transactions_by_date %}
|
||||
<div id="{{ x.grouper|slugify }}" class="transactions-divider"
|
||||
_="on htmx:afterSwap from #transactions if sessionStorage.getItem(my id) is null then sessionStorage.setItem(my id, 'true')">
|
||||
<div class="tw:mt-3 tw:mb-1 tw:w-full tw:text-base tw:border-b tw:border-b-base-content/30 transactions-divider-title">
|
||||
<a class="tw:no-underline tw:inline-block tw:w-full"
|
||||
<div class="mt-3 mb-1 w-full text-base border-b border-b-base-content/30 transactions-divider-title">
|
||||
<a class="no-underline inline-block w-full"
|
||||
role="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#c-{{ x.grouper|slugify }}-collapse"
|
||||
@@ -17,7 +17,7 @@
|
||||
{{ x.grouper }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="collapse transactions-divider-collapse" id="c-{{ x.grouper|slugify }}-collapse"
|
||||
<div class="collapse transactions-divider-collapse overflow-visible" id="c-{{ x.grouper|slugify }}-collapse"
|
||||
_="on shown.bs.collapse sessionStorage.setItem(the closest parent @id, 'true')
|
||||
on hidden.bs.collapse sessionStorage.setItem(the closest parent @id, 'false')
|
||||
on htmx:afterSettle from #transactions or toggle
|
||||
@@ -32,7 +32,7 @@
|
||||
on show
|
||||
add .show to me
|
||||
set @aria-expanded of #c-{{ x.grouper|slugify }}-collapsible to true">
|
||||
<div class="tw:flex tw:flex-col">
|
||||
<div class="flex flex-col">
|
||||
{% for transaction in x.list %}
|
||||
<c-transaction.item
|
||||
:transaction="transaction"></c-transaction.item>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{% load i18n %}
|
||||
{% load currency_display %}
|
||||
|
||||
<div class="tw:grid tw:grid-cols-1 tw:gap-4 tw:mt-1 tw:mb-3">
|
||||
<div class="grid grid-cols-1 gap-4 mt-1 mb-3">
|
||||
{% for account_id, account in account_data.items %}
|
||||
<div>
|
||||
<c-ui.account_card :account="account" :account_id="account_id"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% load tools %}
|
||||
{% load i18n %}
|
||||
{% load currency_display %}
|
||||
<div class="tw:grid tw:grid-cols-1 tw:gap-4 tw:mt-1 tw:mb-3">
|
||||
<div class="grid grid-cols-1 gap-4 mt-1 mb-3">
|
||||
{% for currency_id, currency in currency_data.items %}
|
||||
<div>
|
||||
<c-ui.currency_card :currency="currency" :currency_id="currency_id"
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{% load i18n %}
|
||||
{% load currency_display %}
|
||||
<div class="tw:grid tw:grid-cols-1 tw:gap-4 tw:mt-1 tw:mb-3">
|
||||
<div class="grid grid-cols-1 gap-4 mt-1 mb-3">
|
||||
{# Daily Spending#}
|
||||
<div>
|
||||
<c-ui.info-card color="yellow" icon="fa-solid fa-calendar-day" title="{% trans 'Daily Spending Allowance' %}" help_text={% trans "This is the final total divided by the remaining days in the month" %}>
|
||||
<div class="tw:flex tw:justify-between tw:mt-3">
|
||||
<div class="tw:text-right tw:font-mono">
|
||||
<div class="tw:text-gray-400">{% translate 'today' %}</div>
|
||||
<div class="flex justify-between mt-3">
|
||||
<div class="text-right font-mono">
|
||||
<div class="text-base-content/90">{% translate 'today' %}</div>
|
||||
</div>
|
||||
<div class="tw:text-right tw:font-mono">
|
||||
<div class="text-right font-mono">
|
||||
{% for currency in daily_spending_allowance.values %}
|
||||
<div>
|
||||
<c-amount.display
|
||||
@@ -37,11 +37,11 @@
|
||||
{# Income#}
|
||||
<div>
|
||||
<c-ui.info-card color="green" icon="fa-solid fa-arrow-right-to-bracket" title="{% trans 'Income' %}">
|
||||
<div class="tw:flex tw:justify-between tw:mt-3">
|
||||
<div class="tw:text-right tw:font-mono">
|
||||
<div class="tw:text-gray-400">{% translate 'current' %}</div>
|
||||
<div class="flex justify-between mt-3">
|
||||
<div class="text-right font-mono">
|
||||
<div class="text-base-content/90">{% translate 'current' %}</div>
|
||||
</div>
|
||||
<div class="tw:text-right tw:font-mono">
|
||||
<div class="text-right font-mono">
|
||||
{% for currency in income_current.values %}
|
||||
<div>
|
||||
<c-amount.display
|
||||
@@ -66,12 +66,11 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<hr class="tw:my-1">
|
||||
<div class="tw:flex tw:justify-between">
|
||||
<div class="tw:text-right tw:font-mono">
|
||||
<div class="tw:text-gray-400">{% translate 'projected' %}</div>
|
||||
<div class="flex justify-between">
|
||||
<div class="text-right font-mono">
|
||||
<div class="text-base-content/90">{% translate 'projected' %}</div>
|
||||
</div>
|
||||
<div class="tw:text-right tw:font-mono">
|
||||
<div class="text-right font-mono">
|
||||
{% for currency in income_projected.values %}
|
||||
<div>
|
||||
<c-amount.display
|
||||
@@ -101,11 +100,11 @@
|
||||
{# Expenses#}
|
||||
<div>
|
||||
<c-ui.info-card color="red" icon="fa-solid fa-arrow-right-from-bracket" title="{% trans 'Expenses' %}">
|
||||
<div class="tw:flex tw:justify-between tw:mt-3">
|
||||
<div class="tw:text-right tw:font-mono">
|
||||
<div class="tw:text-gray-400">{% translate 'current' %}</div>
|
||||
<div class="flex justify-between mt-3">
|
||||
<div class="text-right font-mono">
|
||||
<div class="text-base-content/90">{% translate 'current' %}</div>
|
||||
</div>
|
||||
<div class="tw:text-right tw:font-mono">
|
||||
<div class="text-right font-mono">
|
||||
{% for currency in expense_current.values %}
|
||||
<div>
|
||||
<c-amount.display
|
||||
@@ -130,12 +129,11 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<hr class="tw:my-1">
|
||||
<div class="tw:flex tw:justify-between">
|
||||
<div class="tw:text-right tw:font-mono">
|
||||
<div class="tw:text-gray-400">{% translate 'projected' %}</div>
|
||||
<div class="flex justify-between">
|
||||
<div class="text-right font-mono">
|
||||
<div class="text-base-content/90">{% translate 'projected' %}</div>
|
||||
</div>
|
||||
<div class="tw:text-right tw:font-mono">
|
||||
<div class="text-right font-mono">
|
||||
{% for currency in expense_projected.values %}
|
||||
<div>
|
||||
<c-amount.display
|
||||
@@ -165,11 +163,11 @@
|
||||
{# Total#}
|
||||
<div>
|
||||
<c-ui.info-card color="blue" icon="fa-solid fa-scale-balanced" title="{% trans 'Total' %}">
|
||||
<div class="tw:flex tw:justify-between tw:mt-3">
|
||||
<div class="tw:text-right tw:font-mono">
|
||||
<div class="tw:text-gray-400">{% translate 'current' %}</div>
|
||||
<div class="flex justify-between mt-3">
|
||||
<div class="text-right font-mono">
|
||||
<div class="text-base-content/90">{% translate 'current' %}</div>
|
||||
</div>
|
||||
<div class="tw:text-right tw:font-mono">
|
||||
<div class="text-right font-mono">
|
||||
{% for currency in total_current.values %}
|
||||
<div>
|
||||
<c-amount.display
|
||||
@@ -194,11 +192,11 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tw:flex tw:justify-between tw:mt-3">
|
||||
<div class="tw:text-right tw:font-mono">
|
||||
<div class="tw:text-gray-400">{% translate 'projected' %}</div>
|
||||
<div class="flex justify-between mt-3">
|
||||
<div class="text-right font-mono">
|
||||
<div class="text-base-content/90">{% translate 'projected' %}</div>
|
||||
</div>
|
||||
<div class="tw:text-right tw:font-mono">
|
||||
<div class="text-right font-mono">
|
||||
{% for currency in total_projected.values %}
|
||||
<div>
|
||||
<c-amount.display
|
||||
@@ -223,9 +221,9 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<hr class="tw:my-1">
|
||||
<div class="tw:flex tw:justify-end">
|
||||
<div class="tw:text-right tw:font-mono">
|
||||
<hr class="my-1 hr">
|
||||
<div class="flex justify-end">
|
||||
<div class="text-right font-mono">
|
||||
{% for currency in total_final.values %}
|
||||
<div>
|
||||
<c-amount.display
|
||||
@@ -256,7 +254,7 @@
|
||||
<div>
|
||||
<c-ui.info-card color="yellow" icon="fa-solid fa-percent" title="{% trans 'Distribution' %}">
|
||||
{% for p in percentages.values %}
|
||||
<p class="tw:text-gray-400 tw:mb-2 {% if not forloop.first %}tw:mt-3{% endif %}">{{ p.currency.name }}</p>
|
||||
<p class="text-base-content/90 {% if not forloop.first %}mt-3{% endif %}">{{ p.currency.name }}</p>
|
||||
<c-ui.percentage-distribution :percentage="p"></c-ui.percentage-distribution>
|
||||
{% endfor %}
|
||||
</c-ui.info-card>
|
||||
|
||||
Reference in New Issue
Block a user