mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
feat(invoices): M7 dashboard widget + tests + plan status
Adds the missing bits that turn M1–M6 into a coherent shippable product rather than a pile of commits. Dashboard widget (M7) - InvoicesOpenWidget.svelte: open + overdue totals in the primary currency, top-3 oldest overdue with "X Tage überfällig" under each, empty-state CTA for first-time users - Registered as `invoices-open` in WIDGET_REGISTRY and the component map. Default size medium, no requiredBackend (local-first, no API) - Fixed pre-existing test gap: validBackends list was missing 'body' (body-stats widget has been failing silently) — added so the check protects against drift for real Tests (45 total, all green) - totals.test.ts (9): computeLineTotal with discount+vat, grouping invariant (breakdown sums == invoice totals), rounding edges - pdf/qr-bill.test.ts (17): generateSCORReference stability + spec-validity via swissqrbill's own isSCORReferenceValid, buildQRBillData eligibility gates (currency, IBAN, address, amount), CH + DE address parser paths, referenceNumber-preferred-over-regen invariant - mail-template.test.ts (12): subject/body composition (with/without subject, CHF vs EUR QR-hint, empty recipient fallback), mailto spaces-as-%20 patch, looksLikeEmail edge cases Plan (docs/plans/invoices-module.md) - Updated with commit SHAs per milestone, testing status, and the explicit list of open items (Logo-Upload, AI-Tools, sync collision, structured addresses, finance cross-link, camt bankabgleich) so the next coder knows exactly what's parked where Unresolved: browser smoke test couldn't run — SSR is broken for all module routes in the current tree (pre-existing, likely from the parallel Spaces refactor; /library, /todo, /contacts all return 500 the same way). Unit tests + clean bundle build (M4) + type-check are the coverage we have. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2d15684ed4
commit
2ee3a1a93a
8 changed files with 643 additions and 3 deletions
|
|
@ -2,9 +2,29 @@
|
|||
|
||||
## Status (2026-04-20)
|
||||
|
||||
**M0 Planning** — dieser Plan. Noch kein Code.
|
||||
**M1–M7 DONE** — solo-tauglich, ohne Logo-Upload + AI-Tools.
|
||||
|
||||
Nächster Schritt: M1 Skelett (Modul registriert, Dexie-Table, Guest-Seed, leere ListView).
|
||||
| Milestone | Commit | Notes |
|
||||
|---|---|---|
|
||||
| M1 Skelett | `2cf89ce26` | Modul registriert, Dexie v27, Encryption-Registry, leere ListView |
|
||||
| M2 CRUD | `8d00ee069` | Store, Totals, Status-Maschine, ListView mit Stats-Cards, Routes |
|
||||
| M3 Settings | in M2 | SenderProfileForm fertig, **Logo-Upload offen** (uload-Integration nötig) |
|
||||
| M4 PDF Basic | `2dc298a79` | pdf-lib, pagination, preview + download |
|
||||
| M5 QR-Rechnung | `5af23d30b` | swissqrbill/svg + PNG-Overlay, SCOR auto, address-parser-Heuristik |
|
||||
| M6 Versand | `08b7ac16b` | SendModal mit mailto + PDF-Download + Confirm → status sent |
|
||||
| M7 Dashboard | pending commit | InvoicesOpenWidget mit Offen/Überfällig + Top-3 älteste überfällig |
|
||||
|
||||
**Tests (45+ green):** totals math, SCOR + address-parser (swissqrbill `isSCORReferenceValid` roundtrip), mail template + mailto encoding.
|
||||
|
||||
**Offene Arbeit vor "produktiv einsetzbar":**
|
||||
- **M3-Polish:** Logo-Upload via uload → erscheint im PDF-Header
|
||||
- **M8 AI-Tools:** `create_invoice` (propose), `mark_paid` (propose), `list_invoices` (auto), `get_invoice_stats` (auto) — braucht Planner-Drift-Guard-Update
|
||||
- **Nummernkreis-Multi-Device-Kollision:** dokumentiert als gap (pragmatisch, solo-MVP-tauglich)
|
||||
- **Strukturierte Adressen:** Heuristik-Parser deckt Standard-CH/DE ab; komplexere Adressen fehlen → User sieht in Warning, was fehlt
|
||||
- **Bezahlte Rechnung → finance-Transaktion:** Cross-Modul-Hook, Phase 3
|
||||
- **camt.053 Bankabgleich:** Phase 2
|
||||
|
||||
Nächster Schritt: M3 Logo-Upload ODER M8 AI-Tools ODER Real-World-Dogfooding (erste eigene Rechnung an einen echten Kunden).
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue