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

121 lines
4.4 KiB
HTML
Raw Normal View History

2019-02-10 21:52:35 +00:00
<vn-crud-model
2018-11-21 07:58:34 +00:00
vn-id="model"
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-crud-model
url="tickets"
link="{id: $ctrl.$params.id}"
data="tickets"
auto-load="true">
</vn-crud-model>
2018-11-21 07:58:34 +00:00
<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>
<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>
<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>
<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>
<vn-td expand>{{::request.created | date: 'dd/MM/yyyy'}}</vn-td>
2020-01-28 08:05:01 +00:00
<vn-td>
<span
class="link"
ng-click="workerDescriptor.show($event, request.requesterFk)">
{{::request.requester.user.nickname | dashIfEmpty}}
</span>
</vn-td>
2020-01-28 08:05:01 +00:00
<vn-td>
<span
class="link"
ng-click="workerDescriptor.show($event, request.attenderFk)">
{{::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"
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"
triple-state="true"
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
vn-id="item-descriptor"
warehouse-fk="tickets[0].warehouseFk">
2018-11-21 07:58:34 +00:00
</vn-item-descriptor-popover>
<vn-worker-descriptor-popover
vn-id="worker-descriptor">
</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>