Catalog tag selection
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Joan Sanchez 2020-11-04 13:19:43 +01:00
parent a325ef2a78
commit 16b774d585
2 changed files with 4 additions and 15 deletions

View File

@ -23,11 +23,12 @@
<vn-autocomplete
vn-one
ng-show="tag.selection.isFree == false"
url="{{$ctrl.getSourceTable(tag.selection)}}"
url="{{'Tags/' + tag.selection.id + '/filterValue'}}"
search-function="{value: $search}"
label="Value"
ng-model="tagValue.value"
show-field="name"
value-field="name">
show-field="value"
value-field="value">
</vn-autocomplete>
<vn-icon-button
vn-none

View File

@ -21,18 +21,6 @@ class Controller extends SearchPanel {
this.$.filter = value;
}
getSourceTable(selection) {
if (!selection || selection.isFree == true)
return null;
if (selection.sourceTable) {
return ''
+ selection.sourceTable.charAt(0).toUpperCase()
+ selection.sourceTable.substring(1) + 's';
} else if (selection.sourceTable == null)
return `ItemTags/filterItemTags/${selection.id}`;
}
addValue() {
this.filter.values.push({});
setTimeout(() => this.popover.relocate());