- @if (projectId()) {
-
- }
- @if (registrationId()) {
-
-
+ @if (project.isError()) {
+
} @else {
-
- @if (pageTitle()) {
-
-
- {{ pageTitle() }}
-
+ @if (projectId()) {
+
+ }
+
+ @if (registration.isError()) {
+
+ } @else {
+ @if (registrationId()) {
+
+
+
+
+
+ } @else {
+ @if (pageTitle()) {
+
+
+ {{ pageTitle() }}
+
+
+
+
+
+ }
-
-
+
+ }
}
-
}
+
-
diff --git a/interfaces/Portalicious/src/app/components/page-layout/page-layout.component.ts b/interfaces/Portalicious/src/app/components/page-layout/page-layout.component.ts
index 82e57e6e50..06afbe74c0 100644
--- a/interfaces/Portalicious/src/app/components/page-layout/page-layout.component.ts
+++ b/interfaces/Portalicious/src/app/components/page-layout/page-layout.component.ts
@@ -1,12 +1,22 @@
-import { ChangeDetectionStrategy, Component, input } from '@angular/core';
+import {
+ ChangeDetectionStrategy,
+ Component,
+ inject,
+ input,
+} from '@angular/core';
+import { injectQuery } from '@tanstack/angular-query-experimental';
import { CardModule } from 'primeng/card';
+import { MessageModule } from 'primeng/message';
import { FooterComponent } from '~/components/page-layout/components/footer/footer.component';
import { HeaderComponent } from '~/components/page-layout/components/header/header.component';
+import { PageLayoutTitleAndActionsComponent } from '~/components/page-layout/components/page-layout-title-and-actions/page-layout-title-and-actions.component';
import { ProjectMenuComponent } from '~/components/page-layout/components/project-menu/project-menu.component';
import { RegistrationHeaderComponent } from '~/components/page-layout/components/registration-header/registration-header.component';
import { RegistrationMenuComponent } from '~/components/page-layout/components/registration-menu/registration-menu.component';
+import { ProjectApiService } from '~/domains/project/project.api.service';
+import { RegistrationApiService } from '~/domains/registration/registration.api.service';
@Component({
selector: 'app-page-layout',
@@ -18,13 +28,27 @@ import { RegistrationMenuComponent } from '~/components/page-layout/components/r
RegistrationHeaderComponent,
RegistrationMenuComponent,
CardModule,
+ PageLayoutTitleAndActionsComponent,
+ MessageModule,
],
templateUrl: './page-layout.component.html',
styles: ``,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class PageLayoutComponent {
+ readonly registrationApiService = inject(RegistrationApiService);
+ readonly projectApiService = inject(ProjectApiService);
+
pageTitle = input
();
projectId = input();
registrationId = input();
+
+ project = injectQuery(this.projectApiService.getProject(this.projectId));
+
+ registration = injectQuery(
+ this.registrationApiService.getRegistrationById(
+ this.projectId,
+ this.registrationId,
+ ),
+ );
}
diff --git a/interfaces/Portalicious/src/app/domains/registration/registration.api.service.ts b/interfaces/Portalicious/src/app/domains/registration/registration.api.service.ts
index cc88ad1642..1a65bb2fd3 100644
--- a/interfaces/Portalicious/src/app/domains/registration/registration.api.service.ts
+++ b/interfaces/Portalicious/src/app/domains/registration/registration.api.service.ts
@@ -54,11 +54,12 @@ export class RegistrationApiService extends DomainApiService {
}
getRegistrationById(
- projectId: Signal,
- registrationId: Signal,
+ projectId: Signal,
+ registrationId: Signal,
) {
return this.generateQueryOptions({
- path: [...BASE_ENDPOINT(projectId), registrationId],
+ path: [...BASE_ENDPOINT(projectId as Signal), registrationId],
+ enabled: () => !!projectId() && !!registrationId(),
});
}
diff --git a/interfaces/Portalicious/src/locale/messages.nl.xlf b/interfaces/Portalicious/src/locale/messages.nl.xlf
index 32db50328c..dcd99f3d0c 100644
--- a/interfaces/Portalicious/src/locale/messages.nl.xlf
+++ b/interfaces/Portalicious/src/locale/messages.nl.xlf
@@ -857,4 +857,4 @@