2018-04-04 17:59:03 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
|
|
|
data="$ctrl.item"
|
|
|
|
form="form">
|
|
|
|
</vn-watcher>
|
|
|
|
<form name="form" ng-submit="$ctrl.submit()">
|
|
|
|
<vn-card pad-large>
|
|
|
|
<vn-title>Item niches</vn-title>
|
|
|
|
<vn-horizontal ng-repeat="itemNiche in $ctrl.niches track by $index">
|
|
|
|
<vn-autocomplete
|
|
|
|
ng-if="!itemNiche.id"
|
|
|
|
vn-one
|
2018-04-19 12:46:06 +00:00
|
|
|
vn-focus
|
2018-04-04 17:59:03 +00:00
|
|
|
data="$ctrl.warehouses"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
initial-data="itemNiche.warehouse"
|
|
|
|
field="itemNiche.warehouseFk"
|
|
|
|
label="Warehouse"
|
|
|
|
vn-acl="buyer,replenisher">
|
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-textfield
|
|
|
|
ng-if="itemNiche.id"
|
2018-04-19 12:46:06 +00:00
|
|
|
vn-focus
|
2018-04-04 17:59:03 +00:00
|
|
|
vn-one
|
|
|
|
label="Warehouse"
|
|
|
|
model="itemNiche.warehouse.name"
|
|
|
|
disabled="true">
|
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
2018-04-05 07:06:35 +00:00
|
|
|
vn-three
|
2018-04-04 17:59:03 +00:00
|
|
|
label="Code"
|
|
|
|
model="itemNiche.code"
|
|
|
|
rule="itemNiche.code"
|
|
|
|
vn-acl="buyer,replenisher">
|
|
|
|
</vn-textfield>
|
2018-04-05 07:06:35 +00:00
|
|
|
<vn-icon
|
|
|
|
pad-medium-top
|
|
|
|
vn-acl="buyer,replenisher"
|
|
|
|
pointer
|
|
|
|
medium-grey
|
2018-04-19 12:46:06 +00:00
|
|
|
vn-tooltip="Remove niche"
|
2018-04-05 07:06:35 +00:00
|
|
|
tooltip-position="left"
|
|
|
|
icon="remove_circle_outline"
|
|
|
|
ng-click="$ctrl.removeNiche($index)">
|
|
|
|
</vn-icon>
|
2018-04-04 17:59:03 +00:00
|
|
|
</vn-horizontal>
|
2018-04-05 07:06:35 +00:00
|
|
|
<vn-one>
|
2018-04-19 12:46:06 +00:00
|
|
|
<vn-icon-button
|
2018-04-05 07:06:35 +00:00
|
|
|
vn-acl="buyer, replenisher"
|
2018-04-19 12:46:06 +00:00
|
|
|
vn-tooltip="Add niche"
|
|
|
|
tooltip-position="right" icon="add_circle"
|
2018-04-05 07:06:35 +00:00
|
|
|
ng-click="$ctrl.addNiche()">
|
2018-04-19 12:46:06 +00:00
|
|
|
</vn-icon-button>
|
2018-04-05 07:06:35 +00:00
|
|
|
</vn-one>
|
2018-04-04 17:59:03 +00:00
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
|
|
|
<vn-submit label="Save"></vn-submit>
|
|
|
|
</vn-button-bar>
|
|
|
|
</form>
|