diff options
| author | Anders Betts <anders.betts@gmail.com> | 2026-09-23 09:13:17 +0200 |
|---|---|---|
| committer | Anders Betts <anders.betts@gmail.com> | 2026-09-23 09:13:17 +0200 |
| commit | 53071bb69f5d21b35b8a61c2b1dd18832ce781d4 (patch) | |
| tree | fa76c13cef78925d1b9650e92f64d5115dcdb6e7 /docs | |
| parent | 2ca284619125af0d5c12e9210ff1bfc8f9122739 (diff) | |
| download | bokf-53071bb69f5d21b35b8a61c2b1dd18832ce781d4.tar.gz bokf-53071bb69f5d21b35b8a61c2b1dd18832ce781d4.zip | |
tui: aligned voucher detail, up/down between vouchers, list sorting
The detail pads every column by display width, blanks zero amounts and
shows row texts and a Summa line. Up/Down step to the previous/next
voucher in the list order; 's' cycles the list sort (number or date,
ascending or descending, saved in tui.conf). The list fetches all pages
of voucher.list instead of stopping at 200.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/PROTOCOL.md | 5 | ||||
| -rw-r--r-- | docs/STATE.md | 7 | ||||
| -rw-r--r-- | docs/TUI-GUIDELINES.md | 6 |
3 files changed, 16 insertions, 2 deletions
diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md index 3ddb03b..2bd889f 100644 --- a/docs/PROTOCOL.md +++ b/docs/PROTOCOL.md @@ -938,7 +938,10 @@ commands. Implemented screens (0.1.0-dev): - **Dashboard** — status line with org, fiscal year, role and user. - **Verifikat** — list and detail view (rows with column headers, an underlag section separated by a rule, hash, link to corrected voucher); `c` - posts an ändringsverifikat. + posts an ändringsverifikat. The list holds the whole fiscal year (paged + `voucher.list` calls) and `s` cycles its sort order (number or date, + ascending or descending, remembered in `tui.conf`); in the detail view + up/down step to the previous/next voucher in that order. - **Nytt verifikat** — row editor with live balance display, F5 dry-run validation and F9 posting; one `client_ref` per form makes retries safe. F4 applies a konteringsmall (prompts for template and `x`). diff --git a/docs/STATE.md b/docs/STATE.md index fa0db74..d77cd78 100644 --- a/docs/STATE.md +++ b/docs/STATE.md @@ -14,6 +14,13 @@ unit tests and the docs consistency check. ## Resume here (2026-09-22) +- **Verifikat list/detail (2026-09-23, branch `eff/voucher-nav`)**: the + detail's columns are padded by display width (the header's `Benämning` + used to shift a column), zero amounts are blank, row texts and a `Summa` + line are shown; up/down step to the previous/next voucher in the list + order; `s` cycles the list sort (nummer/datum, stigande/fallande, saved in + `tui.conf`). The list now fetches every page of `voucher.list` — it + stopped at 200 vouchers before. Sort/step logic in `clients/vlist.[ch]`. - **TUI field editing (2026-09-23, branch `eff/tui-fields`, not merged)**: one shared field editor in `clients/tui.c` for forms, row-table header fields and prompts. Forms edit in place in the value column (no bottom diff --git a/docs/TUI-GUIDELINES.md b/docs/TUI-GUIDELINES.md index c791f25..4895c9f 100644 --- a/docs/TUI-GUIDELINES.md +++ b/docs/TUI-GUIDELINES.md @@ -147,6 +147,8 @@ there. | `a` | Add/upload (Underlag) | | `c` | Correct (voucher detail) | | `d` | Delete/arkivera the selected row (only where the action exists; asks for confirmation) | +| `s` | Verifikat list: cycle the sort order — nummer stigande/fallande, datum stigande/fallande (ties by series and number). The title shows the current order; it is saved as `voucher_sort` in `tui.conf` | +| up/down (voucher detail) | Previous/next voucher in the list's current order; the title shows `(n av N)`. The detail scrolls with PgUp/PgDn/Home/End (`TUI_PAGER_NO_ARROWS`). A voucher posted from the detail (`^N`) is shown without stepping until the list is reopened | | `f` | Voucher detail: list the voucher's underlag — Enter opens Granska (text in a pager, PDFs/images in the desktop viewer) or Ladda ned…, `d` removes the link (asks first). Underlag: Enter does the same | | `u` / `b` | Faktura detail: `u` duplicates the invoice into a new draft (same rows, dates reset to today), `b` (unpaid invoices) prefills and posts the payment voucher, then marks the invoice paid | | `Ctrl+F` | Attach a file via the file browser (voucher form and voucher detail) | @@ -367,7 +369,9 @@ only place that touches ncurses. Rules: static storage. `TUI_NAV_NONE`, `TUI_FORM_BACK/REFRESH/SUBMIT` and the `TUI_HOOK_*` codes are all distinct. - `tui_pager_hook` takes `TUI_PAGER_SAVE` to enable the `s` save action; the - `extra_hint` is shown in the footer. Plain `tui_pager` keeps `s` on when a + `extra_hint` is shown in the footer. `TUI_PAGER_NO_ARROWS` leaves Up/Down + to the key hook (record stepping) and the footer says + `PgUp/PgDn/Home/End rullar` instead. Plain `tui_pager` keeps `s` on when a save hint is passed. Pager lines go through `tui_markup` (see below). - Styles come from `tui_style`/`tui_style_attrs`; report markup and menu sections from `tui_markup`/`TUI_MARK_HEADING`. Their fallbacks and the |
