feat(portal-openbaar): surface the citizen reference in the public register (refs #78)

The BFF's public view exposes id/status/reference (never bsn/naam) and searches by
id or reference; the openbaar register's Referentie column and search now show the
reference the citizen saw on submit. api-client + openapi.json regenerated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-14 14:46:55 +02:00
parent 566fc9bcea
commit 44e6f81f81
9 changed files with 62 additions and 30 deletions

View File

@@ -6,11 +6,12 @@ namespace Bff.Api;
public sealed record SubmitAccepted(string RegistrationId, string Status);
/// <summary>A projection row as the projection-api serves it. <c>Bsn</c>/<c>NaamPlaceholder</c> are
/// read but never surfaced by the openbaar endpoint (public-safe filtering, ADR-0010/S-09).</summary>
public sealed record ProjectionEntry(string Id, string Status, string? Bsn, string? NaamPlaceholder);
/// read but never surfaced by the openbaar endpoint (public-safe filtering, ADR-0010/S-09).
/// <c>Reference</c> is the public-safe citizen reference (the zaak identificatie, #78).</summary>
public sealed record ProjectionEntry(string Id, string Status, string? Reference, string? Bsn, string? NaamPlaceholder);
/// <summary>A public-safe openbaar register row — only non-sensitive fields leave the BFF.</summary>
public sealed record OpenbaarEntry(string Id, string Status);
public sealed record OpenbaarEntry(string Id, string Status, string? Reference);
/// <summary>Port to the Domain Service (§8.3: the BFF is the portals' only backend; it fans out).</summary>
public interface IDomainClient

View File

@@ -11,8 +11,10 @@ public static class OpenbaarProjection
{
var filtered = string.IsNullOrWhiteSpace(q)
? entries
: entries.Where(e => e.Id.Contains(q, StringComparison.OrdinalIgnoreCase));
: entries.Where(e =>
e.Id.Contains(q, StringComparison.OrdinalIgnoreCase) ||
(e.Reference?.Contains(q, StringComparison.OrdinalIgnoreCase) ?? false));
return [.. filtered.Select(e => new OpenbaarEntry(e.Id, e.Status))];
return [.. filtered.Select(e => new OpenbaarEntry(e.Id, e.Status, e.Reference))];
}
}