feat(portal-beheer): catalogus viewer loads published zaaktypen from the BFF (refs #130)

This commit is contained in:
not
2026-07-24 10:56:38 +02:00
parent b412721938
commit 4c702e324a
@@ -21,6 +21,25 @@ export class CatalogusPage {
protected readonly failed = signal(false); protected readonly failed = signal(false);
constructor() { 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);
},
});
} }
} }