diff --git a/apps/beheer/src/app/app.html b/apps/beheer/src/app/app.html
index 0680b43..7031d80 100644
--- a/apps/beheer/src/app/app.html
+++ b/apps/beheer/src/app/app.html
@@ -1 +1,5 @@
+
diff --git a/apps/beheer/src/app/app.routes.ts b/apps/beheer/src/app/app.routes.ts
index 942b1be..03aa788 100644
--- a/apps/beheer/src/app/app.routes.ts
+++ b/apps/beheer/src/app/app.routes.ts
@@ -1,7 +1,9 @@
import { Route } from '@angular/router';
import { authenticatedGuard } from 'auth';
import { CatalogusPage } from './catalogus/catalogus-page';
+import { DefaultFillPage } from './default-fill/default-fill-page';
export const appRoutes: Route[] = [
{ path: '', component: CatalogusPage, canActivate: [authenticatedGuard] },
+ { path: 'default-fill', component: DefaultFillPage, canActivate: [authenticatedGuard] },
];
diff --git a/apps/beheer/src/app/default-fill/default-fill-page.ts b/apps/beheer/src/app/default-fill/default-fill-page.ts
index e5e9e46..7cb58e6 100644
--- a/apps/beheer/src/app/default-fill/default-fill-page.ts
+++ b/apps/beheer/src/app/default-fill/default-fill-page.ts
@@ -25,10 +25,48 @@ export class DefaultFillPage {
protected readonly saved = 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.saved.set(false);
+ this.bff.getBeheerDefaultFill().subscribe({
+ next: (d: BeheerDefaultFill) => {
+ this.bronorganisatie.set(d.bronorganisatie);
+ this.verantwoordelijkeOrganisatie.set(d.verantwoordelijkeOrganisatie);
+ this.vertrouwelijkheidaanduiding.set(d.vertrouwelijkheidaanduiding);
+ this.loading.set(false);
+ this.loaded.set(true);
+ },
+ error: () => {
+ this.loading.set(false);
+ this.loaded.set(true);
+ this.failed.set(true);
+ },
+ });
}
save(): void {
- // ponytail: stub for the red test; the real save lands in the green commit.
+ this.saving.set(true);
+ this.failed.set(false);
+ this.saved.set(false);
+ this.bff
+ .putBeheerDefaultFill({
+ bronorganisatie: this.bronorganisatie(),
+ verantwoordelijkeOrganisatie: this.verantwoordelijkeOrganisatie(),
+ vertrouwelijkheidaanduiding: this.vertrouwelijkheidaanduiding(),
+ })
+ .subscribe({
+ next: () => {
+ this.saving.set(false);
+ this.saved.set(true);
+ },
+ error: () => {
+ this.saving.set(false);
+ this.failed.set(true);
+ },
+ });
}
}