2019-02-10 21:52:35 +00:00
|
|
|
<vn-crud-model
|
2018-11-21 07:58:34 +00:00
|
|
|
vn-id="model"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="TicketRequests"
|
2019-10-22 11:44:36 +00:00
|
|
|
fields="['id', 'description', 'created', 'requesterFk', 'attenderFk', 'quantity', 'price', 'saleFk', 'isOk']"
|
2018-11-21 07:58:34 +00:00
|
|
|
order="created ASC"
|
2020-03-18 07:35:59 +00:00
|
|
|
link="{ticketFk: $ctrl.$params.id}"
|
2018-11-21 07:58:34 +00:00
|
|
|
filter="::$ctrl.filter"
|
2019-10-11 15:38:04 +00:00
|
|
|
data="purchaseRequests"
|
|
|
|
auto-load="true">
|
2018-11-21 07:58:34 +00:00
|
|
|
</vn-crud-model>
|
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
2019-10-11 15:38:04 +00:00
|
|
|
data="purchaseRequests">
|
2018-11-21 07:58:34 +00:00
|
|
|
</vn-watcher>
|
2019-10-11 15:38:04 +00:00
|
|
|
<vn-data-viewer model="model">
|
|
|
|
<vn-card class="vn-w-xl">
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-table model="model">
|
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
|
|
|
<vn-th number>Id</vn-th>
|
|
|
|
<vn-th>Description</vn-th>
|
2020-11-10 15:47:39 +00:00
|
|
|
<vn-th expand>Created</vn-th>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-th>Requester</vn-th>
|
|
|
|
<vn-th>Atender</vn-th>
|
|
|
|
<vn-th number>Quantity</vn-th>
|
|
|
|
<vn-th number>Price</vn-th>
|
2021-05-21 13:31:28 +00:00
|
|
|
<vn-th number>Item id</vn-th>
|
2019-02-10 21:52:35 +00:00
|
|
|
<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>
|
2019-02-15 11:39:21 +00:00
|
|
|
<vn-td expand>
|
2020-01-28 08:05:01 +00:00
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
disabled="$ctrl.isEditable(request.isOk)"
|
|
|
|
ng-model="::request.description"
|
|
|
|
on-change="$ctrl.updateData()">
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-td>
|
2020-11-10 15:47:39 +00:00
|
|
|
<vn-td expand>{{::request.created | date: 'dd/MM/yyyy'}}</vn-td>
|
2020-01-28 08:05:01 +00:00
|
|
|
<vn-td>
|
2019-02-15 11:39:21 +00:00
|
|
|
<span
|
|
|
|
class="link"
|
2020-04-28 12:26:02 +00:00
|
|
|
ng-click="workerDescriptor.show($event, request.requesterFk)">
|
2019-02-15 11:39:21 +00:00
|
|
|
{{::request.requester.user.nickname | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
2020-01-28 08:05:01 +00:00
|
|
|
<vn-td>
|
2019-05-09 12:40:59 +00:00
|
|
|
<span
|
2019-02-15 11:39:21 +00:00
|
|
|
class="link"
|
2020-04-28 12:26:02 +00:00
|
|
|
ng-click="workerDescriptor.show($event, request.attenderFk)">
|
2019-02-15 11:39:21 +00:00
|
|
|
{{::request.atender.user.nickname | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
2020-01-28 08:05:01 +00:00
|
|
|
<vn-td>
|
|
|
|
<vn-input-number
|
|
|
|
min="1"
|
|
|
|
disabled="$ctrl.isEditable(request.isOk)"
|
|
|
|
ng-model="::request.quantity"
|
|
|
|
on-change="$ctrl.updateData()">
|
|
|
|
</vn-input-number>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td>
|
|
|
|
<vn-input-number
|
|
|
|
step="0.01"
|
|
|
|
disabled="$ctrl.isEditable(request.isOk)"
|
|
|
|
ng-model="::request.price"
|
|
|
|
on-change="$ctrl.updateData()">
|
|
|
|
</vn-input-number>
|
|
|
|
</vn-td>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-td number>
|
|
|
|
<span
|
|
|
|
ng-show="::request.saleFk"
|
2020-05-08 12:01:49 +00:00
|
|
|
ng-click="itemDescriptor.show($event, request.sale.itemFk, request.sale.id)"
|
2019-02-10 21:52:35 +00:00
|
|
|
class="link">
|
2020-01-28 08:05:01 +00:00
|
|
|
{{::request.saleFk | zeroFill:6}}
|
2019-02-10 21:52:35 +00:00
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td number>
|
|
|
|
<vn-check vn-one
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="::request.isOk"
|
2019-04-15 12:21:52 +00:00
|
|
|
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>
|
2018-11-21 07:58:34 +00:00
|
|
|
</vn-card>
|
2019-10-11 15:38:04 +00:00
|
|
|
</vn-data-viewer>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-item-descriptor-popover
|
2021-05-21 13:31:28 +00:00
|
|
|
vn-id="item-descriptor"
|
2021-05-24 08:31:51 +00:00
|
|
|
warehouse-fk="$ctrl.ticket.warehouseFk">
|
2018-11-21 07:58:34 +00:00
|
|
|
</vn-item-descriptor-popover>
|
2019-02-15 11:39:21 +00:00
|
|
|
<vn-worker-descriptor-popover
|
2021-05-21 13:31:28 +00:00
|
|
|
vn-id="worker-descriptor">
|
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>
|