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>
|
2019-10-04 22:16:57 +00:00
|
|
|
<vn-card class="vn-pa-lg">
|
2018-03-01 22:38:14 +00:00
|
|
|
<vn-horizontal>
|
2019-10-09 22:47:29 +00:00
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Name"
|
|
|
|
ng-model="$ctrl.item.name"
|
|
|
|
rule
|
|
|
|
vn-focus>
|
|
|
|
</vn-textfield>
|
2018-10-15 11:20:55 +00:00
|
|
|
<vn-textfield
|
|
|
|
vn-one label="Full name"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.item.longName"
|
|
|
|
rule
|
2018-10-15 11:20:55 +00:00
|
|
|
info="Full name calculates based on tags 1-3. Is not recommended to change it manually">
|
|
|
|
</vn-textfield>
|
2018-12-17 13:15:39 +00:00
|
|
|
<vn-autocomplete vn-one
|
2018-03-01 22:38:14 +00:00
|
|
|
url="/item/api/ItemTypes"
|
|
|
|
label="Type"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.item.typeFk"
|
2018-03-01 22:38:14 +00:00
|
|
|
initial-data="$ctrl.item.itemType">
|
|
|
|
</vn-autocomplete>
|
2018-12-17 13:15:39 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2018-03-01 22:38:14 +00:00
|
|
|
<vn-autocomplete vn-one
|
|
|
|
url="/item/api/Intrastats"
|
|
|
|
label="Intrastat"
|
|
|
|
show-field="description"
|
|
|
|
value-field="id"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.item.intrastatFk"
|
2019-01-28 09:04:08 +00:00
|
|
|
search-function="{or: [{id: {like: $search +'%'}}, {description: {like: '%'+ $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-autocomplete vn-one
|
|
|
|
url="/item/api/Expences"
|
|
|
|
label="Expence"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.item.expenceFk"
|
2018-03-01 22:38:14 +00:00
|
|
|
initial-data="$ctrl.item.expence">
|
|
|
|
</vn-autocomplete>
|
2018-10-15 11:20:55 +00:00
|
|
|
<vn-autocomplete vn-one
|
|
|
|
url="/item/api/Origins"
|
|
|
|
label="Origin"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.item.originFk"
|
2018-10-15 11:20:55 +00:00
|
|
|
initial-data="$ctrl.item.origin">
|
2018-12-17 13:15:39 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Reference"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.item.comment"
|
|
|
|
rule>
|
2018-12-17 13:15:39 +00:00
|
|
|
</vn-textfield>
|
2019-10-08 21:57:02 +00:00
|
|
|
<vn-input-number
|
|
|
|
vn-one
|
|
|
|
min="0"
|
2019-03-26 06:29:45 +00:00
|
|
|
label="Size"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.item.size"
|
2019-10-08 21:57:02 +00:00
|
|
|
rule>
|
2019-03-26 06:29:45 +00:00
|
|
|
</vn-input-number>
|
2019-10-08 21:57:02 +00:00
|
|
|
<vn-input-number
|
|
|
|
vn-one
|
|
|
|
min="0"
|
2019-03-26 06:29:45 +00:00
|
|
|
label="stems"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.item.stems"
|
2019-10-08 21:57:02 +00:00
|
|
|
rule>
|
2019-03-26 06:29:45 +00:00
|
|
|
</vn-input-number>
|
2018-12-17 13:15:39 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2019-10-08 21:57:02 +00:00
|
|
|
<vn-input-number
|
|
|
|
vn-one
|
|
|
|
min="0"
|
2019-05-30 06:04:46 +00:00
|
|
|
step="0.01"
|
2019-03-26 06:29:45 +00:00
|
|
|
label="Density"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.item.density"
|
2019-10-08 21:57:02 +00:00
|
|
|
rule>
|
2019-03-26 06:29:45 +00:00
|
|
|
</vn-input-number>
|
2019-10-08 21:57:02 +00:00
|
|
|
<vn-input-number
|
|
|
|
vn-one
|
|
|
|
min="0"
|
2019-03-26 06:29:45 +00:00
|
|
|
label="Relevancy"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.item.relevancy"
|
2019-10-08 21:57:02 +00:00
|
|
|
rule>
|
2019-03-26 06:29:45 +00:00
|
|
|
</vn-input-number>
|
2018-12-17 13:15:39 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2018-10-15 11:20:55 +00:00
|
|
|
<vn-check
|
|
|
|
vn-one
|
2018-10-23 09:25:51 +00:00
|
|
|
label="Active"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.item.isActive">
|
2018-10-15 11:20:55 +00:00
|
|
|
</vn-check>
|
2019-09-18 09:11:47 +00:00
|
|
|
<vn-check
|
|
|
|
vn-one
|
|
|
|
label="Price in kg"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.item.hasKgPrice">
|
2019-09-18 09:11:47 +00:00
|
|
|
</vn-check>
|
2019-10-09 22:47:29 +00:00
|
|
|
<vn-textarea
|
|
|
|
vn-one
|
|
|
|
label="description"
|
|
|
|
ng-model="$ctrl.item.description"
|
|
|
|
rule>
|
|
|
|
</vn-textarea>
|
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>
|
2019-09-18 07:41:25 +00:00
|
|
|
<vn-button label="Undo changes" ng-if="$ctrl.$scope.form.$dirty" ng-click="watcher.loadOriginalData()"></vn-button>
|
2017-12-21 13:09:55 +00:00
|
|
|
</vn-button-bar>
|
|
|
|
</form>
|