feat(legal): add the trader identification block to the legal pages #138

Sammanfogat
supernaut sammanfogade 1 incheckning från fix/legal-controller-identification in i main 2026-08-01 19:10:03 +00:00
Ägare

Closes #135 — but deliberately publishes nothing yet. This needs a decision from you before it can
ship.

Structure

One source of truth (src/lib/legal-entity.ts) rendered by one component
(src/components/legal-entity.astro) at the end of the Terms, the Privacy Policy and /contact, in
both languages. Labels are new legal.entity.* keys in both dictionaries. The country is an i18n
string rather than a data field, so it reads correctly per locale instead of showing one language's
spelling on the other's page. Invoicing will need the same values, which is the other reason they live
in one module.

Why nothing renders

The registered details are not recorded anywhere I can source them from — no organisationsnummer,
no VAT number and no postal address exist in the project's records.

So nothing was guessed. Each unknown field is null with a TODO(legal) marker, and the block is
withheld all-or-nothing — half an identification block is a worse answer to e-handelslagen § 8 and
GDPR Art. 13(1)(a) than the single line those pages carry today, and it reads as an oversight rather
than a decision. The gate is compiler-checked rather than asserted with a cast. Confirmed against a real
production build: /terms, /en/privacy and /contact render no block and no placeholder text. In
pnpm dev a dev-only notice names the missing fields so the gap is visible to whoever works on the
pages.

Why this stops here rather than shipping

Filling the four fields in is not purely mechanical. Publishing a trader's registration details has
consequences that have to be settled before they go on a page that cannot be un-published, and that
decision is pending. Until it lands the block stays withheld and the three pages render exactly as they
do today.

To finish

Fill in legalName, organisationNumber, vatNumber and address in src/lib/legal-entity.ts.
Nothing else needs touching — the block then appears on all six pages.

/trial-terms was left alone; the issue named the Terms, the Privacy Policy and /contact only.

Verified

pnpm check 0 errors · eslint, stylelint, pnpm format:check, pnpm mdlint all clean ·
pnpm test 177 passed (8 new for the publish gate) · pnpm build succeeds.

Closes #135 — **but deliberately publishes nothing yet. This needs a decision from you before it can ship.** ## Structure One source of truth (`src/lib/legal-entity.ts`) rendered by one component (`src/components/legal-entity.astro`) at the end of the Terms, the Privacy Policy and `/contact`, in both languages. Labels are new `legal.entity.*` keys in both dictionaries. The country is an i18n string rather than a data field, so it reads correctly per locale instead of showing one language's spelling on the other's page. Invoicing will need the same values, which is the other reason they live in one module. ## Why nothing renders **The registered details are not recorded anywhere I can source them from** — no organisationsnummer, no VAT number and no postal address exist in the project's records. So nothing was guessed. Each unknown field is `null` with a `TODO(legal)` marker, and the block is withheld **all-or-nothing** — half an identification block is a worse answer to e-handelslagen § 8 and GDPR Art. 13(1)(a) than the single line those pages carry today, and it reads as an oversight rather than a decision. The gate is compiler-checked rather than asserted with a cast. Confirmed against a real production build: `/terms`, `/en/privacy` and `/contact` render no block and no placeholder text. In `pnpm dev` a dev-only notice names the missing fields so the gap is visible to whoever works on the pages. ## Why this stops here rather than shipping Filling the four fields in is not purely mechanical. Publishing a trader's registration details has consequences that have to be settled before they go on a page that cannot be un-published, and that decision is pending. Until it lands the block stays withheld and the three pages render exactly as they do today. ## To finish Fill in `legalName`, `organisationNumber`, `vatNumber` and `address` in `src/lib/legal-entity.ts`. Nothing else needs touching — the block then appears on all six pages. `/trial-terms` was left alone; the issue named the Terms, the Privacy Policy and `/contact` only. ## Verified `pnpm check` 0 errors · eslint, stylelint, `pnpm format:check`, `pnpm mdlint` all clean · `pnpm test` 177 passed (8 new for the publish gate) · `pnpm build` succeeds.
supernaut tvångsskickade fix/legal-controller-identification från 7380180f8d
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m12s
till c2ed304857
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m6s
2026-08-01 18:51:22 +00:00
Jämför
supernaut sammanfogade incheckning d5dfa1513e till main 2026-08-01 19:10:03 +00:00
supernaut tog bort grenen fix/legal-controller-identification 2026-08-01 19:10:03 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-web!138
Ingen beskrivning angiven.