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

96 lines
3.1 KiB
HTML
Raw Normal View History

2017-12-20 11:40:29 +00:00
<vn-watcher
vn-id="watcher"
url="Items/new"
2017-12-20 11:40:29 +00:00
data="$ctrl.item"
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>
<vn-textfield
label="Name"
2023-01-17 09:01:49 +00:00
ng-model="$ctrl.item.provisionalName"
2023-05-05 06:12:38 +00:00
vn-name="name"
2019-11-10 10:08:44 +00:00
vn-focus>
</vn-textfield>
2023-01-17 09:01:49 +00:00
<vn-autocomplete
ng-model="$ctrl.item.tag"
url="Tags"
show-field="name"
value-field="id"
2023-05-05 06:12:38 +00:00
label="Tag"
vn-name="tag">
2023-01-17 09:01:49 +00:00
</vn-autocomplete>
<vn-autocomplete
data="$ctrl.validPriorities"
2023-01-17 09:01:49 +00:00
label="Priority"
ng-model="$ctrl.item.priority"
show-field="priority"
2023-05-05 06:12:38 +00:00
value-field="priority"
vn-name="priority">
</vn-autocomplete>
2019-11-10 10:08:44 +00:00
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete
2019-11-10 10:08:44 +00:00
label="Type"
ng-model="$ctrl.item.typeFk"
2023-05-05 06:12:38 +00:00
vn-name="type"
url="ItemTypes"
fields="['code', 'categoryFk']"
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>
<vn-autocomplete
2019-11-10 10:08:44 +00:00
label="Intrastat"
ng-model="$ctrl.item.intrastatFk"
2023-05-05 06:12:38 +00:00
vn-name="intrastat"
url="Intrastats"
show-field="description"
2019-11-10 10:08:44 +00:00
search-function="{or: [{id: {like: $search +'%'}}, {description: {like: '%'+ $search +'%'}}]}">
2023-05-05 06:12:38 +00:00
<tpl-item>
2019-11-10 10:08:44 +00:00
<div>{{::description}}</div>
2023-05-05 06:12:38 +00:00
<div class="text-caption text-secondary">
#{{::id}}
</div>
2019-11-10 10:08:44 +00:00
</tpl-item>
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
2023-05-05 06:12:38 +00:00
<vn-autocomplete
2020-09-17 18:12:52 +00:00
data="originsData"
2019-11-10 10:08:44 +00:00
label="Origin"
2023-05-05 06:12:38 +00:00
ng-model="$ctrl.item.originFk"
vn-name="origin">
2019-11-10 10:08:44 +00:00
</vn-autocomplete>
</vn-horizontal>
</vn-card>
<vn-button-bar>
<vn-submit
disabled="!watcher.dataChanged()"
2019-11-10 10:08:44 +00:00
label="Create">
</vn-submit>
<vn-button
class="cancel"
2019-11-10 10:08:44 +00:00
label="Cancel"
ui-sref="item.index">
</vn-button>
</vn-button-bar>
</form>