Files
atomic-design-poc/public/mock/registration.json
Edwin van den Houdt 57b9f3f804 Model Registration status as a discriminated union
Each status variant now owns its own data: only Geregistreerd carries a
herregistratieDatum; Geschorst/Doorgehaald carry their own dates + reason.
A struck-off registration can no longer hold a future herregistratie date —
that impossible combination is gone from the type.

- status-badge keys color off the tag via a switch + assertNever
- registration-summary renders only the rows a variant's data supports
- registration.json nests the status; stories cover all three variants

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 16:55:49 +02:00

9 lines
235 B
JSON

{
"bigNummer": "19012345601",
"naam": "Dr. A. (Anna) de Vries",
"beroep": "Arts",
"registratiedatum": "2012-09-01",
"geboortedatum": "1985-03-14",
"status": { "tag": "Geregistreerd", "herregistratieDatum": "2027-09-01" }
}