2018-11-27 14:02:54 +00:00
|
|
|
<vn-crud-model auto-load="false"
|
2018-11-21 07:58:34 +00:00
|
|
|
vn-id="model"
|
|
|
|
url="/ticket/api/TicketRequests"
|
|
|
|
fields="['id', 'description', 'created', 'requesterFk', 'atenderFk', 'quantity', 'price', 'saleFk', 'isOk']"
|
|
|
|
order="created ASC"
|
2018-11-21 08:08:14 +00:00
|
|
|
link="{ticketFk: $ctrl.$stateParams.id}"
|
2018-11-21 07:58:34 +00:00
|
|
|
filter="::$ctrl.filter"
|
|
|
|
data="purchaseRequests">
|
|
|
|
</vn-crud-model>
|
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
|
|
|
data="purchaseRequests"
|
|
|
|
form="form">
|
|
|
|
</vn-watcher>
|
|
|
|
<form name="form" ng-submit="$ctrl.onSubmit()">
|
|
|
|
<vn-card pad-large>
|
|
|
|
<vn-title>Purchase request</vn-title>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-table model="model">
|
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
|
|
|
<vn-th number>Id</vn-th>
|
2018-11-21 11:17:11 +00:00
|
|
|
<vn-th>Description</vn-th>
|
2018-11-21 07:58:34 +00:00
|
|
|
<vn-th number>Created</vn-th>
|
2018-11-21 11:17:11 +00:00
|
|
|
<vn-th>Requester</vn-th>
|
|
|
|
<vn-th>Atender</vn-th>
|
2018-11-21 07:58:34 +00:00
|
|
|
<vn-th number>Quantity</vn-th>
|
|
|
|
<vn-th number>Price</vn-th>
|
|
|
|
<vn-th number>Sale id</vn-th>
|
|
|
|
<vn-th number>Ok</vn-th>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-thead>
|
|
|
|
<vn-tbody>
|
|
|
|
<vn-tr ng-repeat="request in purchaseRequests">
|
|
|
|
<vn-td number>{{::request.id}}</vn-td>
|
2018-11-21 11:17:11 +00:00
|
|
|
<vn-td>{{::request.description}}</vn-td>
|
2018-11-21 07:58:34 +00:00
|
|
|
<vn-td number>{{::request.created | dateTime: 'dd/MM/yyyy'}}</vn-td>
|
2018-11-21 11:17:11 +00:00
|
|
|
<vn-td>{{::request.requester.firstName}} {{::request.requester.name}}</vn-td>
|
|
|
|
<vn-td>{{::request.atender.firstName}} {{::request.atender.name}}</vn-td>
|
2018-11-21 07:58:34 +00:00
|
|
|
<vn-td number>{{::request.quantity}}</vn-td>
|
|
|
|
<vn-td number>{{::request.price}}</vn-td>
|
|
|
|
<vn-td number>
|
|
|
|
<span
|
|
|
|
ng-show="::request.saleFk"
|
|
|
|
ng-click="$ctrl.showDescriptor($event, request.sale)"
|
|
|
|
pointer class="link">
|
|
|
|
{{("000000"+request.saleFk).slice(-6)}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td number>
|
|
|
|
<vn-check vn-one
|
|
|
|
field="::request.isOk"
|
|
|
|
disabled="true">
|
|
|
|
</vn-check>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td number>
|
|
|
|
<vn-icon-button
|
|
|
|
disabled="::request.saleFk"
|
|
|
|
icon="delete"
|
|
|
|
ng-click="$ctrl.removeLine($index)"
|
|
|
|
vn-tooltip="Remove request"
|
|
|
|
tabindex="-1">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
|
|
|
<vn-empty-rows ng-if="model.data.length === 0" translate>
|
|
|
|
No results
|
|
|
|
</vn-empty-rows>
|
|
|
|
</vn-table>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-card>
|
|
|
|
<vn-item-descriptor-popover vn-id="descriptor"
|
|
|
|
quicklinks="$ctrl.quicklinks">
|
|
|
|
</vn-item-descriptor-popover>
|
|
|
|
</form>
|
|
|
|
<a ui-sref="ticket.card.request.create" vn-tooltip="New request" vn-bind="+" fixed-bottom-right>
|
|
|
|
<vn-float-button icon="add"></vn-float-button>
|
|
|
|
</a>
|