From 97449226fef98082b749433799c585b3772c8140 Mon Sep 17 00:00:00 2001 From: Sofia Papacharalampous Date: Tue, 30 Apr 2024 15:19:09 +0300 Subject: [PATCH] fixed dmp blueprint saving --- .../dmp-blueprint-editor.component.html | 4 ++-- .../editor/dmp-blueprint-editor.component.ts | 23 ++++++++++++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.html b/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.html index 54160732f..339477083 100644 --- a/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.html +++ b/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.html @@ -27,7 +27,7 @@ -
+
@@ -331,7 +331,7 @@
-
diff --git a/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.ts b/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.ts index 6af3b9e69..0939bc809 100644 --- a/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.ts +++ b/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.ts @@ -238,7 +238,8 @@ export class DmpBlueprintEditorComponent extends BaseEditor section.fields.some(field => (field.category == DmpBlueprintFieldCategory.System) && (field as SystemFieldInSection).systemFieldType === DmpBlueprintSystemFieldType.Description)); } + + hasLanguage(): boolean { + const dmpBlueprint: DmpBlueprintPersist = this.formGroup.value; + return dmpBlueprint.definition.sections.some(section => section.fields.some(field => (field.category == DmpBlueprintFieldCategory.System) && (field as SystemFieldInSection).systemFieldType === DmpBlueprintSystemFieldType.Language)); + } + + hasAccess(): boolean { + const dmpBlueprint: DmpBlueprintPersist = this.formGroup.value; + return dmpBlueprint.definition.sections.some(section => section.fields.some(field => (field.category == DmpBlueprintFieldCategory.System) && (field as SystemFieldInSection).systemFieldType === DmpBlueprintSystemFieldType.AccessRights)); + } hasDescriptionTemplates(): boolean { const dmpBlueprint: DmpBlueprintPersist = this.formGroup.value; @@ -537,7 +554,7 @@ export class DmpBlueprintEditorComponent extends BaseEditor