Allow Services to use tag if they have no source
This commit is contained in:
parent
17af551469
commit
4b87ab04e8
|
@ -76,7 +76,7 @@ export class DatasetExternalReferencesEditorComponent extends BaseComponent impl
|
||||||
initialItems: (type) => this.searchDatasetExternalServices('', type),
|
initialItems: (type) => this.searchDatasetExternalServices('', type),
|
||||||
displayFn: (item) => item ? item.label : null,
|
displayFn: (item) => item ? item.label : null,
|
||||||
titleFn: (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 = {
|
tagsAutoCompleteConfiguration: MultipleAutoCompleteConfiguration = {
|
||||||
|
|
|
@ -166,7 +166,7 @@ export class FormFieldComponent extends BaseComponent implements OnInit {
|
||||||
initialItems: () => this.searchDatasetExternalServices(''),
|
initialItems: () => this.searchDatasetExternalServices(''),
|
||||||
displayFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name,
|
displayFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name,
|
||||||
titleFn: (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)
|
valueAssign: (item) => typeof (item) == 'string' ? item : JSON.stringify(item)
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue