From 50c989a267edcddd21de6d2af28059143bc172b9 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Mon, 2 Sep 2019 12:23:49 +0200 Subject: [PATCH] Add attendedBy and salesPerson filters #1661 --- modules/claim/back/methods/claim/filter.js | 13 ++++++-- modules/claim/front/basic-data/index.html | 2 +- modules/claim/front/search-panel/index.html | 33 +++++++++++++-------- 3 files changed, 32 insertions(+), 16 deletions(-) diff --git a/modules/claim/back/methods/claim/filter.js b/modules/claim/back/methods/claim/filter.js index 38212d004..33909eedc 100644 --- a/modules/claim/back/methods/claim/filter.js +++ b/modules/claim/back/methods/claim/filter.js @@ -44,9 +44,14 @@ module.exports = Self => { description: 'The claim state id', http: {source: 'query'} }, { - arg: 'workerFk', + arg: 'salesPersonFk', type: 'Integer', - description: 'The worker id', + description: 'The salesPerson id', + http: {source: 'query'} + }, { + arg: 'attenderFk', + type: 'Integer', + description: 'The attender worker id', http: {source: 'query'} }, { arg: 'created', @@ -86,7 +91,9 @@ module.exports = Self => { return {'c.id': value}; case 'claimStateFk': return {'cl.claimStateFk': value}; - case 'workerFk': + case 'salesPersonFk': + return {'c.salesPersonFk': value}; + case 'attenderFk': return {'cl.workerFk': value}; case 'created': return {'cl.created': value}; diff --git a/modules/claim/front/basic-data/index.html b/modules/claim/front/basic-data/index.html index d05c6ebc5..9ff12acf7 100644 --- a/modules/claim/front/basic-data/index.html +++ b/modules/claim/front/basic-data/index.html @@ -36,7 +36,7 @@ search-function="{firstName: $search}" value-field="id" where="{role: 'employee'}" - label="Worker"> + label="Attended by"> + {{firstName}} {{name}} + + + {{firstName}} {{name}} + + + + {{description}} - - {{firstName}} {{name}} - - -