Compare commits

..

No commits in common. "0757713e63d5eaa2cdff09e0d7841020fc33305b" and "cc1be4f19412b8bc2623b3724312852c7b4f5618" have entirely different histories.

4 changed files with 12 additions and 6 deletions

View File

@ -523,7 +523,7 @@ public class DescriptionServiceImpl implements DescriptionService {
else if (!this.conventionService.isNullOrEmpty(persist.getTextValue())) ids.add(UUID.fromString(persist.getTextValue()));
if (ids.size() > 0){
Set<UUID> existingIds = this.queryFactory.query(DmpQuery.class).ids(ids).collectAs(new BaseFieldSet().ensure(Dmp._id)).stream().map(DmpEntity::getId).collect(Collectors.toSet());
Set<UUID> existingIds = this.queryFactory.query(DmpQuery.class).ids(ids).isActive(IsActive.Active).collectAs(new BaseFieldSet().ensure(Dmp._id)).stream().map(DmpEntity::getId).collect(Collectors.toSet());
for (UUID id : ids){
if (!existingIds.contains(id)) throw new MyNotFoundException(messageSource.getMessage("General_ItemNotFound", new Object[]{id, Dmp.class.getSimpleName()}, LocaleContextHolder.getLocale()));
}
@ -534,7 +534,7 @@ public class DescriptionServiceImpl implements DescriptionService {
else if (!this.conventionService.isNullOrEmpty(persist.getTextValue())) ids.add(UUID.fromString(persist.getTextValue()));
if (ids.size() > 0) {
Set<UUID> existingIds = this.queryFactory.query(DescriptionQuery.class).ids(ids).collectAs(new BaseFieldSet().ensure(Description._id)).stream().map(DescriptionEntity::getId).collect(Collectors.toSet());
Set<UUID> existingIds = this.queryFactory.query(DescriptionQuery.class).ids(ids).isActive(IsActive.Active).collectAs(new BaseFieldSet().ensure(Description._id)).stream().map(DescriptionEntity::getId).collect(Collectors.toSet());
for (UUID id : ids){
if (!existingIds.contains(id)) throw new MyNotFoundException(messageSource.getMessage("General_ItemNotFound", new Object[]{id, Description.class.getSimpleName()}, LocaleContextHolder.getLocale()));
}

View File

@ -334,8 +334,6 @@ public class PrefillingSourceServiceImpl implements PrefillingSourceService {
prefillings.add(prefilling);
}
prefillings = prefillings.stream().sorted(Comparator.comparing(Prefilling::getLabel, Comparator.nullsFirst(Comparator.naturalOrder()))).collect(Collectors.toList());
return prefillings;
}

View File

@ -186,7 +186,15 @@ export class PrefillDescriptionDialogComponent extends BaseComponent implements
prefillingSourceId: this.prefillForm.get('prefillingSourceId').value
};
return this.prefillingSourceService.search(request);
return this.prefillingSourceService.search(request).pipe(map(prefilling => prefilling.sort((a, b) => {
if (a.label > b.label) {
return 1;
} else if (a.label < b.label) {
return -1;
} else {
return 0;
}
})));
}
next() {

View File

@ -236,7 +236,7 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
if (this.isNew) {
let route = [];
route.push('/plans/edit/' + id);
route.push('/plans/overview/' + id);
this.router.navigate(route, { queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookupParams), 'lv': ++this.lv }, replaceUrl: true, relativeTo: this.route });
} else {
this.refreshData();