Add explicit INCOME/EXPENSE text label above the description

A type-colored icon alone isn't accessible (colorblind users) and
doesn't read at a glance. Put the badge on its own caption line
above the description so the description column still wraps cleanly.
Combined with the avatar trend icon, type is signalled redundantly
by color, shape, and text.
This commit is contained in:
Padreug 2026-05-17 15:25:11 +02:00
commit d426ed7c4f

View file

@ -87,6 +87,12 @@
</q-icon> </q-icon>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label caption>
<q-badge
:color="isIncomeEntry(entry) ? 'green' : 'red'"
:label="isIncomeEntry(entry) ? 'INCOME' : 'EXPENSE'"
/>
</q-item-label>
<q-item-label>{% raw %}{{ entry.description }}{% endraw %}</q-item-label> <q-item-label>{% raw %}{{ entry.description }}{% endraw %}</q-item-label>
<q-item-label caption> <q-item-label caption>
{% raw %}{{ formatDate(entry.entry_date) }}{% endraw %} {% raw %}{{ formatDate(entry.entry_date) }}{% endraw %}