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

111 lines
4.1 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-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>
<vn-th number>State</vn-th>
2019-02-10 21:52:35 +00:00
</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
translate>
{{$ctrl.getRequestState(request.isOk)}}
2019-02-10 21:52:35 +00:00
</vn-td>
<vn-td number>
<vn-icon-button
disabled="::request.saleFk"
icon="delete"
ng-click="$ctrl.removeLine($index)"
vn-tooltip="Remove request"
tabindex="-1">
2021-10-27 11:41:59 +00:00
</vn-icon-button>
2019-02-10 21:52:35 +00:00
</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="$ctrl.ticket.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>