salix/modules/ticket/front/package/index.html

64 lines
2.2 KiB
HTML
Raw Normal View History

2018-11-27 14:02:54 +00:00
<vn-crud-model
vn-id="model"
2019-05-21 11:09:30 +00:00
url="/api/TicketPackagings"
fields="['id', 'ticketFk', 'packagingFk', 'quantity', 'created']"
link="{ticketFk: $ctrl.$stateParams.id}"
data="packages" on-data-change="$ctrl.onDataChange()"
auto-load="true">
</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>
2018-12-14 11:56:21 +00:00
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
<vn-card class="vn-pa-lg">
2018-03-21 10:08:59 +00:00
<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"
2019-01-28 09:04:08 +00:00
search-function="{or: [{itemFk: $search}, {'name': {like: '%'+ $search +'%'}}]}"
2019-10-09 22:47:29 +00:00
ng-model="package.packagingFk">
<tpl-item>{{itemFk}} : {{name}}</tpl-item>
2018-03-21 10:08:59 +00:00
</vn-autocomplete>
<vn-input-number
vn-one
step="1"
2018-03-21 10:08:59 +00:00
label="Quantity"
2019-10-09 22:47:29 +00:00
ng-model="package.quantity"
2018-03-21 10:08:59 +00:00
rule="TicketPackaging.quantity">
</vn-input-number>
2018-03-21 10:08:59 +00:00
<vn-textfield
vn-one
label="Added"
2019-10-09 22:47:29 +00:00
ng-model="package.created | dateTime: 'dd/MM/yyyy'"
2018-03-21 10:08:59 +00:00
disabled="true"
ng-readonly="true">
</vn-textfield>
<vn-auto class="vn-pt-md">
<vn-icon-button
2019-02-08 16:49:51 +00:00
pointer
2018-03-21 10:08:59 +00:00
vn-tooltip="Remove package"
icon="delete"
ng-click="model.remove($index)">
</vn-icon-button>
2018-03-21 10:08:59 +00:00
</vn-one>
</vn-horizontal>
</vn-one>
<vn-one>
<vn-icon-button
2018-03-21 10:08:59 +00:00
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>