From 6d96e56ec8a3c6b3226e159276a01a90942b0d44 Mon Sep 17 00:00:00 2001 From: amentis Date: Thu, 28 Mar 2024 11:51:26 +0200 Subject: [PATCH] apply entity doi active filter --- .../core/src/main/java/eu/eudat/service/dmp/DmpServiceImpl.java | 2 +- dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dmp-backend/core/src/main/java/eu/eudat/service/dmp/DmpServiceImpl.java b/dmp-backend/core/src/main/java/eu/eudat/service/dmp/DmpServiceImpl.java index b337dea69..46a7ee2de 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/service/dmp/DmpServiceImpl.java +++ b/dmp-backend/core/src/main/java/eu/eudat/service/dmp/DmpServiceImpl.java @@ -953,7 +953,7 @@ public class DmpServiceImpl implements DmpService { if (!dmp.getStatus().equals(DmpStatus.Finalized)) throw new MyApplicationException("DMP is already drafted"); - EntityDoiQuery entityDoiQuery = this.queryFactory.query(EntityDoiQuery.class).authorize(AuthorizationFlags.OwnerOrDmpAssociatedOrPermission).types(EntityType.DMP).entityIds(dmp.getId()); + EntityDoiQuery entityDoiQuery = this.queryFactory.query(EntityDoiQuery.class).authorize(AuthorizationFlags.OwnerOrDmpAssociatedOrPermission).types(EntityType.DMP).entityIds(dmp.getId()).isActive(IsActive.Active); if (entityDoiQuery.count() > 0) throw new MyApplicationException("DMP is deposited"); dmp.setStatus(DmpStatus.Draft); diff --git a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts index 641b53fb1..5387f9885 100644 --- a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts +++ b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts @@ -125,6 +125,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { this.dmp.descriptions = data.descriptions.filter(x => x.isActive === IsActive.Active && x.status !== DescriptionStatus.Canceled); } } + this.dmp.entityDois = data.entityDois.filter(x => x.isActive === IsActive.Active); this.selectedBlueprint = data.blueprint; this.researchers = this.referenceService.getReferencesForTypes(this.dmp?.dmpReferences, [this.referenceTypeService.getResearcherReferenceType()]); if (!this.hasDoi()) { @@ -753,6 +754,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { [nameof(x => x.entityDois), nameof(x => x.id)].join('.'), [nameof(x => x.entityDois), nameof(x => x.repositoryId)].join('.'), [nameof(x => x.entityDois), nameof(x => x.doi)].join('.'), + [nameof(x => x.entityDois), nameof(x => x.isActive)].join('.'), [nameof(x => x.descriptions), nameof(x => x.id)].join('.'), [nameof(x => x.descriptions), nameof(x => x.label)].join('.'), [nameof(x => x.descriptions), nameof(x => x.status)].join('.'),