use namevariants based on config

This commit is contained in:
Art Lowel
2020-04-15 10:34:35 +02:00
parent 44801701c9
commit 06cc028c80
12 changed files with 50 additions and 19 deletions

View File

@@ -126,8 +126,10 @@ export class DsDynamicLookupRelationModalComponent implements OnInit, OnDestroy
this.selection$.pipe(take(1)).subscribe((selection) =>
selection.map((s: SearchResult<Item>) => this.addNameVariantSubscription(s))
);
if (this.relationshipOptions.nameVariants) {
this.context = Context.SubmissionModal;
if (this.relationshipOptions.nameVariants === 'true') {
this.context = Context.EntitySearchModalWithNameVariants;
} else {
this.context = Context.EntitySearchModal;
}
this.externalSourcesRD$ = this.externalSourceService.findAll();

View File

@@ -105,7 +105,7 @@ export class ExternalSourceEntryImportModalComponent implements OnInit {
/**
* The context we're currently in (submission)
*/
context = Context.SubmissionModal;
context = Context.EntitySearchModalWithNameVariants;
/**
* List ID for selecting local entities