2018-03-15 13:36:09 +00:00
|
|
|
<mg-ajax
|
|
|
|
path="/ticket/api/Tickets/{{index.params.id}}/packages"
|
2018-03-21 10:08:59 +00:00
|
|
|
options="mgIndex" actions="$ctrl.getPackages()">
|
2018-03-15 13:36:09 +00:00
|
|
|
</mg-ajax>
|
|
|
|
|
2018-03-21 10:08:59 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
|
|
|
data="$ctrl.packages"
|
|
|
|
form="form">
|
|
|
|
</vn-watcher>
|
|
|
|
|
|
|
|
<form name="form" ng-submit="$ctrl.submit()">
|
|
|
|
<vn-card pad-large>
|
|
|
|
<vn-title>Packages</vn-title>
|
|
|
|
<vn-one>
|
|
|
|
<vn-horizontal ng-repeat="package in index.model track by $index">
|
|
|
|
<vn-autocomplete vn-one
|
|
|
|
margin-large-right
|
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"
|
|
|
|
field="package.packagingFk">
|
|
|
|
<tpl-item>{{id}} : {{name}}</tpl-item>
|
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
margin-large-right
|
|
|
|
label="Quantity"
|
|
|
|
model="package.quantity"
|
|
|
|
rule="TicketPackaging.quantity">
|
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
margin-large-right
|
|
|
|
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"
|
|
|
|
tooltip-position = "left"
|
|
|
|
icon="remove_circle_outline"
|
|
|
|
ng-click="$ctrl.removePackage($index)">
|
|
|
|
</vn-icon>
|
|
|
|
</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
|
|
|
pointer
|
|
|
|
vn-tooltip="Add package"
|
|
|
|
tooltip-position = "right"
|
|
|
|
icon="add_circle"
|
|
|
|
ng-click="$ctrl.addPackage()">
|
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>
|