2019-01-16 07:46:40 +00:00
|
|
|
<mg-ajax path="/item/api/Items/new" options="vnPost"></mg-ajax>
|
2017-12-20 11:40:29 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
|
|
|
data="$ctrl.item"
|
|
|
|
form="form"
|
|
|
|
save="post">
|
|
|
|
</vn-watcher>
|
|
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" margin-medium>
|
2018-12-14 11:56:21 +00:00
|
|
|
<div compact>
|
2018-03-01 22:38:14 +00:00
|
|
|
<vn-card pad-large>
|
|
|
|
<vn-title>New item</vn-title>
|
|
|
|
<vn-horizontal>
|
2019-01-16 07:46:40 +00:00
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Temporal name"
|
|
|
|
field="$ctrl.item.provisionalName"
|
|
|
|
vn-focus>
|
|
|
|
</vn-textfield>
|
2018-03-01 22:38:14 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete vn-one
|
|
|
|
url="/item/api/ItemTypes"
|
|
|
|
label="Type"
|
2018-10-18 07:24:20 +00:00
|
|
|
fields="['code', 'name']"
|
2018-03-01 22:38:14 +00:00
|
|
|
value-field="id"
|
2018-03-21 07:59:18 +00:00
|
|
|
field="$ctrl.item.typeFk"
|
2019-01-23 14:06:11 +00:00
|
|
|
search-function="{or: [{code: {like: '%'+ $search +'%'}}, {name: {like: '%'+ $search +'%'}}]}">
|
2018-05-31 12:40:42 +00:00
|
|
|
<tpl-item style="display: flex;">
|
|
|
|
<div style="width: 3em; padding-right: 1em;">{{::code}}</div>
|
|
|
|
<div>{{::name}}</div>
|
|
|
|
</tpl-item>
|
2018-03-01 22:38:14 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-autocomplete vn-one
|
2018-03-22 17:02:48 +00:00
|
|
|
url="/item/api/Intrastats"
|
|
|
|
label="Intrastat"
|
|
|
|
show-field="description"
|
|
|
|
value-field="id"
|
|
|
|
field="$ctrl.item.intrastatFk"
|
2019-01-23 14:06:11 +00:00
|
|
|
search-function="{or: [{id: {like: '%'+ $search +'%'}}, {description: {like: '%'+ $search +'%'}}]}">
|
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-22 17:02:48 +00:00
|
|
|
</vn-autocomplete>
|
2018-03-01 22:38:14 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete vn-one
|
|
|
|
url="/item/api/Origins"
|
|
|
|
label="Origin"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
field="$ctrl.item.originFk">
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
2017-12-20 11:40:29 +00:00
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
|
|
|
<vn-submit label="Create"></vn-submit>
|
2018-04-22 14:25:44 +00:00
|
|
|
<button
|
|
|
|
class="mdl-button mdl-button--raised mdl-button--colored"
|
|
|
|
translate
|
|
|
|
ui-sref="item.index"
|
|
|
|
>Cancel
|
|
|
|
</button>
|
2017-12-20 11:40:29 +00:00
|
|
|
</vn-button-bar>
|
|
|
|
</div>
|
|
|
|
</form>
|