5439-newFilterEnPeticionesDeCompra #1406

Merged
joan merged 10 commits from 5439-newFilterEnPeticionesDeCompra into dev 2023-04-06 07:05:19 +00:00
2 changed files with 20 additions and 0 deletions

View File

@ -38,6 +38,19 @@
url="Warehouses">
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal class="vn-px-lg">
<vn-autocomplete
vn-one
ng-model="filter.requesterFk"
url="Workers/activeWithRole"
search-function="{firstName: $search}"
value-field="id"
where="{role: 'salesPerson'}"
label="Comercial">
<tpl-item>{{firstName}} {{lastName}}</tpl-item>
</vn-autocomplete>
</vn-horizontal>
<section class="vn-px-md">
<vn-horizontal class="manifold-panel vn-pa-md">
<vn-date-picker

View File

@ -37,6 +37,10 @@ module.exports = Self => {
type: 'number',
description: `Search requests attended by a given worker id`
},
{
arg: 'requesterFk',
type: 'number'
},
{
arg: 'mine',
type: 'boolean',
@ -89,6 +93,8 @@ module.exports = Self => {
return {'t.id': value};
case 'attenderFk':
return {'tr.attenderFk': value};
case 'requesterFk':
return {'tr.requesterFk': value};
case 'state':
switch (value) {
case 'pending':
@ -125,6 +131,7 @@ module.exports = Self => {
tr.description,
tr.response,
tr.saleFk,
tr.requesterFk,
tr.isOk,
s.quantity AS saleQuantity,
s.itemFk,