Two backlog trees are complete: `docs/project/backlog/` (75 files, every WP done) and `docs/project/refactor-backlog-setup/` (the arc before it). Move both under `docs/project/archive/` with `git mv`, so history stays intact through `git log --follow`. `SHOWCASE-ROADMAP.md` moves with them, because it points at the now-archived backlog README. Add `docs/project/archive/README.md`. It states that these trees are historical and names the two directories that are still live. Repoint every inbound reference named in RD-30's Files table: CLAUDE.md, the root README, both backend READMEs, `LetterHtml.cs`, `a11y.mdx`, the `document-feature` and `new-ssp` skills, and the readable-codebase PLAN, README, and RD-19 ticket. Fix two upward-relative links inside the moved WP files (WP-68, WP-69) that gained a directory level and would otherwise break. Repoint `.prettierignore`'s two agent-prompt exclusions to their new path, so prettier keeps leaving those files' exact wording alone. Mark RD-30 done and check off its acceptance criteria; flip its README row to done. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
46 lines
2.6 KiB
Markdown
46 lines
2.6 KiB
Markdown
# WP-34 — Adres: phone field + BRP address read-only
|
|
|
|
Status: done
|
|
Phase: 7 — refinements
|
|
|
|
## Why
|
|
|
|
The "Mijn gegevens" screen let the user _edit_ their address (straat/postcode/woonplaats) and
|
|
submit it as an adreswijziging. But the BRP (Basisregistratie Personen) is the authority for a
|
|
person's address — you change it at the municipality, not in a register self-service portal.
|
|
This WP corrects that: the address is shown **read-only** (rendered from the BRP data the
|
|
screen already loads), and the editable/submittable contact detail becomes the **phone number**
|
|
— the thing CIBG actually holds and the professional can update here.
|
|
|
|
## Decisions (made while building — no spec existed; flagged for review)
|
|
|
|
- **The adreswijziging form becomes a telefoonwijziging form.** Address is read-only display;
|
|
phone is the one editable field. Same single-step machine idiom (Model/Msg/pure reduce +
|
|
value object + submit command) — only the fields changed.
|
|
- **New `Telefoonnummer` value object** (parse-don't-validate, lax Dutch format: 10 digits,
|
|
leading 0, `+31`→`0`, formatting stripped). Backend `RejectPhoneChange` re-validates as the
|
|
authority (ADR-0001); the FE check is UX-only. Replaces the old address/`RejectChangeRequest`.
|
|
- **Phone starts empty.** There is no current-phone anywhere in BRP/seed/Person, so no
|
|
current-value round-trip was added (YAGNI) — the form submits a new/updated number. The
|
|
read-only BRP address gives the screen its context.
|
|
- **Endpoint reused, contract narrowed.** `POST /change-requests` now takes `{ telefoon }`
|
|
(category `telefoonwijziging`); the typed client was regenerated (drift check clean).
|
|
|
|
## Files
|
|
|
|
- `registratie/domain/value-objects/telefoonnummer.ts` (+spec) — new value object.
|
|
- `registratie/domain/change-request.machine.ts` (+spec) — Draft/Valid now `{ telefoon }`.
|
|
- `registratie/infrastructure/change-request.adapter.ts` — sends `{ telefoon }`.
|
|
- `registratie/ui/change-request-form/change-request-form.component.ts` (+story) — read-only
|
|
BRP address block + editable phone field; takes `brpAdres` input.
|
|
- `registratie/ui/registration-detail.page.ts` — passes `profile()?.person?.adres`.
|
|
- Backend: `Dtos.cs`, `Program.cs`, `SubmissionRules.cs` (+ RuleTests/EndpointTests/IdempotencyTests).
|
|
- `src/locale/*` — new/changed `$localize` ids + English targets.
|
|
|
|
## Acceptance criteria
|
|
|
|
- [x] BRP address rendered read-only with a "change it at your municipality" note.
|
|
- [x] Phone field with format validation (client instant + server authoritative).
|
|
- [x] `npm run ci` green (lint, format, tokens, 332 FE tests, localized build, backend 122
|
|
tests, api-client drift clean after commit).
|