2019-10-24 22:53:53 +00:00
|
|
|
<mg-ajax path="Tags" options="mgIndex as tags"></mg-ajax>
|
2019-01-30 23:33:43 +00:00
|
|
|
<div class="search-panel">
|
|
|
|
<form ng-submit="$ctrl.onSearch()">
|
2018-06-07 21:47:19 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
2018-11-05 09:14:31 +00:00
|
|
|
label="General search"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="filter.search"
|
2019-04-12 12:33:08 +00:00
|
|
|
info="Search items by id, name or barcode"
|
2018-06-07 21:47:19 +00:00
|
|
|
vn-focus>
|
|
|
|
</vn-textfield>
|
2018-11-05 09:14:31 +00:00
|
|
|
</vn-horizontal>
|
2018-06-07 21:47:19 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
vn-focus
|
2019-10-24 22:53:53 +00:00
|
|
|
url="ItemCategories"
|
2019-02-14 10:24:04 +00:00
|
|
|
label="Category"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="filter.categoryFk">
|
2019-02-14 10:24:04 +00:00
|
|
|
</vn-autocomplete>
|
2019-12-26 10:27:44 +00:00
|
|
|
<vn-autocomplete vn-one
|
2019-10-28 16:31:33 +00:00
|
|
|
url="ItemTypes"
|
2018-06-07 21:47:19 +00:00
|
|
|
label="Type"
|
2019-10-28 16:31:33 +00:00
|
|
|
where="{categoryFk: filter.categoryFk}"
|
2018-06-07 21:47:19 +00:00
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
2019-12-26 10:27:44 +00:00
|
|
|
ng-model="filter.typeFk"
|
|
|
|
fields="['categoryFk']"
|
|
|
|
include="'category'">
|
|
|
|
<tpl-item>
|
|
|
|
<div>{{name}}</div>
|
|
|
|
<div class="text-caption text-secondary">
|
|
|
|
{{category.name}}
|
|
|
|
</div>
|
|
|
|
</tpl-item>>
|
2018-06-07 21:47:19 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
2019-02-19 09:15:39 +00:00
|
|
|
<vn-horizontal>
|
2023-07-27 10:51:14 +00:00
|
|
|
<vn-autocomplete
|
2019-03-05 11:13:46 +00:00
|
|
|
vn-one
|
2021-11-08 16:46:40 +00:00
|
|
|
ng-model="filter.buyerFk"
|
2023-07-27 10:51:14 +00:00
|
|
|
url="TicketRequests/getItemTypeWorker"
|
|
|
|
search-function="{firstName: $search}"
|
2019-03-05 11:13:46 +00:00
|
|
|
show-field="nickname"
|
2023-07-27 10:51:14 +00:00
|
|
|
value-field="id"
|
2019-03-05 11:13:46 +00:00
|
|
|
label="Buyer">
|
|
|
|
</vn-autocomplete>
|
2021-11-22 07:27:14 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
label="Supplier"
|
|
|
|
ng-model="filter.supplierFk"
|
|
|
|
url="Suppliers"
|
|
|
|
fields="['name','nickname']"
|
|
|
|
search-function="{or: [{nickname: {like: '%'+ $search +'%'}}, {name: {like: '%'+ $search +'%'}}]}"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id">
|
|
|
|
<tpl-item>{{name}}: {{nickname}}</tpl-item>
|
|
|
|
</vn-autocomplete>
|
2019-02-19 09:15:39 +00:00
|
|
|
</vn-horizontal>
|
2019-10-28 16:31:33 +00:00
|
|
|
<vn-horizontal class="vn-pt-sm">
|
|
|
|
<vn-one class="text-subtitle1" translate>
|
|
|
|
Tags
|
|
|
|
</vn-one>
|
|
|
|
<vn-icon-button
|
|
|
|
vn-none
|
|
|
|
vn-bind="+"
|
|
|
|
vn-tooltip="Add tag"
|
|
|
|
icon="add_circle"
|
|
|
|
ng-click="filter.tags.push({})">
|
|
|
|
</vn-icon-button>
|
2019-02-28 12:50:39 +00:00
|
|
|
</vn-horizontal>
|
2018-06-07 21:47:19 +00:00
|
|
|
<vn-horizontal ng-repeat="itemTag in filter.tags">
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-id="tag"
|
|
|
|
vn-one
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="itemTag.tagFk"
|
2018-06-07 21:47:19 +00:00
|
|
|
data="tags.model"
|
|
|
|
show-field="name"
|
|
|
|
label="Tag"
|
|
|
|
on-change="itemTag.value = null">
|
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-textfield
|
2019-10-28 16:31:33 +00:00
|
|
|
vn-one
|
2021-11-22 13:40:03 +00:00
|
|
|
ng-show="tag.selection.isFree || tag.selection.isFree == undefined"
|
2018-06-07 21:47:19 +00:00
|
|
|
vn-id="text"
|
|
|
|
label="Value"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="itemTag.value">
|
2018-06-07 21:47:19 +00:00
|
|
|
</vn-textfield>
|
2023-07-27 10:51:14 +00:00
|
|
|
<vn-autocomplete
|
2019-10-28 16:31:33 +00:00
|
|
|
vn-one
|
2018-06-07 21:47:19 +00:00
|
|
|
ng-show="tag.selection.isFree === false"
|
2021-11-22 13:40:03 +00:00
|
|
|
url="{{'Tags/' + itemTag.tagFk + '/filterValue'}}"
|
|
|
|
search-function="{value: $search}"
|
2018-06-07 21:47:19 +00:00
|
|
|
label="Value"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="itemTag.value"
|
2021-11-22 13:40:03 +00:00
|
|
|
show-field="value"
|
|
|
|
value-field="value"
|
|
|
|
rule>
|
2018-06-07 21:47:19 +00:00
|
|
|
</vn-autocomplete>
|
2019-02-08 16:49:51 +00:00
|
|
|
<vn-icon-button
|
|
|
|
vn-none
|
2018-10-17 10:49:18 +00:00
|
|
|
vn-tooltip="Remove tag"
|
2018-12-11 07:50:54 +00:00
|
|
|
icon="delete"
|
2018-10-17 10:49:18 +00:00
|
|
|
ng-click="filter.tags.splice($index, 1)"
|
|
|
|
tabindex="-1">
|
|
|
|
</vn-icon-button>
|
2018-06-07 21:47:19 +00:00
|
|
|
</vn-horizontal>
|
2019-10-28 16:31:33 +00:00
|
|
|
<vn-horizontal class="vn-pt-sm">
|
|
|
|
<vn-one class="text-subtitle1" translate>
|
|
|
|
More fields
|
|
|
|
</vn-one>
|
2018-06-07 21:47:19 +00:00
|
|
|
<vn-icon-button
|
2019-10-28 16:31:33 +00:00
|
|
|
vn-none
|
2018-06-07 21:47:19 +00:00
|
|
|
vn-bind="+"
|
2019-10-28 16:31:33 +00:00
|
|
|
vn-tooltip="Add field"
|
2018-06-07 21:47:19 +00:00
|
|
|
icon="add_circle"
|
2019-10-28 16:31:33 +00:00
|
|
|
ng-click="$ctrl.fieldFilters.push({})">
|
2018-06-07 21:47:19 +00:00
|
|
|
</vn-icon-button>
|
|
|
|
</vn-horizontal>
|
2019-10-28 16:31:33 +00:00
|
|
|
<vn-horizontal ng-repeat="fieldFilter in $ctrl.fieldFilters">
|
2019-03-08 12:12:13 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
label="Field"
|
2019-10-28 16:31:33 +00:00
|
|
|
ng-model="fieldFilter.name"
|
|
|
|
data="$ctrl.moreFields"
|
|
|
|
value-field="name"
|
|
|
|
show-field="label"
|
|
|
|
show-filter="false"
|
|
|
|
translate-fields="['label']"
|
|
|
|
selection="info"
|
|
|
|
on-change="fieldFilter.value = null">
|
2019-03-08 12:12:13 +00:00
|
|
|
</vn-autocomplete>
|
2019-10-28 16:31:33 +00:00
|
|
|
<vn-one ng-switch="info.type">
|
|
|
|
<div ng-switch-when="Number">
|
|
|
|
<vn-input-number
|
|
|
|
label="Value"
|
|
|
|
ng-model="fieldFilter.value">
|
|
|
|
</vn-input-number>
|
|
|
|
</div>
|
|
|
|
<div ng-switch-when="Boolean">
|
|
|
|
<vn-check
|
|
|
|
label="Value"
|
|
|
|
ng-model="fieldFilter.value">
|
|
|
|
</vn-check>
|
|
|
|
</div>
|
|
|
|
<div ng-switch-when="Date">
|
|
|
|
<vn-date-picker
|
|
|
|
label="Value"
|
|
|
|
ng-model="fieldFilter.value">
|
|
|
|
</vn-date-picker>
|
|
|
|
</div>
|
|
|
|
<div ng-switch-default>
|
|
|
|
<vn-textfield
|
|
|
|
label="Value"
|
|
|
|
ng-model="fieldFilter.value">
|
|
|
|
</vn-textfield>
|
|
|
|
</div>
|
|
|
|
</vn-one>
|
2019-03-08 12:12:13 +00:00
|
|
|
<vn-icon-button
|
|
|
|
vn-none
|
|
|
|
vn-tooltip="Remove field"
|
|
|
|
icon="delete"
|
2019-10-28 16:31:33 +00:00
|
|
|
ng-click="$ctrl.removeField($index, fieldFilter.name)"
|
2019-03-08 12:12:13 +00:00
|
|
|
tabindex="-1">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-horizontal>
|
2021-11-15 12:53:18 +00:00
|
|
|
<vn-horizontal>
|
2023-07-27 10:51:14 +00:00
|
|
|
<vn-check
|
2021-11-15 12:53:18 +00:00
|
|
|
vn-one
|
|
|
|
label="Floramondo"
|
|
|
|
ng-model="filter.isFloramondo"
|
|
|
|
triple-state="true">
|
|
|
|
</vn-check>
|
|
|
|
</vn-horizontal>
|
2019-10-04 22:16:57 +00:00
|
|
|
<vn-horizontal class="vn-mt-lg">
|
2018-06-07 21:47:19 +00:00
|
|
|
<vn-submit label="Search"></vn-submit>
|
|
|
|
</vn-horizontal>
|
|
|
|
</form>
|
|
|
|
</div>
|