From 776dbdf6f6f12289c874fd9d1eada379f1b02a0b Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Mon, 21 Sep 2026 14:03:36 +0200 Subject: tui: flat menu, System hub, remembered attachment directory --- docs/PAYROLL.md | 4 ++-- docs/PROTOCOL.md | 17 ++++++++++------- docs/STATE.md | 18 ++++++++++-------- docs/TUI-GUIDELINES.md | 12 +++++++----- 4 files changed, 29 insertions(+), 22 deletions(-) (limited to 'docs') diff --git a/docs/PAYROLL.md b/docs/PAYROLL.md index 7d7bdba..b78aeba 100644 --- a/docs/PAYROLL.md +++ b/docs/PAYROLL.md @@ -229,8 +229,8 @@ the base is the gross. renders and stores nothing. See `PROTOCOL.md` §7.12. - **TUI — Lön** (done, `clients/screens_payroll.c`): `Lönekörningar` (list, Ctrl+N for a new run) under Lön, `Anställda` under Bolaget, and a - **Skattetabeller** screen (System, since the tables are national) with - status, the Skatteverket fetch and the offline file import. + **Skattetabeller** screen (via System, since the tables are national) + with status, the Skatteverket fetch and the offline file import. - The run screen shows the preview (F5), posts with Ctrl+Enter after confirmation, then offers the buttons **Lönebesked** (saves/opens the PDF), **AGI-underlag** (`payroll.agi` in a pager, owner only) and diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md index 1e9f6fa..76197d9 100644 --- a/docs/PROTOCOL.md +++ b/docs/PROTOCOL.md @@ -378,8 +378,9 @@ resolved rows in a dry run. `default_series` (1–8 characters, e.g. `A`, `V-`, `A `) is used when `voucher.post` carries no `series` and as the default series for new -templates. `attachment_dir` (a path, up to 255 characters) is the folder the -TUI file browser opens in when attaching underlag. `bank_account` (digits +templates. `attachment_dir` (a path, up to 255 characters) is accepted for +compatibility, but the TUI file browser now remembers the directory of the +last picked attachment client-side. `bank_account` (digits only, up to 10 characters, default `1930`) is the account `bank.import` uses when the request carries no `account`. `invoice_receivable_account` (default `1510`) and `invoice_revenue_account` (default `3001`) are the receivable and @@ -941,8 +942,8 @@ commands. Implemented screens (0.1.0-dev): tax table/column, e-mail). Ctrl+N creates, Enter edits (an empty personnummer keeps the stored one), `d` archives/reactivates; F5 validates with a dry run and Ctrl+Enter saves. -- **Skattetabeller** (System) — stored tax table years, the current year's - status, fetch time and source. Owners fetch Skatteverket's official +- **Skattetabeller** (via **System**) — stored tax table years, the current + year's status, fetch time and source. Owners fetch Skatteverket's official monthly table (`payroll.tax_tables_fetch`) or import a file offline (`payroll.tax_tables_import`). - **Rapporter** — saldobalans, resultaträkning, balansräkning, moms, @@ -968,9 +969,11 @@ commands. Implemented screens (0.1.0-dev): password), both `settings.set` and open to bookkeepers; **Styrelseledamöter**; and the registers **Anställda**, **Kunder** and **Momsregler**. -- **Systeminställningar** (System) — bilagornas mapp, the file browser's - start directory. -- **Revision** (System) — chain verification and behandlingshistorik. +- **System** — the hub with **Skattetabeller** and **Revision**. The file + browser starts in the directory of the last picked attachment (remembered + in the client's `tui.conf`) and falls back to `$HOME` when it is gone. +- **Revision** (via **System**) — chain verification and + behandlingshistorik. **Ctrl+N is the universal "add" key**: it starts a new verifikat from the dashboard, the voucher list and the voucher detail view; a new mall from the diff --git a/docs/STATE.md b/docs/STATE.md index b8c9581..39fa44e 100644 --- a/docs/STATE.md +++ b/docs/STATE.md @@ -34,14 +34,16 @@ unit tests and the docs consistency check. avgifter), Anställda under Företag and the Skattetabeller fetch/import/status screen under System. A pty scenario posts a run and fetches its lönebesked, so the payslip PDF path is exercised end to end. -- **Menu (2026-09-21)**: the dashboard has the sections Bokföring (with - Mallar), Fakturering, Lön, Rapporter & bokslut, System (Skattetabeller, - Revision, Systeminställningar) and Räkenskapsår, plus the standalone - **Bolaget** hub: Företagsuppgifter, Fakturauppgifter, E-post (SMTP), - Styrelseledamöter and the registers Anställda, Kunder and Momsregler. - Inställningar is gone: standardserie, fordrings-/intäktskonto, bankgiro, - vår referens and SMTP live under Bolaget, bilagornas mapp under System. - `--screen settings` remains an alias for Bolaget. +- **Menu (2026-09-21)**: the dashboard is one flat list without section + headings: Verifikat, Underlag, Bankavstämning, Mallar, Fakturor, + Lönekörningar, Rapporter, Bokslut, Bolaget, System, Ingående balans, + Räkenskapsår, Logga ut. **Bolaget** is the master-data hub + (Företagsuppgifter, Fakturauppgifter, E-post (SMTP), Styrelseledamöter + and the registers Anställda, Kunder, Momsregler); **System** holds + Skattetabeller and Revision. Inställningar is gone, and bilagornas mapp + is no longer a setting: the file browser remembers the last pick + directory in `tui.conf` and falls back to `$HOME`. `--screen settings` + remains an alias for Bolaget. ## Open decisions diff --git a/docs/TUI-GUIDELINES.md b/docs/TUI-GUIDELINES.md index 7e0d404..94c3b5c 100644 --- a/docs/TUI-GUIDELINES.md +++ b/docs/TUI-GUIDELINES.md @@ -135,11 +135,13 @@ written compactly as `^N`, `^A`, `^C`, `^R` to save width. `BACK`, `REFRESH` or `SUBMIT` (the widget returns as on `Esc`/`F5`/ `Ctrl+Enter`). Hooks exist on `tui_form_run_hook`, `tui_rt_set_key`, `tui_pager_hook` and `tui_select_list_hook`. -- File browser (`file_browser`): starts in the org's `attachment_dir` (or - `$HOME`; a leading `~` is expanded to `$HOME`), `.. (uppåt)` is the first row, directories sort first with a - trailing `/`, hidden files are skipped. Enter enters a directory or picks a - file; `Esc` cancels. Selected files are uploaded immediately as unlinked - underlag and linked when the voucher is posted. +- File browser (`file_browser`): starts in the directory where the last + attachment was picked (remembered in `tui.conf`), falling back to `$HOME` + when it is gone (a leading `~` is expanded to `$HOME`), `.. (uppåt)` is + the first row, directories sort first with a trailing `/`, hidden files + are skipped. Enter enters a directory or picks a file; `Esc` cancels. + Picking a file remembers its directory. Selected files are uploaded + immediately as unlinked underlag and linked when the voucher is posted. ## Messages -- cgit v1.3