From 3f483d36f2f420db671fd7d4e39d71cedda30269 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 28 Feb 2022 14:28:16 +0100 Subject: [PATCH 1/2] refactor(order_search-panel): change orderFk to ticketFk --- modules/order/back/methods/order/filter.js | 14 +++++++------- modules/order/front/main/index.html | 2 +- modules/order/front/search-panel/index.html | 6 +++--- modules/order/front/search-panel/locale/es.yml | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/order/back/methods/order/filter.js b/modules/order/back/methods/order/filter.js index 27cacdd62..a4d0c0f8e 100644 --- a/modules/order/back/methods/order/filter.js +++ b/modules/order/back/methods/order/filter.js @@ -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: `If it's and integer searchs by ticket id, otherwise it searchs by 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}; } }); diff --git a/modules/order/front/main/index.html b/modules/order/front/main/index.html index f3b72adb2..1f6c7434c 100644 --- a/modules/order/front/main/index.html +++ b/modules/order/front/main/index.html @@ -9,7 +9,7 @@ diff --git a/modules/order/front/search-panel/index.html b/modules/order/front/search-panel/index.html index c622dd152..a3ed9e5a5 100644 --- a/modules/order/front/search-panel/index.html +++ b/modules/order/front/search-panel/index.html @@ -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> @@ -51,8 +51,8 @@ + label="Order id" + ng-model="filter.orderFk"> Date: Thu, 3 Mar 2022 13:03:43 +0100 Subject: [PATCH 2/2] change description --- modules/order/back/methods/order/filter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/order/back/methods/order/filter.js b/modules/order/back/methods/order/filter.js index a4d0c0f8e..008c0e5c9 100644 --- a/modules/order/back/methods/order/filter.js +++ b/modules/order/back/methods/order/filter.js @@ -18,7 +18,7 @@ module.exports = Self => { }, { arg: 'search', type: 'string', - description: `If it's and integer searchs by ticket id, otherwise it searchs by nickname` + description: `The general search by ticket id or nickname` }, { arg: 'from', type: 'date',