salix/modules/ticket/front/request/create/index.html

36 lines
1.4 KiB
HTML

<mg-ajax path="/ticket/api/TicketRequests" options="vnPost"></mg-ajax>
<vn-watcher
vn-id="watcher"
data="$ctrl.ticketRequest"
form="form"
save="post">
</vn-watcher>
<form name="form" ng-submit="$ctrl.onSubmit()" margin-medium>
<div compact>
<vn-card pad-large>
<vn-horizontal>
<vn-textfield vn-one label="Description" field="$ctrl.ticketRequest.description" vn-focus></vn-textfield>
<vn-autocomplete
vn-one
label="Buyer"
field="$ctrl.ticketRequest.atenderFk"
select-fields="['id', 'firstName']"
url="/client/api/Clients/activeWorkersWithRole"
where="{role: 'buyer'}"
search-function="{firstName: $search}"
show-field="firstName">
<tpl-item>{{firstName}} {{name}}</tpl-item>
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one label="Quantity" field="$ctrl.ticketRequest.quantity"></vn-textfield>
<vn-textfield vn-one label="Price" field="$ctrl.ticketRequest.price"></vn-textfield>
</vn-horizontal>
</vn-card>
<vn-button-bar>
<vn-submit label="Create"></vn-submit>
<vn-button ui-sref="ticket.card.request.index" label="Cancel"></vn-button>
</vn-button-bar>
</div>
</form>