2020-01-30 12:53:14 +00:00
|
|
|
|
|
|
|
<vn-crud-model
|
|
|
|
url="ItemCategories"
|
|
|
|
data="categories"
|
|
|
|
auto-load="true">
|
|
|
|
</vn-crud-model>
|
2019-02-01 16:11:14 +00:00
|
|
|
<vn-crud-model
|
2018-08-21 11:38:16 +00:00
|
|
|
vn-id="model"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="Orders/CatalogFilter"
|
2019-10-28 16:31:33 +00:00
|
|
|
params="{orderFk: $ctrl.$state.params.id}"
|
2018-09-14 07:10:30 +00:00
|
|
|
limit="50"
|
2020-01-30 12:53:14 +00:00
|
|
|
data="$ctrl.items">
|
2018-08-21 11:38:16 +00:00
|
|
|
</vn-crud-model>
|
2020-03-25 08:20:26 +00:00
|
|
|
<vn-portal slot="topbar">
|
|
|
|
<vn-searchbar info="Search by item id or name"></vn-searchbar>
|
|
|
|
</vn-portal>
|
|
|
|
<vn-auto-search
|
|
|
|
on-search="$ctrl.onSearch($params)">
|
|
|
|
</vn-auto-search>
|
2020-01-30 12:53:14 +00:00
|
|
|
|
|
|
|
<vn-order-catalog-view model="model"
|
2018-09-17 12:30:39 +00:00
|
|
|
order="$ctrl.order">
|
2020-01-30 12:53:14 +00:00
|
|
|
</vn-order-catalog-view>
|
|
|
|
<vn-side-menu side="right">
|
|
|
|
<vn-horizontal class="item-category">
|
|
|
|
<vn-autocomplete vn-id="category"
|
|
|
|
data="categories"
|
|
|
|
ng-model="$ctrl.categoryId"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
label="Category">
|
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-one ng-repeat="category in categories">
|
|
|
|
<vn-icon
|
|
|
|
ng-class="{'active': $ctrl.categoryId == category.id}"
|
|
|
|
icon="{{::category.icon}}"
|
|
|
|
vn-tooltip="{{::category.name}}"
|
2020-02-06 11:46:44 +00:00
|
|
|
ng-click="$ctrl.changeCategory(category.id)">
|
2020-01-30 12:53:14 +00:00
|
|
|
</vn-icon>
|
|
|
|
</vn-one>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-vertical class="input">
|
|
|
|
<vn-autocomplete vn-id="type"
|
|
|
|
data="$ctrl.itemTypes"
|
|
|
|
ng-model="$ctrl.typeId"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
label="Type"
|
|
|
|
fields="['categoryFk']"
|
|
|
|
include="'category'">
|
|
|
|
<tpl-item>
|
|
|
|
<div>{{name}}</div>
|
|
|
|
<div class="text-caption text-secondary">
|
|
|
|
{{categoryName}}
|
|
|
|
</div>
|
|
|
|
</tpl-item>
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-vertical>
|
|
|
|
<vn-vertical class="input vn-pt-md">
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-id="field"
|
|
|
|
data="$ctrl.orderFields"
|
|
|
|
ng-model="$ctrl.orderField"
|
|
|
|
selection="$ctrl.orderSelection"
|
|
|
|
translate-fields="['name']"
|
|
|
|
order="name"
|
|
|
|
show-field="name"
|
|
|
|
value-field="field"
|
|
|
|
label="Order by"
|
|
|
|
disabled="!model.data">
|
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-autocomplete
|
|
|
|
data="$ctrl.orderWays"
|
|
|
|
ng-model="$ctrl.orderWay"
|
|
|
|
translate-fields="['name']"
|
|
|
|
show-field="name"
|
|
|
|
value-field="way"
|
|
|
|
label="Order"
|
|
|
|
disabled="!model.data">
|
|
|
|
</vn-autocomplete>
|
|
|
|
<div ng-if="false && model.moreRows">
|
|
|
|
<span translate>More than</span> {{model.limit}} <span translate>results</span>
|
|
|
|
</div>
|
|
|
|
</vn-vertical>
|
|
|
|
<vn-vertical class="input vn-pt-md">
|
2020-03-25 08:20:26 +00:00
|
|
|
<!-- <vn-textfield vn-id="itemId"
|
2020-01-30 12:53:14 +00:00
|
|
|
ng-keyUp="$ctrl.onSearchById($event)"
|
2020-02-19 10:57:39 +00:00
|
|
|
label="Item id">
|
2020-01-30 12:53:14 +00:00
|
|
|
<prepend>
|
|
|
|
<vn-icon icon="icon-item"></vn-icon>
|
|
|
|
</prepend>
|
2020-03-25 08:20:26 +00:00
|
|
|
</vn-textfield> -->
|
2020-02-11 13:41:59 +00:00
|
|
|
|
|
|
|
<vn-datalist vn-one
|
2020-01-30 12:53:14 +00:00
|
|
|
vn-id="search"
|
2020-02-11 13:41:59 +00:00
|
|
|
data="$ctrl.tagValues"
|
2020-01-30 12:53:14 +00:00
|
|
|
ng-keyUp="$ctrl.onSearchByTag($event)"
|
2020-02-11 13:41:59 +00:00
|
|
|
show-field="value"
|
|
|
|
value-field="value"
|
|
|
|
label="Search tag">
|
2020-01-30 12:53:14 +00:00
|
|
|
<prepend>
|
|
|
|
<vn-icon icon="search"></vn-icon>
|
|
|
|
</prepend>
|
|
|
|
<append>
|
|
|
|
<vn-icon
|
|
|
|
icon="keyboard_arrow_down"
|
|
|
|
ng-click="$ctrl.openPanel($event)"
|
|
|
|
style="cursor: pointer;">
|
|
|
|
</vn-icon>
|
|
|
|
</append>
|
2020-02-11 13:41:59 +00:00
|
|
|
</vn-datalist>
|
2020-01-30 12:53:14 +00:00
|
|
|
</vn-vertical>
|
|
|
|
<vn-popover
|
|
|
|
vn-id="popover"
|
|
|
|
on-close="$ctrl.onPopoverClose()">
|
|
|
|
<vn-order-catalog-search-panel
|
|
|
|
filter="panelFilter"
|
|
|
|
on-submit="$ctrl.onPanelSubmit($filter)">
|
|
|
|
</vn-order-catalog-search-panel>
|
|
|
|
</vn-popover>
|
|
|
|
<div class="chips">
|
2020-02-19 10:57:39 +00:00
|
|
|
<vn-chip
|
|
|
|
ng-if="$ctrl.itemId"
|
|
|
|
removable="true"
|
|
|
|
translate-attr="{title: 'Item'}"
|
|
|
|
on-remove="$ctrl.itemId = null"
|
|
|
|
class="colored">
|
|
|
|
<span>Id: {{$ctrl.itemId}}</span>
|
|
|
|
</vn-chip>
|
2020-01-30 12:53:14 +00:00
|
|
|
<vn-chip
|
|
|
|
ng-if="category.selection"
|
|
|
|
removable="true"
|
|
|
|
translate-attr="{title: 'Category'}"
|
|
|
|
on-remove="$ctrl.categoryId = null"
|
|
|
|
class="colored">
|
|
|
|
<span translate>{{category.selection.name}}</span>
|
|
|
|
</vn-chip>
|
|
|
|
<vn-chip
|
|
|
|
ng-if="type.selection"
|
|
|
|
removable="true"
|
|
|
|
translate-attr="{title: 'Type'}"
|
|
|
|
on-remove="$ctrl.typeId = null"
|
|
|
|
class="colored">
|
|
|
|
<span translate>{{type.selection.name}}</span>
|
|
|
|
</vn-chip>
|
|
|
|
<vn-chip
|
|
|
|
ng-repeat="tag in $ctrl.tags"
|
|
|
|
removable="true"
|
|
|
|
translate-attr="{title: 'Tag'}"
|
|
|
|
on-remove="$ctrl.remove($index)"
|
|
|
|
class="colored">
|
2020-02-19 10:57:39 +00:00
|
|
|
<div>
|
|
|
|
<span ng-if="::tag.tagFk">
|
|
|
|
<span translate>
|
|
|
|
{{::tag.tagSelection.name}}
|
|
|
|
</span>
|
|
|
|
<span ng-if="::tag.value">: </span>
|
|
|
|
</span>
|
|
|
|
<span translate ng-if="::tag.value">
|
|
|
|
"{{::tag.value}}"
|
|
|
|
</span>
|
|
|
|
</div>
|
2020-01-30 12:53:14 +00:00
|
|
|
</vn-chip>
|
|
|
|
</div>
|
|
|
|
</vn-side-menu>
|