Files
atomic-design-poc/apps/ssp/src/app/registratie/domain/aanvraag.ts
T
ehoandClaude Sonnet 5 dd11eafe50 refactor: strip WP-/RB- ticket refs from apps and libs (RD-18)
204 WP-NN/RB-NN comments named a closed ticket instead of the code they
sit next to. git blame already records history and stays correct when
code moves; the comment does not. This sweep removes the reference and
keeps the sentence, across 95 files in apps/ and libs/ plus the
behaviour-spec generator's header text.

Eleven references stay: five story files justify an a11y disable per
the README's rule, and one line in a11y.mdx documents that convention.
Two sentences needed a rewrite, not a deletion, so the reference's
meaning survives its removal. behaviour-spec.mdx is regenerated, not
hand-edited.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 21:23:07 +02:00

41 lines
1.7 KiB
TypeScript

/**
* An application (aanvraag) as the frontend sees it — the parsed, domain-side view
* of the backend-owned aggregate (see backend ApplicationStore + PRD 0001). Pure
* types, no Angular. Lives in `registratie` because the dashboard (here) is the
* consumer and the downstream wizards (`herregistratie → registratie`) produce them.
*
* The status is a discriminated union so illegal states are unrepresentable — same
* reflex as RemoteData. The server computes which tag applies (auto-approval on
* read); the FE renders it, it does not recompute the lifecycle.
*/
export type AanvraagType = 'registratie' | 'herregistratie' | 'intake';
// Ingediend/MeerInfoGevraagd (ADR-0002) are widened into the union so the parse
// boundary + renderers are ready, but no backend path emits them yet — that's the
// behandelaar-facing transition endpoint.
export type AanvraagStatus =
| { tag: 'Concept'; stepIndex: number; stepCount: number }
| { tag: 'Ingediend'; referentie: string }
| { tag: 'InBehandeling'; referentie: string; manual: boolean } // manual=true → "wordt handmatig beoordeeld"
| { tag: 'MeerInfoGevraagd'; referentie: string; reden: string }
| { tag: 'Goedgekeurd'; referentie: string }
| { tag: 'Afgewezen'; referentie: string; reden: string };
export interface Aanvraag {
id: string;
type: AanvraagType;
status: AanvraagStatus;
documentIds: string[];
createdAt: string;
updatedAt: string;
submittedAt?: string;
/** The case owner (a BSN). Only populated by the admin cross-owner list;
the user's own list leaves it undefined. */
owner?: string;
}
/** Detail adds the opaque wizard snapshot used to resume a Concept. */
export interface AanvraagDetail extends Aanvraag {
draft: unknown;
}