feat(cibg): WP-11 — render "Mijn aanvragen" as the CIBG Aanvragen component

- application-link switches to a `li[app-application-link]` attribute selector
  (native <li> child of the <ul> — axe-clean list) and drops the invented,
  dead `.application` / `.application-title` classes for the real vendored
  `.dashboard-block.applications li a` chain (h3.h3 / .subtitle / .status / .cta).
  Content stacks in a flex column; a non-navigating row mirrors the card surface
  from tokens. Re-enables a11y on the application-link/list stories.
- Dashboard "Mijn aanvragen" now renders through app-application-list +
  <li app-application-link> rows (was a keuzelijst), mapped by a new pure
  submittedRow() view helper (+ spec). Concepts stay the resumable melding.
- aanvraag-block is now concept-only (submitted mapping moved to aanvraag-view).

WP-11 grep gate clean. GREEN: lint, tokens, 181 tests, build, 136 axe stories.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-02 21:34:21 +02:00
parent 82fc3c493d
commit 98fd7e4bcd
8 changed files with 410 additions and 203 deletions

View File

@@ -0,0 +1,44 @@
import { Aanvraag, AanvraagType } from './aanvraag';
/** View-model mapping for an aanvraag: type → label, and a submitted aanvraag →
the CIBG "aanvragen" row fields (heading/status/subtitle). Pure, no Angular —
the UI renders these, it does not derive them. */
export const TYPE_LABELS: Record<AanvraagType, string> = {
registratie: $localize`:@@aanvraagBlock.type.registratie:Inschrijving`,
herregistratie: $localize`:@@aanvraagBlock.type.herregistratie:Herregistratie`,
intake: $localize`:@@aanvraagBlock.type.intake:Herregistratie-intake`,
};
export interface AanvraagRow {
heading: string;
/** Reference + submit-date line (the `.status` line of an aanvragen row). */
status: string;
/** Secondary note: manual-review notice or rejection reason. */
subtitle: string;
}
function formatNL(iso?: string): string {
return iso ? new Date(iso).toLocaleDateString('nl-NL', { day: 'numeric', month: 'long', year: 'numeric' }) : '';
}
/** Fields for a submitted aanvraag's row (Concept has no row — it renders as a
resumable melding, see aanvraag-block). */
export function submittedRow(a: Aanvraag): AanvraagRow {
const s = a.status;
const heading = TYPE_LABELS[a.type];
switch (s.tag) {
case 'Concept':
return { heading, status: '', subtitle: '' };
case 'InBehandeling':
return {
heading,
status: $localize`:@@aanvraagBlock.inBehandeling:Referentie ${s.referentie}:ref: · ingediend op ${formatNL(a.submittedAt)}:datum:`,
subtitle: s.manual ? $localize`:@@aanvraagBlock.manual:Uw aanvraag wordt handmatig beoordeeld in de backoffice.` : '',
};
case 'Goedgekeurd':
return { heading, status: $localize`:@@aanvraagBlock.goedgekeurd:Referentie ${s.referentie}:ref:`, subtitle: '' };
case 'Afgewezen':
return { heading, status: $localize`:@@aanvraagBlock.afgewezen:Referentie ${s.referentie}:ref:`, subtitle: s.reden };
}
}