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,30 @@
import { describe, it, expect } from 'vitest';
import { submittedRow, TYPE_LABELS } from './aanvraag-view';
import { Aanvraag } from './aanvraag';
const base = { id: '1', type: 'herregistratie' as const, documentIds: [], createdAt: '', updatedAt: '', submittedAt: '2024-05-12' };
describe('submittedRow', () => {
it('InBehandeling: reference + submit date; manual note only when manual', () => {
const auto = submittedRow({ ...base, status: { tag: 'InBehandeling', referentie: 'R1', manual: false } } as Aanvraag);
expect(auto.heading).toBe(TYPE_LABELS.herregistratie);
expect(auto.status).toContain('R1');
expect(auto.status).toContain('12 mei 2024');
expect(auto.subtitle).toBe('');
const manual = submittedRow({ ...base, status: { tag: 'InBehandeling', referentie: 'R1', manual: true } } as Aanvraag);
expect(manual.subtitle).not.toBe('');
});
it('Afgewezen: reason becomes the subtitle', () => {
const row = submittedRow({ ...base, status: { tag: 'Afgewezen', referentie: 'R2', reden: 'Onvoldoende uren' } } as Aanvraag);
expect(row.status).toContain('R2');
expect(row.subtitle).toBe('Onvoldoende uren');
});
it('Goedgekeurd: reference only', () => {
const row = submittedRow({ ...base, status: { tag: 'Goedgekeurd', referentie: 'R3' } } as Aanvraag);
expect(row.status).toContain('R3');
expect(row.subtitle).toBe('');
});
});