feat(behandelportal): WP-65a beoordeling detail (read) + fix unreachable medewerker login
CI / changes (pull_request) Successful in 17s
CI / lint (pull_request) Failing after 54s
CI / frontend (pull_request) Successful in 2m38s
CI / storybook-a11y (pull_request) Failing after 3m28s
CI / backend (pull_request) Successful in 2m1s
CI / semgrep (pull_request) Successful in 1m9s
CI / e2e (pull_request) Successful in 2m55s
CI / api-client-drift (pull_request) Successful in 2m1s
CI / changes (pull_request) Successful in 17s
CI / lint (pull_request) Failing after 54s
CI / frontend (pull_request) Successful in 2m38s
CI / storybook-a11y (pull_request) Failing after 3m28s
CI / backend (pull_request) Successful in 2m1s
CI / semgrep (pull_request) Successful in 1m9s
CI / e2e (pull_request) Successful in 2m55s
CI / api-client-drift (pull_request) Successful in 2m1s
New GET /beoordeling/{id} shows one aanvraag's status, linked documents, and a
canBesluiten decision flag, gated by the same CanBeoordelen capability as the
werkvoorraad list. Reads through IZaakSource.ListCases rather than a new seam
method (WP-66 needs one anyway for the real write); owner BSN is masked.
Fixes a real gap found while wiring this up: the behandelportal's login was still
WP-61's copied citizen/BSN DigiD flow, so nothing ever sent X-Medewerker and the
werkvoorraad screen (WP-64) always denied in a real browser. A dev-only
medewerkerInterceptor (mirrors the existing ?role= stand-in as ?rollen=) fixes that.
WP-65's own Risks note authorized splitting read from write across sessions given
its size; this is the read half. The decision-recording mutation is next (65b).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
import { formatDatumNl } from '@shared/kernel/datum';
|
||||
import { AanvraagType } from './werkvoorraad-item';
|
||||
import { BeoordelingStatus, BeoordelingView } from './beoordeling';
|
||||
|
||||
/** View-model mapping shared by the werkvoorraad list (WP-64) and the beoordeling
|
||||
detail screen (WP-65): type/status → labels. Pure, no Angular. Lives here (not in
|
||||
`werkvoorraad-item-view.ts`) because `BeoordelingStatus` is the wider of the two
|
||||
status unions — `werkvoorraad-item-view.ts` re-exports these for its own use. */
|
||||
|
||||
export const TYPE_LABELS: Record<AanvraagType, string> = {
|
||||
registratie: $localize`:@@werkvoorraad.type.registratie:Inschrijving`,
|
||||
herregistratie: $localize`:@@werkvoorraad.type.herregistratie:Herregistratie`,
|
||||
intake: $localize`:@@werkvoorraad.type.intake:Herregistratie-intake`,
|
||||
};
|
||||
|
||||
export function statusLabel(status: BeoordelingStatus): string {
|
||||
switch (status.tag) {
|
||||
case 'Ingediend':
|
||||
return $localize`:@@werkvoorraad.status.ingediend:Ingediend`;
|
||||
case 'InBehandeling':
|
||||
return status.manual
|
||||
? $localize`:@@werkvoorraad.status.inBehandelingHandmatig:In behandeling (handmatig)`
|
||||
: $localize`:@@werkvoorraad.status.inBehandeling:In behandeling`;
|
||||
case 'MeerInfoGevraagd':
|
||||
return $localize`:@@beoordeling.status.meerInfoGevraagd:Meer informatie gevraagd`;
|
||||
case 'Goedgekeurd':
|
||||
return $localize`:@@beoordeling.status.goedgekeurd:Goedgekeurd`;
|
||||
case 'Afgewezen':
|
||||
return $localize`:@@beoordeling.status.afgewezen:Afgewezen`;
|
||||
}
|
||||
}
|
||||
|
||||
/** Key/value rows for the beoordeling detail page (CIBG Datablock). */
|
||||
export function detailRows(view: BeoordelingView): { key: string; value: string }[] {
|
||||
const s = view.status;
|
||||
const rows = [
|
||||
{ key: $localize`:@@beoordeling.detail.soort:Soort aanvraag`, value: TYPE_LABELS[view.type] },
|
||||
{ key: $localize`:@@beoordeling.detail.status:Status`, value: statusLabel(s) },
|
||||
{ key: $localize`:@@beoordeling.detail.referentie:Referentie`, value: s.referentie },
|
||||
{ key: $localize`:@@beoordeling.detail.eigenaar:Eigenaar (BSN)`, value: view.owner },
|
||||
{
|
||||
key: $localize`:@@beoordeling.detail.ingediend:Ingediend op`,
|
||||
value: view.submittedAt ? formatDatumNl(view.submittedAt) : '—',
|
||||
},
|
||||
];
|
||||
if (s.tag === 'Afgewezen' || s.tag === 'MeerInfoGevraagd') {
|
||||
rows.push({ key: $localize`:@@beoordeling.detail.reden:Reden`, value: s.reden });
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
Reference in New Issue
Block a user