129 lines
5.4 KiB
HTML
129 lines
5.4 KiB
HTML
<vn-crud-model
|
|
vn-id="model"
|
|
url="/item/api/Items/filter"
|
|
limit="12"
|
|
order="isActive DESC, name, id"
|
|
data="items"
|
|
auto-load="false">
|
|
</vn-crud-model>
|
|
<div class="content-block">
|
|
<div class="vn-list">
|
|
<vn-card pad-medium-h>
|
|
<vn-searchbar
|
|
panel="vn-item-search-panel"
|
|
on-search="$ctrl.onSearch($params)"
|
|
vn-focus>
|
|
</vn-searchbar>
|
|
</vn-card>
|
|
</div>
|
|
<vn-card margin-medium-v>
|
|
<vn-table model="model" auto-load="false" show-fields="$ctrl.showFields" vn-uvc="itemIndex">
|
|
<vn-thead>
|
|
<vn-tr>
|
|
<vn-th th-id="picture"></vn-th>
|
|
<vn-th field="id" number>Id</vn-th>
|
|
<vn-th th-id="grouping" number>Grouping</vn-th>
|
|
<vn-th th-id="packing" number>Packing</vn-th>
|
|
<vn-th th-id="description" style="text-align: center">Description</vn-th>
|
|
<vn-th th-id="stems" number>Stems</vn-th>
|
|
<vn-th th-id="size"number>Size</vn-th>
|
|
<vn-th th-id="niche"number>Niche</vn-th>
|
|
<vn-th th-id="type">Type</vn-th>
|
|
<vn-th th-id="category">Category</vn-th>
|
|
<vn-th th-id="intrastat">Intrastat</vn-th>
|
|
<vn-th th-id="origin">Origin</vn-th>
|
|
<vn-th th-id="salesperson">Buyer</vn-th>
|
|
<vn-th th-id="density" number>Density</vn-th>
|
|
<vn-th th-id="active" shrink>Active</vn-th>
|
|
<vn-th></vn-th>
|
|
</vn-tr>
|
|
</vn-thead>
|
|
<vn-tbody>
|
|
<a ng-repeat="item in items"
|
|
class="clickable vn-tr searchResult"
|
|
ui-sref="item.card.summary({id: item.id})">
|
|
<vn-td shrink>
|
|
<img
|
|
ng-src="{{::$ctrl.imagesPath}}/50x50/{{::item.image}}"
|
|
zoom-image="{{::$ctrl.imagesPath}}/1600x900/{{::item.image}}"
|
|
ng-click="$ctrl.stopEvent($event)"
|
|
on-error-src/>
|
|
</vn-td>
|
|
<vn-td number>
|
|
<span
|
|
class="link"
|
|
ng-click="$ctrl.showItemDescriptor($event, item.id)">
|
|
{{::item.id | zeroFill:6}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td number>{{::item.grouping | dashIfEmpty}}</vn-td>
|
|
<vn-td number>{{::item.packing | dashIfEmpty}}</vn-td>
|
|
<vn-td expand>
|
|
<vn-fetched-tags
|
|
max-length="6"
|
|
item="::item"
|
|
title="::item.name"
|
|
sub-name="::item.subName">
|
|
</vn-fetched-tags>
|
|
</vn-td>
|
|
<vn-td number>{{::item.stems}}</vn-td>
|
|
<vn-td number>{{::item.size}}</vn-td>
|
|
<vn-td number>{{::item.niche}}</vn-td>
|
|
<vn-td>{{::item.type}}</vn-td>
|
|
<vn-td>{{::item.category}}</vn-td>
|
|
<vn-td>{{::item.intrastat}}</vn-td>
|
|
<vn-td>{{::item.origin}}</vn-td>
|
|
<vn-td expand>
|
|
<span
|
|
class="link"
|
|
ng-click="$ctrl.showWorkerDescriptor($event, item.userId)">
|
|
{{::item.userNickname}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td number>{{::item.density}}</vn-td>
|
|
<vn-td shrink>
|
|
<vn-check
|
|
disabled="true"
|
|
field="::item.isActive">
|
|
</vn-check>
|
|
</vn-td>
|
|
<vn-td shrink>
|
|
<vn-horizontal class="buttons">
|
|
<vn-icon-button
|
|
ng-click="$ctrl.cloneItem($event, item)"
|
|
vn-tooltip="Clone"
|
|
icon="icon-clone">
|
|
</vn-icon-button>
|
|
<vn-icon-button
|
|
ng-click="$ctrl.preview($event, item)"
|
|
vn-tooltip="Preview"
|
|
icon="desktop_windows">
|
|
</vn-icon-button>
|
|
</vn-horizontal>
|
|
</vn-td>
|
|
</a>
|
|
</vn-tbody>
|
|
</vn-table>
|
|
</vn-card>
|
|
<vn-pagination model="model"></vn-pagination>
|
|
</div>
|
|
<a ui-sref="item.create" vn-tooltip="New item" vn-bind="+" fixed-bottom-right>
|
|
<vn-float-button icon="add"></vn-float-button>
|
|
</a>
|
|
<vn-dialog vn-id="preview" class="dialog-summary">
|
|
<tpl-body>
|
|
<vn-item-summary item="$ctrl.itemSelected"></vn-item-summary>
|
|
</tpl-body>
|
|
</vn-dialog>
|
|
<vn-confirm
|
|
vn-id="clone"
|
|
on-response="$ctrl.onCloneAccept(response)"
|
|
question="Do you want to clone this item?"
|
|
message="All it's properties will be copied">
|
|
</vn-confirm>
|
|
<vn-item-descriptor-popover vn-id="itemDescriptor">
|
|
</vn-item-descriptor-popover>
|
|
<vn-worker-descriptor-popover
|
|
vn-id="workerDescriptor"
|
|
user-id="$ctrl.selectedWorker">
|
|
</vn-worker-descriptor-popover> |