3669-refactor(order_search-panel): change orderFk to ticketFk #888

Merged
joan merged 4 commits from 3669-order_search-panel into dev 2022-03-04 08:39:01 +00:00
4 changed files with 12 additions and 12 deletions

View File

@ -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`
alexm marked this conversation as resolved Outdated
Outdated
Review

Change description to "The general search by ticket id or nickname"

Change description to "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};
}
});

View File

@ -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>

View File

@ -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

View File

@ -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