Restyle the contact-change form with house CIBG surfaces instead of hand-rolled markup: the read-only BRP address now uses app-data-block/app-data-row (grey datablock), and the phone field sits in a plain <fieldset> inside the existing .form-horizontal form (inherits the CIBG grey box). No new CSS surfaces; row keys reuse the address.* i18n ids. Logic/machine/specs unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2.6 KiB
2.6 KiB
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
Telefoonnummervalue object (parse-don't-validate, lax Dutch format: 10 digits, leading 0,+31→0, formatting stripped). BackendRejectPhoneChangere-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-requestsnow takes{ telefoon }(categorytelefoonwijziging); 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; takesbrpAdresinput.registratie/ui/registration-detail.page.ts— passesprofile()?.person?.adres.- Backend:
Dtos.cs,Program.cs,SubmissionRules.cs(+ RuleTests/EndpointTests/IdempotencyTests). src/locale/*— new/changed$localizeids + English targets.
Acceptance criteria
- BRP address rendered read-only with a "change it at your municipality" note.
- Phone field with format validation (client instant + server authoritative).
npm run cigreen (lint, format, tokens, 332 FE tests, localized build, backend 122 tests, api-client drift clean after commit).