apply entity doi active filter

dmp-refactoring
amentis 1 month ago
parent 3e155de0d4
commit 6d96e56ec8

@ -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);

@ -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<Dmp>(x => x.entityDois), nameof<EntityDoi>(x => x.id)].join('.'),
[nameof<Dmp>(x => x.entityDois), nameof<EntityDoi>(x => x.repositoryId)].join('.'),
[nameof<Dmp>(x => x.entityDois), nameof<EntityDoi>(x => x.doi)].join('.'),
[nameof<Dmp>(x => x.entityDois), nameof<EntityDoi>(x => x.isActive)].join('.'),
[nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.id)].join('.'),
[nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.label)].join('.'),
[nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.status)].join('.'),

Loading…
Cancel
Save