2019-02-10 21:52:35 +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>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-table model="model">
|
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
|
|
|
<vn-th number>Id</vn-th>
|
|
|
|
<vn-th>Description</vn-th>
|
|
|
|
<vn-th number>Created</vn-th>
|
|
|
|
<vn-th>Requester</vn-th>
|
|
|
|
<vn-th>Atender</vn-th>
|
|
|
|
<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>
|
|
|
|
<vn-td expand>{{::request.description}}</vn-td>
|
|
|
|
<vn-td number>{{::request.created | dateTime: 'dd/MM/yyyy'}}</vn-td>
|
2019-02-15 11:39:21 +00:00
|
|
|
<vn-td expand>
|
|
|
|
<span
|
|
|
|
class="link"
|
2019-04-25 12:24:02 +00:00
|
|
|
ng-click="$ctrl.showWorkerDescriptor($event, request.requesterFk)">
|
2019-02-15 11:39:21 +00:00
|
|
|
{{::request.requester.user.nickname | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td expand>
|
2019-05-09 12:40:59 +00:00
|
|
|
<span
|
2019-02-15 11:39:21 +00:00
|
|
|
class="link"
|
2019-04-25 12:24:02 +00:00
|
|
|
ng-click="$ctrl.showWorkerDescriptor($event, request.atenderFk)">
|
2019-02-15 11:39:21 +00:00
|
|
|
{{::request.atender.user.nickname | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-td number>{{::request.quantity}}</vn-td>
|
|
|
|
<vn-td number>{{::request.price | currency: 'EUR': 2}}</vn-td>
|
|
|
|
<vn-td number>
|
|
|
|
<span
|
|
|
|
ng-show="::request.saleFk"
|
2019-02-20 17:46:30 +00:00
|
|
|
ng-click="$ctrl.showItemDescriptor($event, request.sale.itemFk)"
|
2019-02-10 21:52:35 +00:00
|
|
|
class="link">
|
|
|
|
{{request.saleFk | zeroFill:6}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td number>
|
|
|
|
<vn-check vn-one
|
2019-04-15 12:21:52 +00:00
|
|
|
field="::request.isOk"
|
|
|
|
triple-state="true"
|
2019-05-09 12:40:59 +00:00
|
|
|
title="{{$ctrl.getRequestState(request.isOk)}}"
|
2019-02-10 21:52:35 +00:00
|
|
|
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-table>
|
|
|
|
</vn-horizontal>
|
2018-11-21 07:58:34 +00:00
|
|
|
</vn-card>
|
2019-02-10 21:52:35 +00:00
|
|
|
</form>
|
|
|
|
<vn-item-descriptor-popover
|
2019-02-15 11:39:21 +00:00
|
|
|
vn-id="itemDescriptor"
|
2018-11-21 07:58:34 +00:00
|
|
|
quicklinks="$ctrl.quicklinks">
|
|
|
|
</vn-item-descriptor-popover>
|
2019-02-15 11:39:21 +00:00
|
|
|
<vn-worker-descriptor-popover
|
|
|
|
vn-id="workerDescriptor"
|
2019-04-25 12:24:02 +00:00
|
|
|
worker-fk="$ctrl.selectedWorker">
|
2019-02-15 11:39:21 +00:00
|
|
|
</vn-worker-descriptor-popover>
|
2019-02-10 21:52:35 +00:00
|
|
|
<a ui-sref="ticket.card.request.create"
|
|
|
|
vn-tooltip="New request"
|
|
|
|
vn-bind="+"
|
|
|
|
fixed-bottom-right>
|
2018-11-21 07:58:34 +00:00
|
|
|
<vn-float-button icon="add"></vn-float-button>
|
|
|
|
</a>
|