diff --git a/backend/tests/integration/credit-notes.test.ts b/backend/tests/integration/credit-notes.test.ts index b4458bd..c2e8394 100644 --- a/backend/tests/integration/credit-notes.test.ts +++ b/backend/tests/integration/credit-notes.test.ts @@ -191,7 +191,10 @@ describe('POST /invoices/:id/credit-note', () => { const original = await issue() const cn = (await asAdmin()('POST', `/invoices/${original.id}/credit-note`)).json().creditNote - await runOverdueCheck(new Date('2099-06-01T00:00:00.000Z')) + // Two days from now, not a far-future date: the check is global, and a + // year-2099 run against the shared dev database would pile decades of + // interest onto every open invoice in it (it did, once). + await runOverdueCheck(new Date(Date.now() + 2 * 24 * 60 * 60 * 1000)) const stored = await prisma.invoice.findUniqueOrThrow({ where: { id: cn.id } }) expect(stored.status).toBe('SENT') diff --git a/docs/architecture-decisions.md b/docs/architecture-decisions.md index e66db0f..e8497e3 100644 --- a/docs/architecture-decisions.md +++ b/docs/architecture-decisions.md @@ -907,6 +907,33 @@ the real library. --- +## 49. The UI is hand-built on a small token set, with no component library + +**Context:** the first frontend was functional and looked like a spreadsheet. +A portfolio project is judged in its first three seconds, and a financial +product is expected to look like one. + +**Decision:** a redesign on Tailwind 4 with a deliberately small token set in +`index.css` — one accent hue, one "ink" for dark surfaces, one reserved +colour for money that arrived — Inter for its tabular figures, and every +component still written by hand in `ui.tsx`. Sidebar navigation in the app, +because finance software is used for hours across many sections and a +vertical list with icons scans faster than a row of words. The landing page's +hero is a real invoice card whose ledger writes itself in, built from the +same formatting functions the app uses, because the ledger is the product. + +**Rejected:** a component library (shadcn, MUI). It would look polished in an +afternoon and leave nothing explainable — the whole point of this project is +that every line can be defended. Also rejected: stock illustrations. Every +visual on the landing page is a working component showing real behaviour. + +**Two rules the pass reinforced:** motion is used twice, briefly, and honours +`prefers-reduced-motion`; and a plain CSS rule outside Tailwind's layers +outranks a utility on the same element — the hero was white for one build +because a `background` shorthand reset the colour a utility had set. + +--- + ## Open decisions | Question | Status | diff --git a/docs/screenshots/aging.png b/docs/screenshots/aging.png index 3d8edf4..e3fafb8 100644 Binary files a/docs/screenshots/aging.png and b/docs/screenshots/aging.png differ diff --git a/docs/screenshots/audit-log.png b/docs/screenshots/audit-log.png index 916baa6..1d3b591 100644 Binary files a/docs/screenshots/audit-log.png and b/docs/screenshots/audit-log.png differ diff --git a/docs/screenshots/dashboard.png b/docs/screenshots/dashboard.png index a1d71cc..a98054e 100644 Binary files a/docs/screenshots/dashboard.png and b/docs/screenshots/dashboard.png differ diff --git a/docs/screenshots/invoice-ledger.png b/docs/screenshots/invoice-ledger.png index ac52000..13579a6 100644 Binary files a/docs/screenshots/invoice-ledger.png and b/docs/screenshots/invoice-ledger.png differ diff --git a/docs/screenshots/landing.png b/docs/screenshots/landing.png index d47cfa2..fe2550a 100644 Binary files a/docs/screenshots/landing.png and b/docs/screenshots/landing.png differ diff --git a/frontend/index.html b/frontend/index.html index 6184a53..5652bff 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -3,8 +3,20 @@
-{user?.email}
-- {user?.role === 'ADMIN' ? 'Administratör' : 'Kund'} -
-+
Prova demot
+
{error}
)} -- Demodata återställs varje natt. Allt du ändrar försvinner. +
+ Inget konto behövs. Demodata återställs varje natt kl 03:00.
{subtitle}
} +