63 lines
2.1 KiB
HTML
63 lines
2.1 KiB
HTML
<vn-crud-model
|
|
vn-id="model"
|
|
url="/ticket/api/TicketServices"
|
|
link="{ticketFk: $ctrl.$stateParams.id}"
|
|
data="services"
|
|
auto-load="true">
|
|
</vn-crud-model>
|
|
<vn-watcher
|
|
vn-id="watcher"
|
|
data="services"
|
|
form="form">
|
|
</vn-watcher>
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
|
|
<vn-card pad-large>
|
|
<vn-one>
|
|
<vn-horizontal ng-repeat="service in services track by $index">
|
|
<vn-autocomplete vn-one
|
|
vn-focus
|
|
url="/api/TicketServiceTypes"
|
|
label="Description"
|
|
show-field="name"
|
|
value-field="name"
|
|
field="service.description">
|
|
</vn-autocomplete>
|
|
<vn-input-number vn-one min="0" step="1"
|
|
label="Quantity"
|
|
model="service.quantity"
|
|
rule="TicketService.quantity">
|
|
</vn-input-number>
|
|
<vn-input-number vn-one
|
|
label="Price"
|
|
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"
|
|
field="service.taxClassFk">
|
|
</vn-autocomplete>
|
|
<vn-auto pad-medium-top>
|
|
<vn-icon-button
|
|
pointer
|
|
vn-tooltip="Remove service"
|
|
icon="delete"
|
|
ng-click="model.remove($index)">
|
|
</vn-icon-button>
|
|
</vn-one>
|
|
</vn-horizontal>
|
|
</vn-one>
|
|
<vn-one>
|
|
<vn-icon-button
|
|
vn-tooltip="Add service"
|
|
vn-bind="+"
|
|
icon="add_circle"
|
|
ng-click="$ctrl.add()">
|
|
</vn-icon-button>
|
|
</vn-one>
|
|
</vn-card>
|
|
<vn-button-bar>
|
|
<vn-submit label="Save"></vn-submit>
|
|
</vn-button-bar>
|
|
</form> |