3671-supplier_account #889
|
@ -18,7 +18,7 @@ module.exports = Self => {
|
|||
}, {
|
||||
arg: 'search',
|
||||
type: 'string',
|
||||
description: `If it's and integer searchs by id, otherwise it searchs by nickname`
|
||||
description: `The general search by ticket id or nickname`
|
||||
}, {
|
||||
arg: 'from',
|
||||
type: 'date',
|
||||
|
@ -36,9 +36,9 @@ module.exports = Self => {
|
|||
type: 'integer',
|
||||
description: 'The client id'
|
||||
}, {
|
||||
arg: 'ticketFk',
|
||||
arg: 'orderFk',
|
||||
type: 'integer',
|
||||
description: 'The ticket id'
|
||||
description: 'The order id'
|
||||
}, {
|
||||
arg: 'agencyModeFk',
|
||||
type: 'integer',
|
||||
|
@ -103,7 +103,7 @@ module.exports = Self => {
|
|||
switch (param) {
|
||||
case 'search':
|
||||
return /^\d+$/.test(value)
|
||||
? {'o.id': value}
|
||||
? {'t.id': value}
|
||||
: {or: [
|
||||
{'c.name': {like: `%${value}%`}}
|
||||
]};
|
||||
|
@ -119,8 +119,8 @@ module.exports = Self => {
|
|||
return {'o.agency_id': value};
|
||||
case 'sourceApp':
|
||||
return {'o.source_app': value};
|
||||
case 'ticketFk':
|
||||
return {'ot.ticketFk': value};
|
||||
case 'orderFk':
|
||||
return {'o.id': value};
|
||||
case 'isConfirmed':
|
||||
return {'o.confirmed': value ? 1 : 0};
|
||||
case 'myTeam':
|
||||
|
@ -131,7 +131,7 @@ module.exports = Self => {
|
|||
case 'showEmpty':
|
||||
return {'o.total': {neq: value}};
|
||||
case 'id':
|
||||
param = `o.${param}`;
|
||||
param = `t.${param}`;
|
||||
return {[param]: value};
|
||||
}
|
||||
});
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<vn-searchbar
|
||||
vn-focus
|
||||
panel="vn-order-search-panel"
|
||||
info="Search orders by id"
|
||||
info="Search orders by ticket id"
|
||||
model="model"
|
||||
filter="$ctrl.filter">
|
||||
</vn-searchbar>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
vn-one
|
||||
label="General search"
|
||||
ng-model="filter.search"
|
||||
info="Search orders by id"
|
||||
info="Search orders by ticket id"
|
||||
vn-focus>
|
||||
</vn-textfield>
|
||||
</vn-horizontal>
|
||||
|
@ -51,8 +51,8 @@
|
|||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
label="Ticket id"
|
||||
ng-model="filter.ticketFk">
|
||||
label="Order id"
|
||||
ng-model="filter.orderFk">
|
||||
</vn-textfield>
|
||||
<vn-autocomplete
|
||||
vn-one
|
||||
|
|
|
@ -8,4 +8,4 @@ Application: Aplicación
|
|||
SalesPerson: Comercial
|
||||
Order confirmed: Pedido confirmado
|
||||
Show empty: Mostrar vacías
|
||||
Search orders by id: Buscar pedido por id
|
||||
Search orders by ticket id: Buscar pedido por id ticket
|
Loading…
Reference in New Issue