salix/modules/order/front/catalog/index.html

167 lines
5.3 KiB
HTML
Raw Normal View History

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"
url="Orders/CatalogFilter"
2020-03-20 08:01:14 +00:00
params="{orderFk: $ctrl.$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 vn-id="searchbar"
2020-03-25 12:44:51 +00:00
auto-state="false"
info="Search by item id or name"
on-search="$ctrl.onSearch($params)">
</vn-searchbar>
2020-03-25 08:20:26 +00:00
</vn-portal>
2020-05-06 12:38:09 +00:00
<vn-order-catalog-view
2023-06-08 08:25:25 +00:00
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">
2023-06-08 08:25:25 +00:00
<vn-icon
2020-01-30 12:53:14 +00:00
ng-class="{'active': $ctrl.categoryId == category.id}"
icon="{{::category.icon}}"
vn-tooltip="{{::category.name}}"
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']"
2020-09-02 08:06:25 +00:00
order="priority DESC"
2020-01-30 12:53:14 +00:00
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">
2023-06-08 08:25:25 +00:00
<vn-textfield vn-one
2020-01-30 12:53:14 +00:00
vn-id="search"
ng-keyUp="$ctrl.onSearchByTag($event)"
2020-02-11 13:41:59 +00:00
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-09-16 07:54:04 +00:00
</vn-textfield>
2020-01-30 12:53:14 +00:00
</vn-vertical>
<vn-popover
vn-id="popover"
on-close="$ctrl.onPopoverClose()">
<vn-order-catalog-search-panel
2020-09-08 08:11:22 +00:00
on-submit="$ctrl.onPanelSubmit($filter)"
2023-06-08 08:25:25 +00:00
parent-popover="popover"
2020-09-16 07:54:04 +00:00
result-tags="$ctrl.resultTags">
2020-01-30 12:53:14 +00:00
</vn-order-catalog-search-panel>
</vn-popover>
<div class="chips">
2023-06-08 08:25:25 +00:00
<vn-chip
2020-02-19 10:57:39 +00:00
ng-if="$ctrl.itemId"
removable="true"
2020-09-14 05:42:43 +00:00
vn-tooltip="Item id"
2020-03-25 12:44:51 +00:00
on-remove="$ctrl.removeItemId()"
2023-06-08 08:25:25 +00:00
class="colored">
2020-02-19 10:57:39 +00:00
<span>Id: {{$ctrl.itemId}}</span>
</vn-chip>
2023-06-08 08:25:25 +00:00
<vn-chip
2020-03-25 12:44:51 +00:00
ng-if="$ctrl.itemName"
removable="true"
2020-09-14 05:42:43 +00:00
vn-tooltip="Item"
2020-03-25 12:44:51 +00:00
on-remove="$ctrl.removeItemName()"
2020-09-14 05:42:43 +00:00
class="colored">
<div>
<span>
<span translate>Name</span>:
</span>
<span>{{$ctrl.itemName}}</span>
</div>
2020-03-25 12:44:51 +00:00
</vn-chip>
2023-06-08 08:25:25 +00:00
<vn-chip
2020-01-30 12:53:14 +00:00
ng-if="category.selection"
removable="true"
2020-09-14 05:42:43 +00:00
vn-tooltip="Category"
2020-01-30 12:53:14 +00:00
on-remove="$ctrl.categoryId = null"
2023-06-08 08:25:25 +00:00
class="colored">
2020-01-30 12:53:14 +00:00
<span translate>{{category.selection.name}}</span>
</vn-chip>
2023-06-08 08:25:25 +00:00
<vn-chip
2020-01-30 12:53:14 +00:00
ng-if="type.selection"
removable="true"
2020-09-14 05:42:43 +00:00
vn-tooltip="Type"
2020-01-30 12:53:14 +00:00
on-remove="$ctrl.typeId = null"
2023-06-08 08:25:25 +00:00
class="colored">
2020-01-30 12:53:14 +00:00
<span translate>{{type.selection.name}}</span>
</vn-chip>
<vn-chip
2020-09-14 05:42:43 +00:00
ng-repeat="tagGroup in $ctrl.tagGroups"
2020-01-30 12:53:14 +00:00
removable="true"
on-remove="$ctrl.remove($index)"
2020-09-14 05:42:43 +00:00
vn-tooltip="{{::$ctrl.formatTooltip(tagGroup)}}"
2023-06-08 08:25:25 +00:00
class="colored">
2020-02-19 10:57:39 +00:00
<div>
2020-09-14 05:42:43 +00:00
<span ng-if="::tagGroup.tagFk">
<span translate>{{::tagGroup.tagSelection.name}}</span>:
2020-02-19 10:57:39 +00:00
</span>
2020-09-14 05:42:43 +00:00
<span ng-repeat="tagValue in tagGroup.values">
<span ng-if="$index > 0">,</span>
<span>"{{::tagValue.value}}"</span>
2020-02-19 10:57:39 +00:00
</span>
</div>
2020-01-30 12:53:14 +00:00
</vn-chip>
</div>
2023-06-08 08:25:25 +00:00
</vn-side-menu>