2017-12-21 13:09:55 +00:00
|
|
|
<mg-ajax
|
|
|
|
path="/item/api/Items/{{patch.params.id}}"
|
|
|
|
options="vnPatch"
|
2018-02-19 19:52:07 +00:00
|
|
|
override="{filter: {include: [{relation: 'itemType'}, {relation: 'origin'}, {relation: 'ink'}, {relation: 'producer'}, {relation: 'expence'}]}}">
|
2017-12-21 13:09:55 +00:00
|
|
|
</mg-ajax>
|
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
|
|
|
data="$ctrl.item"
|
|
|
|
form="form"
|
|
|
|
save="patch">
|
|
|
|
</vn-watcher>
|
2018-12-14 11:56:21 +00:00
|
|
|
<form name="form" ng-submit="watcher.submit()" ng-cloak compact>
|
2018-03-01 22:38:14 +00:00
|
|
|
<vn-card pad-large>
|
|
|
|
<vn-title>Basic data</vn-title>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield vn-one label="Name" field="$ctrl.item.name" vn-focus></vn-textfield>
|
2018-10-15 11:20:55 +00:00
|
|
|
<vn-textfield
|
|
|
|
vn-one label="Full name"
|
|
|
|
field="$ctrl.item.longName"
|
|
|
|
info="Full name calculates based on tags 1-3. Is not recommended to change it manually">
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete vn-one
|
2018-03-01 22:38:14 +00:00
|
|
|
url="/item/api/ItemTypes"
|
|
|
|
label="Type"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
field="$ctrl.item.typeFk"
|
|
|
|
initial-data="$ctrl.item.itemType">
|
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-autocomplete vn-one
|
|
|
|
url="/item/api/Intrastats"
|
|
|
|
label="Intrastat"
|
|
|
|
show-field="description"
|
|
|
|
value-field="id"
|
|
|
|
field="$ctrl.item.intrastatFk"
|
2018-10-18 07:24:20 +00:00
|
|
|
search-function="{or: [{id: {regexp: $search}}, {description: {regexp: $search}}]}"
|
2018-03-01 22:38:14 +00:00
|
|
|
initial-data="$ctrl.item.intrastat">
|
2018-05-31 12:40:42 +00:00
|
|
|
<tpl-item style="display: flex;">
|
|
|
|
<div style="width: 6em; text-align: right; padding-right: 1em;">{{::id}}</div>
|
|
|
|
<div>{{::description}}</div>
|
|
|
|
</tpl-item>
|
2018-03-01 22:38:14 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2018-05-31 12:40:42 +00:00
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Reference"
|
|
|
|
field="$ctrl.item.description">
|
|
|
|
</vn-textfield>
|
2018-03-01 22:38:14 +00:00
|
|
|
<vn-autocomplete vn-one
|
|
|
|
url="/item/api/Expences"
|
|
|
|
label="Expence"
|
|
|
|
field="$ctrl.item.expenceFk"
|
|
|
|
initial-data="$ctrl.item.expence">
|
|
|
|
</vn-autocomplete>
|
2018-10-15 11:20:55 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield vn-one label="Relevancy" field="$ctrl.item.relevancy" type="number"></vn-textfield>
|
|
|
|
<vn-autocomplete vn-one
|
|
|
|
url="/item/api/Origins"
|
|
|
|
label="Origin"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
field="$ctrl.item.originFk"
|
|
|
|
initial-data="$ctrl.item.origin">
|
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-check
|
|
|
|
vn-one
|
2018-10-23 09:25:51 +00:00
|
|
|
label="Active"
|
2018-10-15 11:20:55 +00:00
|
|
|
field="$ctrl.item.isActive">
|
|
|
|
</vn-check>
|
2018-03-01 22:38:14 +00:00
|
|
|
</vn-horizontal>
|
2017-12-21 13:09:55 +00:00
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
|
|
|
<vn-submit label="Save"></vn-submit>
|
|
|
|
</vn-button-bar>
|
|
|
|
</form>
|