salix/modules/item/front/niche/index.html

55 lines
1.7 KiB
HTML

<vn-crud-model
vn-id="model"
url="ItemNiches"
fields="['id', 'itemFk', 'warehouseFk', 'code']"
link="{itemFk: $ctrl.$stateParams.id}"
data="niches"
auto-load="true">
</vn-crud-model>
<vn-watcher
vn-id="watcher"
data="niches"
form="form">
</vn-watcher>
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
<vn-card class="vn-pa-lg">
<vn-horizontal ng-repeat="niche in niches track by $index">
<vn-autocomplete
url="Warehouses"
show-field="name"
value-field="id"
ng-model="niche.warehouseFk"
label="Warehouse"
vn-acl="buyer,replenisher" vn-one vn-focus>
</vn-autocomplete>
<vn-textfield
vn-three
label="Code"
ng-model="niche.code"
rule="ItemNiche"
vn-acl="buyer,replenisher">
</vn-textfield>
<vn-none>
<vn-icon-button
vn-acl="buyer,replenisher"
pointer
vn-tooltip="Remove niche"
icon="delete"
ng-click="model.remove($index)">
</vn-icon-button>
</vn-none>
</vn-horizontal>
<vn-one>
<vn-icon-button
vn-acl="buyer, replenisher"
vn-tooltip="Add niche"
vn-bind="+"
icon="add_circle"
ng-click="model.insert()">
</vn-icon-button>
</vn-one>
</vn-card>
<vn-button-bar>
<vn-submit label="Save"></vn-submit>
</vn-button-bar>
</form>