salix/client/ticket/src/package/index.html

65 lines
2.3 KiB
HTML
Raw Normal View History

2018-11-27 14:02:54 +00:00
<vn-crud-model
vn-id="model"
url="/ticket/api/TicketPackagings"
fields="['id', 'ticketFk', 'packagingFk', 'quantity', 'created']"
link="{ticketFk: $ctrl.$stateParams.id}"
data="packages" on-data-change="$ctrl.onDataChange()">
</vn-crud-model>
2018-03-21 10:08:59 +00:00
<vn-watcher
vn-id="watcher"
data="packages"
2018-03-21 10:08:59 +00:00
form="form">
</vn-watcher>
<form name="form" ng-submit="$ctrl.onSubmit()">
2018-03-21 10:08:59 +00:00
<vn-card pad-large>
<vn-title>Packages</vn-title>
<vn-one>
<vn-horizontal ng-repeat="package in packages track by $index">
2018-03-21 10:08:59 +00:00
<vn-autocomplete vn-one
vn-focus
2018-03-21 10:08:59 +00:00
url="/ticket/api/Packagings/listPackaging"
label="Package"
show-field="name"
value-field="packagingFk"
2018-10-18 07:24:20 +00:00
search-function="{or: [{itemFk: {like: '%'+ $search +'%'}}, {'name': {like: '%'+ $search +'%'}}]}"
2018-03-21 10:08:59 +00:00
field="package.packagingFk">
<tpl-item>{{itemFk}} : {{name}}</tpl-item>
2018-03-21 10:08:59 +00:00
</vn-autocomplete>
<vn-textfield
vn-one
label="Quantity"
model="package.quantity"
rule="TicketPackaging.quantity">
</vn-textfield>
<vn-textfield
vn-one
label="Added"
model="package.created | date: 'dd/MM/yyyy'"
disabled="true"
ng-readonly="true">
</vn-textfield>
<vn-auto pad-medium-top>
<vn-icon
pointer
medium-grey
vn-tooltip="Remove package"
icon="remove_circle_outline"
ng-click="model.remove($index)">
2018-03-21 10:08:59 +00:00
</vn-icon>
</vn-one>
</vn-horizontal>
</vn-one>
<vn-one>
<vn-icon-button
2018-03-21 10:08:59 +00:00
pointer
vn-tooltip="Add package"
vn-bind="+"
2018-03-21 10:08:59 +00:00
icon="add_circle"
ng-click="$ctrl.add()">
</vn-icon-button>
2018-03-21 10:08:59 +00:00
</vn-one>
</vn-card>
<vn-button-bar>
<vn-submit label="Save"></vn-submit>
</vn-button-bar>
</form>