From 6a110545e2908d5d1885ff07f59e6e71e63e267b Mon Sep 17 00:00:00 2001 From: Padreug Date: Sun, 17 May 2026 15:21:46 +0200 Subject: [PATCH 1/2] Rename Pending Approvals card from "Pending Expense Approvals" Both expense and income entries land in the same pending list (the backend's /entries/pending endpoint already returns all pending transactions regardless of type, and approve/reject is type-agnostic), so the expense-specific title was misleading once income approval shipped in #13. --- templates/libra/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/libra/index.html b/templates/libra/index.html index 17eed2b..8641fa4 100644 --- a/templates/libra/index.html +++ b/templates/libra/index.html @@ -69,10 +69,10 @@ - + -
Pending Expense Approvals
+
Pending Approvals
From 30b3fe818a7662caf0b07d307bfbf8cdffb2230c Mon Sep 17 00:00:00 2001 From: Padreug Date: Sun, 17 May 2026 15:22:09 +0200 Subject: [PATCH 2/2] Tag each pending approval row with an INCOME / EXPENSE badge With both kinds of entry now sharing the Pending Approvals list, the row alone doesn't tell the reviewer which direction the accounting goes. Adds a small green INCOME / red EXPENSE badge in front of the description, driven by an isIncomeEntry(entry) helper that checks the Beancount tag set the API already returns. Matches the green/red palette used on the webapp Transaction History. --- static/js/index.js | 3 +++ templates/libra/index.html | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/static/js/index.js b/static/js/index.js index 7c01c07..1f6ccb9 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -1642,6 +1642,9 @@ window.app = Vue.createApp({ formatSats(amount) { return new Intl.NumberFormat().format(amount) }, + isIncomeEntry(entry) { + return Array.isArray(entry.tags) && entry.tags.includes('income-entry') + }, formatFiat(amount, currency) { return new Intl.NumberFormat('en-US', { style: 'currency', diff --git a/templates/libra/index.html b/templates/libra/index.html index 8641fa4..7af400f 100644 --- a/templates/libra/index.html +++ b/templates/libra/index.html @@ -81,7 +81,15 @@ - {% raw %}{{ entry.description }}{% endraw %} + + + {% raw %}{{ isIncomeEntry(entry) ? 'INCOME' : 'EXPENSE' }}{% endraw %} + + {% raw %}{{ entry.description }}{% endraw %} + {% raw %}{{ formatDate(entry.entry_date) }}{% endraw %}