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>
51 lines
2.3 KiB
TypeScript
51 lines
2.3 KiB
TypeScript
import { formatDatumNl } from '@shared/kernel/datum';
|
|
import { AanvraagType } from './werkvoorraad-item';
|
|
import { BeoordelingStatus, BeoordelingView } from './beoordeling';
|
|
|
|
/** View-model mapping shared by the werkvoorraad list and the beoordeling
|
|
detail screen: 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;
|
|
}
|