Allow Services to use tag if they have no source

This commit is contained in:
George Kalampokis 2020-09-11 14:24:57 +03:00
parent 17af551469
commit 4b87ab04e8
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ export class DatasetExternalReferencesEditorComponent extends BaseComponent impl
initialItems: (type) => this.searchDatasetExternalServices('', type),
displayFn: (item) => item ? item.label : null,
titleFn: (item) => item ? item.label : null,
subtitleFn: (item) => item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')
subtitleFn: (item) => item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : item.tag ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.tag : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')
};
tagsAutoCompleteConfiguration: MultipleAutoCompleteConfiguration = {

View File

@ -166,7 +166,7 @@ export class FormFieldComponent extends BaseComponent implements OnInit {
initialItems: () => this.searchDatasetExternalServices(''),
displayFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name,
titleFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name,
subtitleFn: (item) => item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE'),
subtitleFn: (item) => item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : item.tag ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.tag : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE'),
valueAssign: (item) => typeof (item) == 'string' ? item : JSON.stringify(item)
};
break;