193 lines
8.0 KiB
HTML
193 lines
8.0 KiB
HTML
<vn-auto-search
|
|
model="model">
|
|
</vn-auto-search>
|
|
<vn-card>
|
|
<smart-table
|
|
model="model"
|
|
view-config-id="itemsIndex"
|
|
options="$ctrl.smartTableOptions"
|
|
expr-builder="$ctrl.exprBuilder(param, value)">
|
|
<slot-table>
|
|
<table class="vn-table">
|
|
<thead>
|
|
<tr>
|
|
<th shrink></th>
|
|
<th field="id" shrink>
|
|
<span translate>Id</span>
|
|
</th>
|
|
<th field="grouping" shrink>
|
|
<span translate>Grouping</span>
|
|
</th>
|
|
<th field="packing" shrink>
|
|
<span translate>Packing</span>
|
|
</th>
|
|
<th field="name">
|
|
<span translate>Description</span>
|
|
</th>
|
|
<th field="stems" shrink>
|
|
<span translate>Stems</span>
|
|
</th>
|
|
<th field="size" shrink>
|
|
<span translate>Size</span>
|
|
</th>
|
|
<th field="typeFk" shrink>
|
|
<span translate>Type</span>
|
|
</th>
|
|
<th field="category" shrink>
|
|
<span translate>Category</span>
|
|
</th>
|
|
<th field="intrastat" shrink>
|
|
<span translate>Intrastat</span>
|
|
</th>
|
|
<th field="origin" shrink>
|
|
<span translate>Origin</span>
|
|
</th>
|
|
<th field="buyerFk" shrink>
|
|
<span translate>Buyer</span>
|
|
</th>
|
|
<th field="density" shrink>
|
|
<span translate>Density</span>
|
|
</th>
|
|
<th field="stemMultiplier" shrink>
|
|
<span translate>Multiplier</span>
|
|
</th>
|
|
<th field="active" shrink>
|
|
<span translate>Active</span>
|
|
</th>
|
|
<th field="landed" shrink-date>
|
|
<span translate>Landed</span>
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr ng-repeat="item in model.data"
|
|
vn-anchor="::{
|
|
state: 'item.card.summary',
|
|
params: {id: item.id}
|
|
}">
|
|
<td shrink>
|
|
<img
|
|
ng-src="{{::$root.imagePath('catalog', '50x50', item.id)}}"
|
|
zoom-image="{{::$root.imagePath('catalog', '1600x900', item.id)}}"
|
|
vn-click-stop
|
|
on-error-src/>
|
|
</td>
|
|
<td shrink>
|
|
<span
|
|
vn-click-stop="itemDescriptor.show($event, item.id)"
|
|
class="link">
|
|
{{::item.id}}
|
|
</span>
|
|
</td>
|
|
<td shrink>{{::item.grouping | dashIfEmpty}}</td>
|
|
<td shrink>{{::item.packing | dashIfEmpty}}</td>
|
|
<td vn-fetched-tags>
|
|
<div>
|
|
<vn-one title="{{::item.name}}">{{::item.name}}</vn-one>
|
|
<vn-one ng-if="::item.subName">
|
|
<h3 title="{{::item.subName}}">{{::item.subName}}</h3>
|
|
</vn-one>
|
|
</div>
|
|
<vn-fetched-tags
|
|
max-length="6"
|
|
item="item"
|
|
tabindex="-1">
|
|
</vn-fetched-tags>
|
|
</td>
|
|
<td shrink>{{::item.stems}}</td>
|
|
<td shrink>{{::item.size}}</td>
|
|
<td shrink title="{{::item.typeName}}">
|
|
{{::item.typeName}}
|
|
</td>
|
|
<td shrink title="{{::item.category}}">
|
|
{{::item.category}}
|
|
</td>
|
|
<td shrink title="{{::item.intrastat}}">
|
|
{{::item.intrastat}}
|
|
</td>
|
|
<td shrink>{{::item.origin}}</td>
|
|
<td shrink title="{{::item.userName}}">
|
|
<span
|
|
class="link"
|
|
vn-click-stop="workerDescriptor.show($event, item.buyerFk)">
|
|
{{::item.userName}}
|
|
</span>
|
|
</td>
|
|
<td shrink>{{::item.density}}</td>
|
|
<td shrink >{{::item.stemMultiplier}}</td>
|
|
<td shrink>
|
|
<vn-check
|
|
disabled="true"
|
|
ng-model="::item.isActive">
|
|
</vn-check>
|
|
</td>
|
|
<td shrink-date>{{::item.landed | date:'dd/MM/yyyy'}}</td>
|
|
<td shrink>
|
|
<vn-horizontal class="buttons">
|
|
<vn-icon-button
|
|
vn-click-stop="clone.show(item.id)"
|
|
vn-tooltip="Clone"
|
|
icon="icon-clone">
|
|
</vn-icon-button>
|
|
<vn-icon-button
|
|
vn-click-stop="$ctrl.preview(item)"
|
|
vn-tooltip="Preview"
|
|
icon="preview">
|
|
</vn-icon-button>
|
|
</vn-horizontal>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</slot-table>
|
|
</smart-table>
|
|
</vn-card>
|
|
<a ui-sref="item.create" vn-tooltip="New item" vn-bind="+" fixed-bottom-right>
|
|
<vn-float-button icon="add"></vn-float-button>
|
|
</a>
|
|
<vn-item-descriptor-popover
|
|
vn-id="item-descriptor"
|
|
warehouse-fk="$ctrl.vnConfig.warehouseFk">
|
|
</vn-item-descriptor-popover>
|
|
<vn-worker-descriptor-popover
|
|
vn-id="worker-descriptor">
|
|
</vn-worker-descriptor-popover>
|
|
<vn-confirm
|
|
vn-id="clone"
|
|
on-accept="$ctrl.onCloneAccept($data)"
|
|
question="Do you want to clone this item?"
|
|
message="All it's properties will be copied">
|
|
</vn-confirm>
|
|
<vn-popup vn-id="preview">
|
|
<vn-item-summary
|
|
item="$ctrl.itemSelected">
|
|
</vn-item-summary>
|
|
</vn-popup>
|
|
<vn-contextmenu
|
|
vn-id="contextmenu"
|
|
targets="['smart-table']"
|
|
model="model"
|
|
expr-builder="$ctrl.exprBuilder(param, value)">
|
|
<slot-menu>
|
|
<vn-item translate
|
|
ng-if="contextmenu.isFilterAllowed()"
|
|
ng-click="contextmenu.filterBySelection()">
|
|
Filter by selection
|
|
</vn-item>
|
|
<vn-item translate
|
|
ng-if="contextmenu.isFilterAllowed()"
|
|
ng-click="contextmenu.excludeSelection()">
|
|
Exclude selection
|
|
</vn-item>
|
|
<vn-item translate
|
|
ng-if="contextmenu.isFilterAllowed()"
|
|
ng-click="contextmenu.removeFilter()">
|
|
Remove filter
|
|
</vn-item>
|
|
<vn-item translate
|
|
ng-click="contextmenu.removeAllFilters()">
|
|
Remove all filters
|
|
</vn-item>
|
|
</slot-menu>
|
|
</vn-contextmenu> |