2017-12-20 11:40:29 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
2020-03-09 08:00:03 +00:00
|
|
|
url="Items/new"
|
2017-12-20 11:40:29 +00:00
|
|
|
data="$ctrl.item"
|
2020-03-09 08:00:03 +00:00
|
|
|
insert-mode="true"
|
|
|
|
form="form">
|
2017-12-20 11:40:29 +00:00
|
|
|
</vn-watcher>
|
2020-09-17 18:12:52 +00:00
|
|
|
<vn-crud-model
|
|
|
|
auto-load="true"
|
|
|
|
url="Origins"
|
|
|
|
data="originsData"
|
|
|
|
order="name"
|
|
|
|
vn-id="origin-model">
|
|
|
|
</vn-crud-model>
|
2019-11-10 10:08:44 +00:00
|
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
|
|
|
|
<vn-card class="vn-pa-lg">
|
|
|
|
<vn-horizontal>
|
2020-03-09 08:00:03 +00:00
|
|
|
<vn-textfield
|
2019-11-10 10:08:44 +00:00
|
|
|
label="Temporal name"
|
|
|
|
ng-model="$ctrl.item.provisionalName"
|
|
|
|
vn-focus>
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2020-03-09 08:00:03 +00:00
|
|
|
<vn-autocomplete
|
2019-11-10 10:08:44 +00:00
|
|
|
label="Type"
|
|
|
|
ng-model="$ctrl.item.typeFk"
|
2020-03-09 08:00:03 +00:00
|
|
|
url="ItemTypes"
|
|
|
|
fields="['code', 'categoryFk']"
|
2019-12-26 10:27:44 +00:00
|
|
|
search-function="{or: [{code: {like: $search +'%'}}, {name: {like: '%'+ $search +'%'}}]}"
|
|
|
|
include="'category'">
|
|
|
|
<tpl-item>
|
|
|
|
<div style="display: flex;">
|
|
|
|
<div style="width: 3em; padding-right: 1em;">{{::code}}</div>
|
|
|
|
<div>{{::name}}</div>
|
|
|
|
</div>
|
|
|
|
<div class="text-caption text-secondary">
|
|
|
|
{{category.name}}
|
|
|
|
</div>
|
2019-11-10 10:08:44 +00:00
|
|
|
</tpl-item>
|
|
|
|
</vn-autocomplete>
|
2020-03-09 08:00:03 +00:00
|
|
|
<vn-autocomplete
|
2019-11-10 10:08:44 +00:00
|
|
|
label="Intrastat"
|
|
|
|
ng-model="$ctrl.item.intrastatFk"
|
2020-03-09 08:00:03 +00:00
|
|
|
url="Intrastats"
|
|
|
|
show-field="description"
|
2019-11-10 10:08:44 +00:00
|
|
|
search-function="{or: [{id: {like: $search +'%'}}, {description: {like: '%'+ $search +'%'}}]}">
|
|
|
|
<tpl-item style="display: flex;">
|
|
|
|
<div style="width: 6em; text-align: right; padding-right: 1em;">{{::id}}</div>
|
|
|
|
<div>{{::description}}</div>
|
|
|
|
</tpl-item>
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete vn-one
|
2020-09-17 18:12:52 +00:00
|
|
|
data="originsData"
|
2019-11-10 10:08:44 +00:00
|
|
|
label="Origin"
|
|
|
|
ng-model="$ctrl.item.originFk">
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
|
|
|
<vn-submit
|
2020-12-15 15:07:34 +00:00
|
|
|
disabled="!watcher.dataChanged()"
|
2019-11-10 10:08:44 +00:00
|
|
|
label="Create">
|
|
|
|
</vn-submit>
|
|
|
|
<vn-button
|
2020-12-15 15:07:34 +00:00
|
|
|
class="cancel"
|
2019-11-10 10:08:44 +00:00
|
|
|
label="Cancel"
|
|
|
|
ui-sref="item.index">
|
|
|
|
</vn-button>
|
|
|
|
</vn-button-bar>
|
|
|
|
</form>
|