2018-11-30 06:57:41 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
|
|
|
url="/ticket/api/TicketServices"
|
|
|
|
link="{ticketFk: $ctrl.$stateParams.id}"
|
2019-05-16 12:07:16 +00:00
|
|
|
data="$ctrl.services"
|
2018-12-19 14:59:35 +00:00
|
|
|
auto-load="true">
|
2018-11-30 06:57:41 +00:00
|
|
|
</vn-crud-model>
|
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
2019-05-29 11:06:42 +00:00
|
|
|
data="$ctrl.services">
|
2018-11-30 06:57:41 +00:00
|
|
|
</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="service in $ctrl.services track by $index">
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
vn-focus
|
|
|
|
url="/api/TicketServiceTypes"
|
|
|
|
label="Description"
|
|
|
|
show-field="name"
|
|
|
|
value-field="name"
|
|
|
|
ng-model="service.description">
|
|
|
|
</vn-autocomplete>
|
2019-02-11 12:14:02 +00:00
|
|
|
<vn-icon-button
|
2019-10-11 15:38:04 +00:00
|
|
|
vn-auto
|
|
|
|
class="vn-my-md"
|
2018-11-30 06:57:41 +00:00
|
|
|
icon="add_circle"
|
2019-10-11 15:38:04 +00:00
|
|
|
vn-tooltip="New service type"
|
|
|
|
ng-click="$ctrl.newServiceTypeDialog($index)"
|
|
|
|
vn-acl="administrative">
|
2018-11-30 06:57:41 +00:00
|
|
|
</vn-icon-button>
|
2019-10-11 15:38:04 +00:00
|
|
|
<vn-input-number
|
|
|
|
vn-one min="0"
|
|
|
|
step="1"
|
|
|
|
label="Quantity"
|
|
|
|
ng-model="service.quantity"
|
|
|
|
rule="TicketService">
|
|
|
|
</vn-input-number>
|
|
|
|
<vn-input-number
|
|
|
|
vn-one
|
|
|
|
label="Price"
|
|
|
|
ng-model="service.price"
|
|
|
|
step="0.01">
|
|
|
|
</vn-input-number>
|
|
|
|
<vn-autocomplete vn-one
|
|
|
|
url="/api/TaxClasses"
|
|
|
|
label="Tax class"
|
|
|
|
show-field="description"
|
|
|
|
value-field="id"
|
|
|
|
ng-model="service.taxClassFk">
|
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-auto>
|
|
|
|
<vn-icon-button
|
|
|
|
pointer
|
|
|
|
vn-tooltip="Remove service"
|
|
|
|
icon="delete"
|
|
|
|
ng-click="model.remove($index)">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-auto>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-icon-button
|
|
|
|
vn-tooltip="Add service"
|
|
|
|
vn-bind="+"
|
|
|
|
icon="add_circle"
|
|
|
|
ng-click="$ctrl.add()">
|
|
|
|
</vn-icon-button>
|
2018-11-30 06:57:41 +00:00
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
|
|
|
<vn-submit label="Save"></vn-submit>
|
|
|
|
</vn-button-bar>
|
2019-05-16 12:07:16 +00:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<!-- Create service type dialog -->
|
|
|
|
<vn-dialog class="edit"
|
|
|
|
vn-id="createServiceTypeDialog"
|
|
|
|
on-open="$ctrl.onNewServiceTypeOpen()"
|
|
|
|
on-response="$ctrl.onNewServiceTypeResponse(response)">
|
|
|
|
<tpl-body>
|
2019-10-04 22:16:57 +00:00
|
|
|
<h5 class="vn-py-sm" translate>New service type</h5>
|
2019-05-16 12:07:16 +00:00
|
|
|
<vn-horizontal>
|
2019-10-09 22:47:29 +00:00
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
2019-05-16 12:07:16 +00:00
|
|
|
label="Description"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.newServiceType.name">
|
2019-05-16 12:07:16 +00:00
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
|
|
|
<input type="button" response="CANCEL" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="ACCEPT" translate>Create</button>
|
|
|
|
</tpl-buttons>
|
|
|
|
</vn-dialog>
|