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); + }, + }); } }