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

74 lines
2.3 KiB
HTML
Raw Permalink Normal View History

2023-05-05 06:12:38 +00:00
<vn-crud-model
vn-id="model"
url="TicketPackagings"
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"
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>
2019-10-11 15:38:04 +00:00
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
<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-focus
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">
2023-05-05 06:12:38 +00:00
<tpl-item>
<div>{{::name}}</div>
<div class="text-secondary text-caption">
#{{itemFk}}
</div>
2019-10-11 15:38:04 +00:00
</vn-autocomplete>
<vn-input-number
step="1"
label="Quantity"
ng-model="package.quantity"
rule="TicketPackaging">
</vn-input-number>
<vn-date-picker
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)">
2023-05-05 06:12:38 +00:00
</vn-icon-button>
2019-10-11 15:38:04 +00:00
</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>
2020-12-16 09:21:20 +00:00
<vn-submit
disabled="!watcher.dataChanged()"
label="Save">
</vn-submit>
2023-05-05 06:12:38 +00:00
<!-- #2680 Undo changes button bug
<vn-button
2020-12-16 09:21:20 +00:00
class="cancel"
label="Undo changes"
disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()">
2023-05-05 06:12:38 +00:00
</vn-button>
-->
2018-03-21 10:08:59 +00:00
</vn-button-bar>
2023-05-05 06:12:38 +00:00
</form>