2018-11-27 14:02:54 +00:00
|
|
|
<vn-crud-model
|
2018-08-17 12:53:25 +00:00
|
|
|
vn-id="model"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="TicketPackagings"
|
2018-08-30 06:50:03 +00:00
|
|
|
fields="['id', 'ticketFk', 'packagingFk', 'quantity', 'created']"
|
2020-03-18 07:35:59 +00:00
|
|
|
link="{ticketFk: $ctrl.$params.id}"
|
2020-01-28 08:05:01 +00:00
|
|
|
data="packages"
|
2018-12-19 14:59:35 +00:00
|
|
|
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>
|
2019-10-11 15:38:04 +00:00
|
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
|
2019-10-04 22:16:57 +00:00
|
|
|
<vn-card class="vn-pa-lg">
|
2019-10-11 15:38:04 +00:00
|
|
|
<vn-horizontal ng-repeat="package in packages track by $index">
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
vn-focus
|
2019-10-24 22:53:53 +00:00
|
|
|
url="Packagings/listPackaging"
|
2019-10-11 15:38:04 +00:00
|
|
|
label="Package"
|
|
|
|
show-field="name"
|
|
|
|
value-field="packagingFk"
|
|
|
|
search-function="{or: [{itemFk: $search}, {'name': {like: '%'+ $search +'%'}}]}"
|
|
|
|
ng-model="package.packagingFk">
|
|
|
|
<tpl-item>{{itemFk}} : {{name}}</tpl-item>
|
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-input-number
|
|
|
|
vn-one
|
|
|
|
step="1"
|
|
|
|
label="Quantity"
|
|
|
|
ng-model="package.quantity"
|
|
|
|
rule="TicketPackaging">
|
|
|
|
</vn-input-number>
|
|
|
|
<vn-date-picker
|
|
|
|
vn-one
|
|
|
|
label="Added"
|
|
|
|
ng-model="package.created"
|
|
|
|
disabled="true"
|
|
|
|
ng-readonly="true">
|
|
|
|
</vn-date-picker>
|
|
|
|
<vn-auto>
|
|
|
|
<vn-icon-button
|
|
|
|
pointer
|
|
|
|
vn-tooltip="Remove package"
|
|
|
|
icon="delete"
|
|
|
|
ng-click="model.remove($index)">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-auto>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-icon-button
|
|
|
|
vn-tooltip="Add package"
|
|
|
|
vn-bind="+"
|
|
|
|
icon="add_circle"
|
|
|
|
ng-click="$ctrl.add()">
|
|
|
|
</vn-icon-button>
|
2018-03-21 10:08:59 +00:00
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
|
|
|
<vn-submit label="Save"></vn-submit>
|
|
|
|
</vn-button-bar>
|
|
|
|
</form>
|