minor fixes
This commit is contained in:
parent
b7774759f6
commit
04da845f49
|
@ -216,7 +216,6 @@ public class ReferenceQuery extends QueryBase<ReferenceEntity> {
|
||||||
List<Predicate> predicates = new ArrayList<>();
|
List<Predicate> predicates = new ArrayList<>();
|
||||||
if (userId != null || usePublic) {
|
if (userId != null || usePublic) {
|
||||||
predicates.add(queryContext.CriteriaBuilder.or(
|
predicates.add(queryContext.CriteriaBuilder.or(
|
||||||
queryContext.CriteriaBuilder.isNull(queryContext.Root.get(ReferenceEntity._createdById)),
|
|
||||||
userId != null ? queryContext.CriteriaBuilder.equal(queryContext.Root.get(ReferenceEntity._createdById), userId) : queryContext.CriteriaBuilder.or(), //Creates a false query
|
userId != null ? queryContext.CriteriaBuilder.equal(queryContext.Root.get(ReferenceEntity._createdById), userId) : queryContext.CriteriaBuilder.or(), //Creates a false query
|
||||||
queryContext.CriteriaBuilder.in(queryContext.Root.get(ReferenceEntity._id)).value(queryUtilsService.buildSubQuery(new BuildSubQueryInput<>(new BuildSubQueryInput.Builder<>(DmpReferenceEntity.class, UUID.class)
|
queryContext.CriteriaBuilder.in(queryContext.Root.get(ReferenceEntity._id)).value(queryUtilsService.buildSubQuery(new BuildSubQueryInput<>(new BuildSubQueryInput.Builder<>(DmpReferenceEntity.class, UUID.class)
|
||||||
.query(queryContext.Query)
|
.query(queryContext.Query)
|
||||||
|
|
|
@ -216,7 +216,7 @@ public class ExternalFetcherServiceImpl implements ExternalFetcherService {
|
||||||
else if (!this.conventionService.isNullOrEmpty(apiSource.getFirstPage())) completedPath = completedPath.replace("{page}", apiSource.getFirstPage());
|
else if (!this.conventionService.isNullOrEmpty(apiSource.getFirstPage())) completedPath = completedPath.replace("{page}", apiSource.getFirstPage());
|
||||||
else completedPath = completedPath.replace("{page}", "1");
|
else completedPath = completedPath.replace("{page}", "1");
|
||||||
|
|
||||||
completedPath = completedPath.replace("{pageSize}", !this.conventionService.isNullOrEmpty(externalReferenceCriteria.getPageSize()) ? externalReferenceCriteria.getPageSize() : "60");
|
completedPath = completedPath.replace("{pageSize}", !this.conventionService.isNullOrEmpty(externalReferenceCriteria.getPageSize()) ? externalReferenceCriteria.getPageSize() : "50");
|
||||||
completedPath = completedPath.replace("{host}", !this.conventionService.isNullOrEmpty(externalReferenceCriteria.getHost()) ? externalReferenceCriteria.getHost() : "");
|
completedPath = completedPath.replace("{host}", !this.conventionService.isNullOrEmpty(externalReferenceCriteria.getHost()) ? externalReferenceCriteria.getHost() : "");
|
||||||
completedPath = completedPath.replace("{path}", !this.conventionService.isNullOrEmpty(externalReferenceCriteria.getPath()) ? externalReferenceCriteria.getPath() : "");
|
completedPath = completedPath.replace("{path}", !this.conventionService.isNullOrEmpty(externalReferenceCriteria.getPath()) ? externalReferenceCriteria.getPath() : "");
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
import { Lookup } from "@common/model/lookup";
|
import { Lookup } from "@common/model/lookup";
|
||||||
import { Guid } from "@common/types/guid";
|
import { Guid } from "@common/types/guid";
|
||||||
|
import { Reference } from "../model/reference/reference";
|
||||||
|
|
||||||
export class ReferenceSearchLookup extends Lookup {
|
export class ReferenceSearchLookup extends Lookup {
|
||||||
like: string;
|
like: string;
|
||||||
typeId: Guid;
|
typeId: Guid;
|
||||||
key: string;
|
key: string;
|
||||||
|
dependencyReferences: Reference[];
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
@ -16,6 +18,7 @@ export class ReferenceSearchDefinitionLookup extends Lookup {
|
||||||
like: string;
|
like: string;
|
||||||
typeId: Guid;
|
typeId: Guid;
|
||||||
key: string;
|
key: string;
|
||||||
|
dependencyReferences: Reference[];
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
|
@ -584,7 +584,6 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
|
||||||
},
|
},
|
||||||
error => this.onCallbackError(error)
|
error => this.onCallbackError(error)
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
calculateMultiplicityRejectedDmpDescriptionTemplates(section: DmpBlueprintDefinitionSection, descriptions: Description[]) : DmpDescriptionTemplate[]{
|
calculateMultiplicityRejectedDmpDescriptionTemplates(section: DmpBlueprintDefinitionSection, descriptions: Description[]) : DmpDescriptionTemplate[]{
|
||||||
|
|
|
@ -28,6 +28,8 @@ export class ReferenceFieldComponent extends BaseComponent implements OnInit {
|
||||||
@Input() multiple: boolean = true;
|
@Input() multiple: boolean = true;
|
||||||
@Input() hint: string;
|
@Input() hint: string;
|
||||||
@Input() placeholder: string;
|
@Input() placeholder: string;
|
||||||
|
@Input() dependencies: UntypedFormGroup = null;
|
||||||
|
|
||||||
|
|
||||||
multipleAutoCompleteSearchConfiguration: MultipleAutoCompleteConfiguration;
|
multipleAutoCompleteSearchConfiguration: MultipleAutoCompleteConfiguration;
|
||||||
singleAutoCompleteSearchConfiguration: SingleAutoCompleteConfiguration;
|
singleAutoCompleteSearchConfiguration: SingleAutoCompleteConfiguration;
|
||||||
|
@ -84,6 +86,15 @@ export class ReferenceFieldComponent extends BaseComponent implements OnInit {
|
||||||
};
|
};
|
||||||
lookup.typeId = typeId;
|
lookup.typeId = typeId;
|
||||||
lookup.order = { items: [nameof<Reference>(x => x.label)] };
|
lookup.order = { items: [nameof<Reference>(x => x.label)] };
|
||||||
|
|
||||||
|
// const sourcesWithDependencies = this.referenceType.definition.sources.filter(x => x.referenceTypeDependencies);
|
||||||
|
// if (sourcesWithDependencies.length > 0) {
|
||||||
|
// Object.keys(this.dependencies.controls).forEach(controlName => {
|
||||||
|
// (this.dependencies.get(controlName).get('references').value as Reference[]).filter(x=> sourcesWithDependencies.some(y => y.referenceTypeDependencies) x.type.id == this.referenceType.id &&)
|
||||||
|
// });
|
||||||
|
// lookup.dependencyReferences = [];
|
||||||
|
// }
|
||||||
|
|
||||||
return lookup;
|
return lookup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue