From 4c702e324aa151b32a2344154f95faa1f7baa565 Mon Sep 17 00:00:00 2001 From: Niek Otten Date: Fri, 24 Jul 2026 10:56:38 +0200 Subject: [PATCH] feat(portal-beheer): catalogus viewer loads published zaaktypen from the BFF (refs #130) --- .../src/app/catalogus/catalogus-page.ts | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/apps/beheer/src/app/catalogus/catalogus-page.ts b/apps/beheer/src/app/catalogus/catalogus-page.ts index b4922c0..5563cb8 100644 --- a/apps/beheer/src/app/catalogus/catalogus-page.ts +++ b/apps/beheer/src/app/catalogus/catalogus-page.ts @@ -21,6 +21,25 @@ export class CatalogusPage { protected readonly failed = signal(false); constructor() { - // ponytail: stub for the red test; the real load lands in the green commit. + this.load(); + } + + load(): void { + this.loading.set(true); + this.failed.set(false); + this.bff.getBeheerCatalogiZaaktypen().subscribe({ + next: (rows: BeheerZaaktype[]) => { + this.items.set(rows); + this.loading.set(false); + this.loaded.set(true); + }, + // Surface the failure (e.g. 403 for a non-beheerder) instead of swallowing it. + error: () => { + this.items.set([]); + this.loading.set(false); + this.loaded.set(true); + this.failed.set(true); + }, + }); } }