Rijkshuisstijl restyle + wizard fixes

Chrome: two-tier Rijksoverheid header (white brand bar + lint-blue
breadcrumb bar, route-driven), dark multi-column footer, white page
surface. Session shown via a shared SESSION_PORT token (keeps shared/
free of the auth context).

Overview ("Mijn overzicht") rebuilt to the NL Design System #392 pattern:
side-nav + "Wat moet ik regelen" task list (derived) + "Mijn registratie"
cards. New shared components: card, task-list, side-nav; pure
tasksFromProfile (+spec).

Wizards: grey form panel, connected numbered stepper, form-field
"(verplicht)" markers + styled description/error, full-width inputs.
Propagated to login, detail, change-request, address-fields.

Bug fixes:
- wizard-shell: add FormsModule so NgForm intercepts submit (wizards now
  advance; no native GET leaking choices into the URL).
- wizard-shell: error-summary links focus the field instead of navigating
  (a fragment href resolved against <base href="/"> reloaded to "/" and
  bounced to login).
- wizard-shell: error-summary focus only on the rising edge, so typing
  while errors are shown no longer scrolls the page up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
eho
2026-06-27 13:21:54 +02:00
co-authored by Claude Opus 4.8
parent d08f3877f7
commit 7a582ae2fa
30 changed files with 677 additions and 149 deletions
+41
View File
@@ -0,0 +1,41 @@
import { describe, it, expect } from 'vitest';
import { tasksFromProfile } from './tasks';
import { Registration } from './registration';
const base: Registration = {
bigNummer: '12345678901',
naam: 'A. Tester',
beroep: 'arts',
registratiedatum: '2018-01-01',
geboortedatum: '1980-01-01',
status: { tag: 'Geregistreerd', herregistratieDatum: '2026-12-31' },
};
describe('tasksFromProfile', () => {
it('offers herregistratie when within the deadline window', () => {
const tasks = tasksFromProfile(base, new Date('2026-06-27'));
expect(tasks).toHaveLength(1);
expect(tasks[0].to).toBe('/herregistratie');
expect(tasks[0].description).toContain('31 december 2026');
});
it('offers nothing when the deadline is far away', () => {
const far: Registration = { ...base, status: { tag: 'Geregistreerd', herregistratieDatum: '2030-12-31' } };
expect(tasksFromProfile(far, new Date('2026-06-27'))).toHaveLength(0);
});
it('surfaces a notice for a suspended registration', () => {
const reg: Registration = { ...base, status: { tag: 'Geschorst', geschorstTot: '2027-01-01', reden: 'Onderzoek' } };
const tasks = tasksFromProfile(reg, new Date('2026-06-27'));
expect(tasks).toHaveLength(1);
expect(tasks[0].title).toContain('geschorst');
expect(tasks[0].description).toBe('Onderzoek');
});
it('surfaces a notice for a struck-off registration', () => {
const reg: Registration = { ...base, status: { tag: 'Doorgehaald', doorgehaaldOp: '2025-01-01', reden: 'Op eigen verzoek' } };
const tasks = tasksFromProfile(reg, new Date('2026-06-27'));
expect(tasks).toHaveLength(1);
expect(tasks[0].title).toContain('doorgehaald');
});
});
+59
View File
@@ -0,0 +1,59 @@
import { Registration } from './registration';
import { herregistratieDeadline, isHerregistratieEligible } from './registration.policy';
/**
* What the dashboard's "Wat moet ik regelen" list needs. Pure presentation data
* derived from the registration — no Angular. Mirrors the shared TaskItem shape.
*/
export interface PortalTask {
title: string;
description: string;
to: string;
actionLabel: string;
}
function formatNL(d: Date): string {
return d.toLocaleDateString('nl-NL', { day: 'numeric', month: 'long', year: 'numeric' });
}
/**
* Derive the open tasks for a professional from their registration (pure;
* `today` is injected so it's testable). Herregistratie within its window is the
* primary action; a suspended/struck-off registration surfaces as a notice-task.
* Reuses the same rules the detail/summary use (registration.policy).
*/
export function tasksFromProfile(reg: Registration, today: Date): PortalTask[] {
const tasks: PortalTask[] = [];
if (isHerregistratieEligible(reg, today)) {
const deadline = herregistratieDeadline(reg);
tasks.push({
title: 'Vraag uw herregistratie aan',
description: deadline
? `Verleng uw registratie vóór ${formatNL(deadline)}.`
: 'U kunt nu uw herregistratie aanvragen.',
to: '/herregistratie',
actionLabel: 'Herregistratie aanvragen',
});
}
if (reg.status.tag === 'Geschorst') {
tasks.push({
title: 'Uw registratie is geschorst',
description: reg.status.reden,
to: '/registratie',
actionLabel: 'Bekijk uw gegevens',
});
}
if (reg.status.tag === 'Doorgehaald') {
tasks.push({
title: 'Uw registratie is doorgehaald',
description: reg.status.reden,
to: '/registratie',
actionLabel: 'Bekijk uw gegevens',
});
}
return tasks;
}