2018-11-27 14:02:54 +00:00
|
|
|
<vn-crud-model
|
2018-08-17 12:53:25 +00:00
|
|
|
vn-id="model"
|
|
|
|
url="/ticket/api/TicketPackagings"
|
2018-08-30 06:50:03 +00:00
|
|
|
fields="['id', 'ticketFk', 'packagingFk', 'quantity', 'created']"
|
2018-08-17 12:53:25 +00:00
|
|
|
link="{ticketFk: $ctrl.$stateParams.id}"
|
2018-12-19 14:59:35 +00:00
|
|
|
data="packages" on-data-change="$ctrl.onDataChange()"
|
|
|
|
auto-load="true">
|
2018-08-17 12:53:25 +00:00
|
|
|
</vn-crud-model>
|
2018-03-21 10:08:59 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
2018-08-17 12:53:25 +00:00
|
|
|
data="packages"
|
2018-03-21 10:08:59 +00:00
|
|
|
form="form">
|
|
|
|
</vn-watcher>
|
2018-12-14 11:56:21 +00:00
|
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
|
2018-03-21 10:08:59 +00:00
|
|
|
<vn-card pad-large>
|
|
|
|
<vn-one>
|
2018-08-17 12:53:25 +00:00
|
|
|
<vn-horizontal ng-repeat="package in packages track by $index">
|
2018-03-21 10:08:59 +00:00
|
|
|
<vn-autocomplete vn-one
|
2018-04-19 12:46:06 +00:00
|
|
|
vn-focus
|
2018-03-21 10:08:59 +00:00
|
|
|
url="/ticket/api/Packagings/listPackaging"
|
|
|
|
label="Package"
|
|
|
|
show-field="name"
|
|
|
|
value-field="packagingFk"
|
2019-01-28 09:04:08 +00:00
|
|
|
search-function="{or: [{itemFk: $search}, {'name': {like: '%'+ $search +'%'}}]}"
|
2018-03-21 10:08:59 +00:00
|
|
|
field="package.packagingFk">
|
2018-08-17 12:53:25 +00:00
|
|
|
<tpl-item>{{itemFk}} : {{name}}</tpl-item>
|
2018-03-21 10:08:59 +00:00
|
|
|
</vn-autocomplete>
|
2019-04-24 09:36:13 +00:00
|
|
|
<vn-input-number vn-one step="1"
|
2018-03-21 10:08:59 +00:00
|
|
|
label="Quantity"
|
|
|
|
model="package.quantity"
|
|
|
|
rule="TicketPackaging.quantity">
|
2019-03-26 06:29:45 +00:00
|
|
|
</vn-input-number>
|
2018-03-21 10:08:59 +00:00
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Added"
|
2019-02-27 16:04:00 +00:00
|
|
|
model="package.created | dateTime: 'dd/MM/yyyy'"
|
2018-03-21 10:08:59 +00:00
|
|
|
disabled="true"
|
|
|
|
ng-readonly="true">
|
|
|
|
</vn-textfield>
|
|
|
|
<vn-auto pad-medium-top>
|
2019-03-06 11:27:56 +00:00
|
|
|
<vn-icon-button
|
2019-02-08 16:49:51 +00:00
|
|
|
pointer
|
2018-03-21 10:08:59 +00:00
|
|
|
vn-tooltip="Remove package"
|
2018-12-11 07:50:54 +00:00
|
|
|
icon="delete"
|
2018-08-30 06:50:03 +00:00
|
|
|
ng-click="model.remove($index)">
|
2019-03-06 11:27:56 +00:00
|
|
|
</vn-icon-button>
|
2018-03-21 10:08:59 +00:00
|
|
|
</vn-one>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-one>
|
|
|
|
<vn-one>
|
2018-04-19 12:46:06 +00:00
|
|
|
<vn-icon-button
|
2018-03-21 10:08:59 +00:00
|
|
|
vn-tooltip="Add package"
|
2018-04-23 09:17:30 +00:00
|
|
|
vn-bind="+"
|
2018-03-21 10:08:59 +00:00
|
|
|
icon="add_circle"
|
2018-08-30 06:50:03 +00:00
|
|
|
ng-click="$ctrl.add()">
|
2018-04-19 12:46:06 +00:00
|
|
|
</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>
|