140 lines
4.6 KiB
HTML
140 lines
4.6 KiB
HTML
<mg-ajax path="/item/api/Tags" options="mgIndex as tags"></mg-ajax>
|
|
<div class="search-panel">
|
|
<form ng-submit="$ctrl.onSearch()">
|
|
<vn-horizontal>
|
|
<vn-textfield
|
|
vn-one
|
|
label="General search"
|
|
model="filter.search"
|
|
vn-focus>
|
|
</vn-textfield>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-autocomplete
|
|
vn-one
|
|
vn-focus
|
|
url="/item/api/ItemCategories"
|
|
label="Category"
|
|
show-field="name"
|
|
value-field="id"
|
|
field="filter.categoryFk">
|
|
</vn-autocomplete>
|
|
<vn-autocomplete
|
|
vn-one
|
|
url="{{$ctrl.itemTypes}}"
|
|
label="Type"
|
|
show-field="name"
|
|
value-field="id"
|
|
field="filter.typeFk">
|
|
</vn-autocomplete>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-autocomplete
|
|
vn-one
|
|
disabled="false"
|
|
field="filter.salesPersonFk"
|
|
url="/client/api/Clients/activeWorkersWithRole"
|
|
show-field="nickname"
|
|
search-function="{firstName: $search}"
|
|
value-field="id"
|
|
where="{role: 'employee'}"
|
|
label="Buyer">
|
|
</vn-autocomplete>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-check
|
|
vn-one
|
|
label="Active"
|
|
field="filter.isActive"
|
|
triple-state="true">
|
|
</vn-check>
|
|
</vn-horizontal>
|
|
<vn-horizontal ng-repeat="itemTag in filter.tags">
|
|
<vn-autocomplete
|
|
vn-id="tag"
|
|
vn-one
|
|
field="itemTag.tagFk"
|
|
data="tags.model"
|
|
show-field="name"
|
|
label="Tag"
|
|
on-change="itemTag.value = null">
|
|
</vn-autocomplete>
|
|
<vn-textfield
|
|
vn-two
|
|
ng-show="tag.selection.isFree !== false"
|
|
vn-id="text"
|
|
label="Value"
|
|
model="itemTag.value">
|
|
</vn-textfield>
|
|
<vn-autocomplete
|
|
vn-two
|
|
ng-show="tag.selection.isFree === false"
|
|
url="{{$ctrl.getSourceTable(tag.selection)}}"
|
|
label="Value"
|
|
field="itemTag.value"
|
|
show-field="name"
|
|
value-field="name">
|
|
</vn-autocomplete>
|
|
<vn-icon-button
|
|
vn-none
|
|
vn-tooltip="Remove tag"
|
|
icon="delete"
|
|
ng-click="filter.tags.splice($index, 1)"
|
|
tabindex="-1">
|
|
</vn-icon-button>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-icon-button
|
|
vn-bind="+"
|
|
vn-tooltip="Add tag"
|
|
icon="add_circle"
|
|
ng-click="filter.tags.push({})">
|
|
</vn-icon-button>
|
|
</vn-horizontal>
|
|
<vn-horizontal margin-medium-v>
|
|
<span
|
|
ng-click="$ctrl.initializeMoreFields()"
|
|
vn-one translate
|
|
class="unselectable"
|
|
tabindex="-1"
|
|
ng-class="{link: !filter.moreFields || !filter.moreFields.length}">
|
|
More fields
|
|
</span>
|
|
</vn-horizontal>
|
|
<vn-horizontal ng-repeat="field in filter.moreFields">
|
|
<vn-autocomplete
|
|
vn-one
|
|
field="field.field"
|
|
data="$ctrl.moreFields"
|
|
value-field="field"
|
|
show-field="field"
|
|
label="Field"
|
|
on-change="field.value = null">
|
|
</vn-autocomplete>
|
|
<vn-textfield
|
|
vn-two
|
|
label="Value"
|
|
model="field.value">
|
|
</vn-textfield>
|
|
<vn-icon-button
|
|
vn-none
|
|
vn-tooltip="Remove field"
|
|
icon="delete"
|
|
ng-click="filter.moreFields.splice($index, 1)"
|
|
tabindex="-1">
|
|
</vn-icon-button>
|
|
</vn-horizontal>
|
|
<vn-horizontal ng-show="filter.moreFields && filter.moreFields.length">
|
|
<vn-icon-button
|
|
vn-bind="+"
|
|
vn-tooltip="Add field"
|
|
icon="add_circle"
|
|
ng-click="filter.moreFields.push({})">
|
|
</vn-icon-button>
|
|
</vn-horizontal>
|
|
<vn-horizontal margin-large-top>
|
|
<vn-submit label="Search"></vn-submit>
|
|
</vn-horizontal>
|
|
</form>
|
|
</div>
|