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

62 lines
1.8 KiB
HTML

<vn-crud-model
vn-id="model"
url="ItemNiches"
fields="['id', 'itemFk', 'warehouseFk', 'code']"
link="{itemFk: $ctrl.$params.id}"
data="niches"
auto-load="true">
</vn-crud-model>
<vn-watcher
vn-id="watcher"
data="niches"
form="form">
</vn-watcher>
<vn-crud-model
auto-load="true"
url="Warehouses"
data="warehouses"
order="name"
vn-id="warehouse-model">
</vn-crud-model>
<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 vn-one vn-focus
data="warehouses"
label="Warehouse"
show-field="name"
value-field="id"
ng-model="niche.warehouseFk"
vn-acl="buyer,replenisher">
</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>