Admin UI for chart-of-accounts editing (add) #30

Open
opened 2026-06-06 13:15:51 +00:00 by padreug · 0 comments
Owner

Frontend on top of POST /api/v1/admin/accounts (libra#29). Admin-only LNbits page that lets a super-user add new chart-of-accounts entries.

v1 scope: add only. Edit, rename, mark-closed are separate issues.

Work

  • New admin page (Quasar UMD + Jinja template, following existing libra admin patterns in templates/libra/)
  • Form fields: account name (with prefix validator: must start with Assets:|Liabilities:|Equity:|Income:|Expenses:), currencies (multi-select default [EUR, SATS, USD])
  • Reuse Quasar q-input + q-select (remember: no self-closing tags in UMD per workspace CLAUDE.md)
  • List existing chart-of-accounts entries in a q-table with read-only status (delete/edit disabled — handled by follow-up issues)
  • On submit: POST /api/v1/admin/accounts; on success, refresh the list and toast confirmation
  • Gate page render on wallet.wallet.user == lnbits_settings.super_user

Acceptance

  • Super-user can add a new account; it shows up in the list, in fava, and in libra's get_all_accounts
  • Non-super-user sees no admin nav entry and gets 403 on direct URL access
  • Duplicate add surfaces a clear error

Depends on: aiolabs/libra#29 (backend endpoint)

Out of scope: edit/rename/mark-closed (separate issues).

Frontend on top of `POST /api/v1/admin/accounts` (libra#29). Admin-only LNbits page that lets a super-user add new chart-of-accounts entries. v1 scope: **add only**. Edit, rename, mark-closed are separate issues. ## Work - [ ] New admin page (Quasar UMD + Jinja template, following existing libra admin patterns in `templates/libra/`) - [ ] Form fields: account name (with prefix validator: must start with `Assets:|Liabilities:|Equity:|Income:|Expenses:`), currencies (multi-select default `[EUR, SATS, USD]`) - [ ] Reuse Quasar `q-input` + `q-select` (remember: no self-closing tags in UMD per workspace CLAUDE.md) - [ ] List existing chart-of-accounts entries in a `q-table` with read-only status (delete/edit disabled — handled by follow-up issues) - [ ] On submit: `POST /api/v1/admin/accounts`; on success, refresh the list and toast confirmation - [ ] Gate page render on `wallet.wallet.user == lnbits_settings.super_user` ## Acceptance - Super-user can add a new account; it shows up in the list, in fava, and in libra's `get_all_accounts` - Non-super-user sees no admin nav entry and gets 403 on direct URL access - Duplicate add surfaces a clear error Depends on: `aiolabs/libra#29` (backend endpoint) Out of scope: edit/rename/mark-closed (separate issues).
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aiolabs/libra#30
No description provided.