2020-02-24 13:29:48 +00:00
|
|
|
<vn-crud-model
|
2019-04-05 13:20:12 +00:00
|
|
|
vn-id="model"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="TicketRequests/filter"
|
2020-06-02 12:42:58 +00:00
|
|
|
user-params="::$ctrl.filterParams"
|
2019-04-05 13:20:12 +00:00
|
|
|
limit="20"
|
|
|
|
data="requests"
|
2020-06-03 10:21:03 +00:00
|
|
|
order="shippedDate ASC, isOk ASC"
|
2020-04-28 12:26:02 +00:00
|
|
|
auto-load="true">
|
2019-04-05 13:20:12 +00:00
|
|
|
</vn-crud-model>
|
2019-11-10 10:08:44 +00:00
|
|
|
<vn-portal slot="topbar">
|
2020-04-28 12:26:02 +00:00
|
|
|
<vn-searchbar
|
2019-11-10 10:08:44 +00:00
|
|
|
panel="vn-request-search-panel"
|
2020-04-28 12:26:02 +00:00
|
|
|
info="Search request by id or alias"
|
2021-02-23 15:27:18 +00:00
|
|
|
suggested-filter="$ctrl.filterParams"
|
2020-06-02 12:42:58 +00:00
|
|
|
filter="$ctrl.filterParams"
|
2021-02-23 15:09:29 +00:00
|
|
|
fetch-params="$ctrl.fetchParams($params)"
|
2020-04-28 12:26:02 +00:00
|
|
|
model="model"
|
|
|
|
auto-state="false">
|
2019-11-10 10:08:44 +00:00
|
|
|
</vn-searchbar>
|
|
|
|
</vn-portal>
|
|
|
|
<vn-data-viewer model="model">
|
|
|
|
<vn-card>
|
2020-06-02 12:42:58 +00:00
|
|
|
<vn-table model="model" auto-load="false">
|
2019-11-10 10:08:44 +00:00
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
|
|
|
<vn-th field="ticketFk" number>Ticket ID</vn-th>
|
2020-05-26 06:08:09 +00:00
|
|
|
<vn-th field="shipped" expand>Shipped</vn-th>
|
2020-08-31 06:32:30 +00:00
|
|
|
<vn-th field="description" filter-enabled="false" expand>Description</vn-th>
|
2019-11-10 10:08:44 +00:00
|
|
|
<vn-th field="quantity" number editable>Requested</vn-th>
|
|
|
|
<vn-th field="price" number>Price</vn-th>
|
2020-08-31 06:32:30 +00:00
|
|
|
<vn-th field="attenderName">Atender</vn-th>
|
|
|
|
<vn-th>Item</vn-th>
|
2019-11-10 10:08:44 +00:00
|
|
|
<vn-th field="saleQuantity">Achieved</vn-th>
|
2020-08-31 06:32:30 +00:00
|
|
|
<vn-th field="description" filter-enabled="false">Concept</vn-th>
|
2019-11-10 10:08:44 +00:00
|
|
|
<vn-th field="isOk">State</vn-th>
|
2020-08-31 06:32:30 +00:00
|
|
|
<vn-th></vn-th>
|
2019-11-10 10:08:44 +00:00
|
|
|
</vn-tr>
|
|
|
|
</vn-thead>
|
|
|
|
<vn-tbody>
|
|
|
|
<vn-tr ng-repeat="request in requests">
|
|
|
|
<vn-td number>
|
|
|
|
<span class="link"
|
2020-04-28 12:26:02 +00:00
|
|
|
ng-click="ticketDescriptor.show($event, request.ticketFk)">
|
2019-11-10 10:08:44 +00:00
|
|
|
{{request.ticketFk}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
2020-05-26 06:08:09 +00:00
|
|
|
<vn-td expand>
|
2019-11-10 10:08:44 +00:00
|
|
|
<span title="{{::request.shipped | date: 'dd/MM/yyyy'}}"
|
|
|
|
class="chip {{$ctrl.compareDate(request.shipped)}}">
|
|
|
|
{{::request.shipped | date: 'dd/MM/yyyy'}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
2020-02-06 13:33:28 +00:00
|
|
|
<vn-td title="{{::request.description}}" expand>{{::request.description}}</vn-td>
|
2019-11-10 10:08:44 +00:00
|
|
|
<vn-td number>{{::request.quantity}}</vn-td>
|
|
|
|
<vn-td number>{{::request.price | currency: 'EUR':2}}</vn-td>
|
|
|
|
<vn-td>
|
|
|
|
<span
|
|
|
|
class="link"
|
2020-04-28 12:26:02 +00:00
|
|
|
ng-click="workerDescriptor.show($event, request.attenderFk)">
|
2020-05-26 06:08:09 +00:00
|
|
|
{{::request.attenderName}}
|
2019-11-10 10:08:44 +00:00
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td-editable disabled="request.isOk != null" number>
|
|
|
|
<text>{{request.itemFk}}</text>
|
|
|
|
<field>
|
|
|
|
<vn-input-number class="dense" vn-focus
|
|
|
|
ng-model="request.itemFk">
|
|
|
|
</vn-input-number>
|
|
|
|
</field>
|
|
|
|
</vn-td-editable>
|
|
|
|
<vn-td-editable disabled="!request.itemFk || request.isOk != null" number>
|
|
|
|
<text number>{{request.saleQuantity}}</text>
|
|
|
|
<field>
|
|
|
|
<vn-input-number class="dense" vn-focus
|
|
|
|
ng-model="request.saleQuantity"
|
|
|
|
on-change="$ctrl.changeQuantity(request)">
|
|
|
|
</vn-input-number>
|
|
|
|
</field>
|
|
|
|
</vn-td-editable>
|
2020-02-06 13:33:28 +00:00
|
|
|
<vn-td expand>
|
2019-11-10 10:08:44 +00:00
|
|
|
<span
|
|
|
|
class="link"
|
2020-04-28 12:26:02 +00:00
|
|
|
ng-click="itemDescriptor.show($event, request.itemFk)"
|
2019-11-10 10:08:44 +00:00
|
|
|
title="{{request.itemDescription}}">
|
|
|
|
{{request.itemDescription}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
2020-08-31 06:32:30 +00:00
|
|
|
<vn-td translate>{{$ctrl.getState(request.isOk)}}</vn-td>
|
2019-11-10 10:08:44 +00:00
|
|
|
<vn-td>
|
|
|
|
<vn-icon
|
|
|
|
ng-if="request.response.length"
|
2020-02-14 13:52:47 +00:00
|
|
|
translate-attr="{title: request.response}"
|
2020-05-06 12:38:09 +00:00
|
|
|
icon="insert_drive_file"
|
|
|
|
class="bright">
|
2019-11-10 10:08:44 +00:00
|
|
|
</vn-icon>
|
|
|
|
<vn-icon-button
|
2020-11-12 08:45:41 +00:00
|
|
|
ng-if="request.isOk == null"
|
2019-11-10 10:08:44 +00:00
|
|
|
icon="thumb_down"
|
2020-03-24 16:27:21 +00:00
|
|
|
ng-click="denyDialog.show(request)"
|
2020-02-06 13:33:28 +00:00
|
|
|
translate-attr="{title: 'Discard'}"
|
|
|
|
tabindex="-1">
|
2019-11-10 10:08:44 +00:00
|
|
|
</vn-icon-button>
|
|
|
|
</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
|
|
|
</vn-table>
|
|
|
|
</vn-card>
|
|
|
|
</vn-data-viewer>
|
2019-04-18 09:02:28 +00:00
|
|
|
<vn-worker-descriptor-popover
|
2021-05-21 13:31:05 +00:00
|
|
|
vn-id="worker-descriptor">
|
2019-04-18 09:02:28 +00:00
|
|
|
</vn-worker-descriptor-popover>
|
2019-04-05 13:20:12 +00:00
|
|
|
<vn-ticket-descriptor-popover
|
2021-05-21 13:31:05 +00:00
|
|
|
vn-id="ticket-descriptor">
|
2019-04-05 13:20:12 +00:00
|
|
|
</vn-ticket-descriptor-popover>
|
2019-04-18 09:02:28 +00:00
|
|
|
<vn-item-descriptor-popover
|
2021-05-21 13:31:05 +00:00
|
|
|
vn-id="item-descriptor"
|
|
|
|
warehouse-fk="$ctrl.vnConfig.warehouseFk">
|
2019-04-18 09:02:28 +00:00
|
|
|
</vn-item-descriptor-popover>
|
2019-04-05 13:20:12 +00:00
|
|
|
<vn-dialog
|
2020-04-28 12:26:02 +00:00
|
|
|
vn-id="denyDialog"
|
2020-03-24 16:27:21 +00:00
|
|
|
on-accept="$ctrl.onDenyAccept($data)"
|
2020-05-06 12:38:09 +00:00
|
|
|
on-close="$ctrl.denyObservation = null"
|
|
|
|
message="Specify the reasons to deny this request">
|
2019-04-05 13:20:12 +00:00
|
|
|
<tpl-body>
|
2020-04-28 12:26:02 +00:00
|
|
|
<vn-textarea
|
|
|
|
ng-model="$ctrl.denyObservation"
|
|
|
|
vn-focus>
|
|
|
|
</vn-textarea>
|
2019-04-05 13:20:12 +00:00
|
|
|
</tpl-body>
|
2019-10-22 11:44:36 +00:00
|
|
|
<tpl-buttons>
|
2019-10-30 15:57:14 +00:00
|
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="accept" translate>Save</button>
|
2019-10-22 11:44:36 +00:00
|
|
|
</tpl-buttons>
|
2020-08-31 06:32:30 +00:00
|
|
|
</vn-dialog>
|
|
|
|
|
|
|
|
<vn-contextmenu vn-id="contextmenu" targets="['vn-data-viewer']" model="model"
|
|
|
|
expr-builder="$ctrl.exprBuilder(param, value)">
|
|
|
|
<slot-menu>
|
|
|
|
<vn-item translate
|
2021-03-03 11:21:04 +00:00
|
|
|
ng-if="contextmenu.isFilterAllowed()"
|
|
|
|
ng-click="contextmenu.filterBySelection()">
|
2020-08-31 06:32:30 +00:00
|
|
|
Filter by selection
|
|
|
|
</vn-item>
|
|
|
|
<vn-item translate
|
2021-03-03 11:21:04 +00:00
|
|
|
ng-if="contextmenu.isFilterAllowed()"
|
|
|
|
ng-click="contextmenu.excludeSelection()">
|
2020-08-31 06:32:30 +00:00
|
|
|
Exclude selection
|
|
|
|
</vn-item>
|
|
|
|
<vn-item translate
|
2021-03-03 11:21:04 +00:00
|
|
|
ng-if="contextmenu.isFilterAllowed()"
|
|
|
|
ng-click="contextmenu.removeFilter()">
|
2020-08-31 06:32:30 +00:00
|
|
|
Remove filter
|
|
|
|
</vn-item>
|
|
|
|
<vn-item translate
|
2021-03-03 11:21:04 +00:00
|
|
|
ng-click="contextmenu.removeAllFilters()">
|
2020-08-31 06:32:30 +00:00
|
|
|
Remove all filters
|
|
|
|
</vn-item>
|
2021-02-11 14:06:41 +00:00
|
|
|
<vn-item translate
|
2021-03-03 11:21:04 +00:00
|
|
|
ng-if="contextmenu.isActionAllowed()"
|
|
|
|
ng-click="contextmenu.copyValue()">
|
2021-02-11 14:06:41 +00:00
|
|
|
Copy value
|
|
|
|
</vn-item>
|
2020-08-31 06:32:30 +00:00
|
|
|
</slot-menu>
|
|
|
|
</vn-contextmenu>
|